passbolt-styleguide 5.14.4 → 5.14.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/RELEASE_NOTES.md +7 -6
- package/build/css/help.min.css +2 -2
- package/build/css/public.min.css +2 -2
- package/build/css/themes/default/api_authentication.min.css +2 -2
- package/build/css/themes/default/api_cloud.min.css +2 -2
- package/build/css/themes/default/api_main.min.css +2 -2
- package/build/css/themes/default/api_reports.min.css +2 -2
- package/build/css/themes/default/api_webinstaller.min.css +2 -2
- package/build/css/themes/default/ext_app.min.css +2 -2
- package/build/css/themes/default/ext_authentication.min.css +2 -2
- package/build/css/themes/default/ext_external.min.css +2 -2
- package/build/css/themes/default/ext_in_form_cta.min.css +2 -2
- package/build/css/themes/default/ext_in_form_menu.min.css +2 -2
- package/build/css/themes/default/ext_quickaccess.min.css +2 -2
- package/build/css/themes/midgar/api_authentication.min.css +2 -2
- package/build/css/themes/midgar/api_main.min.css +2 -2
- package/build/css/themes/midgar/api_reports.min.css +2 -2
- package/build/css/themes/midgar/ext_app.min.css +2 -2
- package/build/css/themes/midgar/ext_authentication.min.css +2 -2
- package/build/css/themes/midgar/ext_in_form_cta.min.css +2 -2
- package/build/css/themes/midgar/ext_in_form_menu.min.css +2 -2
- package/build/css/themes/midgar/ext_quickaccess.min.css +2 -2
- package/build/css/themes/solarized_dark/api_authentication.min.css +2 -2
- package/build/css/themes/solarized_dark/api_main.min.css +2 -2
- package/build/css/themes/solarized_dark/api_reports.min.css +2 -2
- package/build/css/themes/solarized_dark/ext_app.min.css +2 -2
- package/build/css/themes/solarized_dark/ext_authentication.min.css +2 -2
- package/build/css/themes/solarized_dark/ext_in_form_cta.min.css +2 -2
- package/build/css/themes/solarized_dark/ext_in_form_menu.min.css +2 -2
- package/build/css/themes/solarized_dark/ext_quickaccess.min.css +2 -2
- package/build/css/themes/solarized_light/api_authentication.min.css +2 -2
- package/build/css/themes/solarized_light/api_main.min.css +2 -2
- package/build/css/themes/solarized_light/api_reports.min.css +2 -2
- package/build/css/themes/solarized_light/ext_app.min.css +2 -2
- package/build/css/themes/solarized_light/ext_authentication.min.css +2 -2
- package/build/css/themes/solarized_light/ext_in_form_cta.min.css +2 -2
- package/build/css/themes/solarized_light/ext_in_form_menu.min.css +2 -2
- package/build/css/themes/solarized_light/ext_quickaccess.min.css +2 -2
- package/build/js/dist/api-account-recovery.js +1 -1
- package/build/js/dist/api-account-recovery.js.LICENSE.txt +70 -0
- package/build/js/dist/api-app.js +1 -1
- package/build/js/dist/api-app.js.LICENSE.txt +0 -14
- package/build/js/dist/api-recover.js +1 -1
- package/build/js/dist/api-recover.js.LICENSE.txt +70 -0
- package/build/js/dist/api-setup.js +1 -1
- package/build/js/dist/api-setup.js.LICENSE.txt +70 -0
- package/build/js/dist/api-triage.js +1 -1
- package/build/js/dist/api-triage.js.LICENSE.txt +70 -0
- package/build/js/dist/api-vendors.js +1 -1
- package/build/locales/en-UK/common.json +3 -7
- package/package.json +1 -1
- package/src/locales/en-UK/common.json +3 -7
- package/src/react-extension/components/Administration/DisplaySubscriptionKey/DisplaySubscriptionKey.js +13 -9
- package/src/react-extension/components/Administration/DowngradeToCe/DowngradeToCe.js +6 -2
- package/src/react-extension/components/Common/Footer/Footer.js +11 -13
- package/src/react-extension/components/Resource/HandlePermissionWorkflow/flows/FolderShareFlow.test.js +4 -7
- package/src/react-extension/components/Resource/HandlePermissionWorkflow/flows/ResourceCreationFlow.js +12 -18
- package/src/react-extension/components/Resource/HandlePermissionWorkflow/flows/ResourceCreationFlow.test.js +15 -17
- package/src/react-extension/components/Resource/HandlePermissionWorkflow/flows/ResourceEditFlow.js +10 -14
- package/src/react-extension/components/Resource/HandlePermissionWorkflow/flows/ResourceEditFlow.test.js +18 -31
- package/src/react-extension/components/Resource/HandlePermissionWorkflow/flows/ResourceShareFlow.test.js +40 -49
- package/src/react-extension/components/Share/ShareDialog.js +15 -12
- package/src/react-extension/components/Share/ShareDialog.test.data.js +56 -8
- package/src/react-extension/components/Share/ShareDialog.test.js +14 -4
- package/src/react-extension/contexts/WorkflowContext.js +4 -0
- package/src/shared/models/entity/groupUser/groupUserEntity.js +52 -6
- package/src/shared/models/entity/groupUser/groupUserEntity.test.data.js +5 -0
- package/src/shared/models/entity/groupUser/groupUserEntity.test.js +54 -0
- package/src/shared/services/permission/permissionSnapshotService.js +71 -45
- package/src/shared/services/permission/permissionSnapshotService.test.js +161 -82
- package/src/shared/services/serviceWorker/group/groupServiceWorkerService.js +6 -18
- package/src/shared/services/serviceWorker/group/groupServiceWorkerService.test.js +13 -27
- package/src/shared/services/serviceWorker/permission/permissionServiceWorkerService.js +10 -0
- package/src/shared/services/serviceWorker/permission/permissionServiceWorkerService.test.js +21 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see api-recover.js.LICENSE.txt */
|
|
2
|
-
(()=>{"use strict";var e,t={8286(e,t,r){var n=r(6540),s=r(5338);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},a.apply(null,arguments)}const o=n.createContext({user:null,users:null,roles:null,rememberMeOptions:{},resources:null,resource:null,shareResources:null,selectedResources:null,selectedUser:null,folders:null,resourceCommentId:null,mustRefreshComments:!1,siteSettings:null,userSettings:null,onCheckIsAuthenticatedRequested:null});function i(e){return class extends n.Component{render(){return n.createElement(o.Consumer,null,t=>n.createElement(e,a({context:t},this.props)))}}}const l=o;var c=r(5556),h=r.n(c);class d extends Error{constructor(e,t){super(e),this.name="PassboltApiFetchError",this.data=t||{}}}const p=d;class u extends Error{constructor(){super("An internal error occurred. The server response could not be parsed. Please contact your administrator."),this.name="PassboltBadResponseError"}}const m=u;class E extends Error{constructor(e){super(e=e||"The service is unavailable"),this.name="PassboltServiceUnavailableError"}}const f=E,g=["GET","POST","PUT","DELETE"];class y{constructor(e){if(this.options=e,!this.options.getBaseUrl())throw new TypeError("ApiClient constructor error: baseUrl is required.");if(!this.options.getResourceName())throw new TypeError("ApiClient constructor error: resourceName is required.");try{let e=this.options.getBaseUrl().toString();e.endsWith("/")&&(e=e.slice(0,-1));let t=this.options.getResourceName();t.startsWith("/")&&(t=t.slice(1)),t.endsWith("/")&&(t=t.slice(0,-1)),this.baseUrl=`${e}/${t}`,this.baseUrl=new URL(this.baseUrl)}catch(e){throw new TypeError("ApiClient constructor error: b.",{cause:e})}this.apiVersion="api-version=v2"}getDefaultHeaders(){return{Accept:"application/json","content-type":"application/json"}}async buildFetchOptions(){const e=await this.options.getHeaders();return{credentials:"include",headers:{...this.getDefaultHeaders(),...e}}}async get(e,t){this.assertValidId(e);const r=this.buildUrl(`${this.baseUrl}/${e}`,t||{});return this.fetchAndHandleResponse("GET",r)}async delete(e,t,r,n){let s;this.assertValidId(e),void 0===n&&(n=!1),s=n?this.buildUrl(`${this.baseUrl}/${e}/dry-run`,r||{}):this.buildUrl(`${this.baseUrl}/${e}`,r||{});let a=null;return t&&(a=this.buildBody(t)),this.fetchAndHandleResponse("DELETE",s,a)}async findAll(e){const t=this.buildUrl(this.baseUrl.toString(),e||{});return this.fetchAndHandleResponse("GET",t)}async create(e,t){const r=this.buildUrl(this.baseUrl.toString(),t||{}),n=this.buildBody(e);return this.fetchAndHandleResponse("POST",r,n)}async update(e,t,r,n){let s;this.assertValidId(e),void 0===n&&(n=!1),s=n?this.buildUrl(`${this.baseUrl}/${e}/dry-run`,r||{}):this.buildUrl(`${this.baseUrl}/${e}`,r||{});let a=null;return t&&(a=this.buildBody(t)),this.fetchAndHandleResponse("PUT",s,a)}async updateAll(e,t={}){const r=this.buildUrl(this.baseUrl.toString(),t),n=e?this.buildBody(e):null;return this.fetchAndHandleResponse("PUT",r,n)}assertValidId(e){if(!e)throw new TypeError("ApiClient.assertValidId error: id cannot be empty");if("string"!=typeof e)throw new TypeError("ApiClient.assertValidId error: id should be a string")}assertMethod(e){if("string"!=typeof e)throw new TypeError("ApiClient.assertValidMethod method should be a string.");if(g.indexOf(e.toUpperCase())<0)throw new TypeError(`ApiClient.assertValidMethod error: method ${e} is not supported.`)}assertUrl(e){if(!e)throw new TypeError("ApliClient.assertUrl error: url is required.");if(!(e instanceof URL))throw new TypeError("ApliClient.assertUrl error: url should be a valid URL object.");if("https:"!==e.protocol&&"http:"!==e.protocol)throw new TypeError("ApliClient.assertUrl error: url protocol should only be https or http.")}assertBody(e){if(!(e instanceof FormData)&&"string"!=typeof e)throw new TypeError("ApiClient.assertBody error: body should be a string or a FormData.")}buildBody(e){return JSON.stringify(e)}buildUrl(e,t){if("string"!=typeof e)throw new TypeError("ApiClient.buildUrl error: url should be a string.");const r=new URL(`${e}.json?${this.apiVersion}`);t=t||{};for(const[e,n]of Object.entries(t)){if("string"!=typeof e)throw new TypeError("ApiClient.buildUrl error: urlOptions key should be a string.");if("string"==typeof n)r.searchParams.append(e,n);else{if(!Array.isArray(n))throw new TypeError("ApiClient.buildUrl error: urlOptions value should be a string or array.");n.forEach(t=>{r.searchParams.append(e,t)})}}return r}async sendRequest(e,t,r,n){this.assertUrl(t),this.assertMethod(e),r&&this.assertBody(r);const s="undefined"!=typeof customApiClientFetch?customApiClientFetch:fetch,a={...await this.buildFetchOptions(),...n};a.method=e,r&&(a.body=r);try{return await s(t.toString(),a)}catch(e){throw console.error(e),navigator.onLine?new f("Unable to reach the server, an unexpected error occurred"):new f("Unable to reach the server, you are not connected to the network")}}async fetchAndHandleResponse(e,t,r,n){const s=await this.sendRequest(e,t,r,n);return this.parseResponseJson(s)}async parseResponseJson(e){let t;try{t=await e.json()}catch(t){throw console.debug(e.url.toString(),t),new m(t,e)}if(!e.ok){const r=t.header.message;throw new p(r,{code:e.status,body:t.body})}return t}}const v="chrome",w="edge",b="firefox",x="safari";function S(){const e=window.navigator.userAgent.toLowerCase();let t;return t=e.indexOf("firefox")>-1?b:e.indexOf("samsungbrowser")>-1?"samsung":e.indexOf("opera")>-1||e.indexOf("opr")>-1?"opera":e.indexOf("trident")>-1?"internet-explorer":e.indexOf("edg")>-1?w:e.indexOf("chrome")>-1?v:e.indexOf("safari")>-1?x:"unknown",t}const T=class{constructor(e){e.setResourceName("auth"),this.apiClient=new y(e)}async logout(){const e=this.apiClient.buildUrl(`${this.apiClient.baseUrl}/logout`,{}),t=await this.apiClient.sendRequest("POST",e,null,{redirect:"manual"});if(!t.ok&&0!==t.status)return this._logoutLegacy()}async _logoutLegacy(){const e=this.apiClient.buildUrl(`${this.apiClient.baseUrl}/logout`,{}),t=await this.apiClient.sendRequest("GET",e,null,{redirect:"manual"});if(!t.ok&&0!==t.status)throw new p("An unexpected error happened during the legacy logout process",{code:t.status})}};class C{static reload(){window.location.reload()}}function _(){return _=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_.apply(null,arguments)}const q=n.createContext({userId:null,token:null,state:null,unexpectedError:null,onInitializeRecoverRequested:()=>{},logoutUserAndRefresh:()=>{}});class k extends n.Component{constructor(e){super(e),this.state=Object.assign(this.defaultState,e.value),this.authLogoutService=new T(e.context.getApiClientOptions())}get defaultState(){return{userId:null,token:null,state:I.INITIAL_STATE,unexpectedError:null,onInitializeRecoverRequested:this.onInitializeRecoverRequested.bind(this),logoutUserAndRefresh:this.logoutUserAndRefresh.bind(this),handleSafariExtensionDownloading:this.handleSafariExtensionDownloading.bind(this),handleSafariExtensionNotDownloaded:this.handleSafariExtensionNotDownloaded.bind(this),handleExtensionAlreadyInstalled:this.handleExtensionAlreadyInstalled.bind(this)}}async onInitializeRecoverRequested(){return this.state.userId&&this.state.token?this.isBrowserSupported()?void await this.startRecover().then(this.handleStartRecoverSuccess.bind(this)).catch(this.handleStartRecoverError.bind(this)):this.setState({state:I.DOWNLOAD_SUPPORTED_BROWSER_STATE}):this.setState({state:I.REQUEST_INVITATION_ERROR})}handleStartRecoverSuccess(){const e=S()===x?I.INSTALL_SAFARI_EXTENSION_STATE:I.INSTALL_EXTENSION_STATE;this.setState({state:e})}handleSafariExtensionDownloading(){const e=I.CONFIGURE_SAFARI_EXTENSION_STATE;this.setState({state:e})}handleSafariExtensionNotDownloaded(){const e=I.INSTALL_SAFARI_EXTENSION_STATE;this.setState({state:e})}handleExtensionAlreadyInstalled(){const e=I.CONFIGURE_SAFARI_EXTENSION_STATE;this.setState({state:e})}handleStartRecoverError(e){if(e instanceof p){if(403===e.data.code)return this.setState({state:I.ERROR_ALREADY_SIGNED_IN_STATE});const t=Boolean(e.data.body?.token?.expired),r=Boolean(e.data.body?.token?.isActive);if(t||r)return this.setState({state:I.TOKEN_EXPIRED_STATE});if(400===e?.data?.code)return this.setState({state:I.REQUEST_INVITATION_ERROR})}return this.setState({state:I.UNEXPECTED_ERROR_STATE})}async logoutUserAndRefresh(){try{await this.authLogoutService.logout()}catch(e){const t=new f(e.message);return this.setState({unexpectedError:t,state:I.UNEXPECTED_ERROR_STATE})}C.reload()}isBrowserSupported(){const e=S(),t=[v,b,w];return this.props.context.siteSettings.canIUse("safari")&&t.push(x),t.includes(e)}async startRecover(){const e=this.props.context.getApiClientOptions();e.setResourceName("setup");const t=new y(e);await t.get(`recover/${this.state.userId}/${this.state.token}`)}render(){return n.createElement(q.Provider,{value:this.state},this.props.children)}}k.propTypes={context:h().any,value:h().any,children:h().any};const A=i(k);function O(e){return class extends n.Component{render(){return n.createElement(q.Consumer,null,t=>n.createElement(e,_({apiRecoverContext:t},this.props)))}}}const I={INITIAL_STATE:"Initial state",DOWNLOAD_SUPPORTED_BROWSER_STATE:"Download supported browser state",INSTALL_EXTENSION_STATE:"Install extension state",INSTALL_SAFARI_EXTENSION_STATE:"Install Safari extension state",CONFIGURE_SAFARI_EXTENSION_STATE:"Configure Safari extension state",TOKEN_EXPIRED_STATE:"Token expired state",ERROR_ALREADY_SIGNED_IN_STATE:"Error, already signed in state",REQUEST_INVITATION_ERROR:"Request inviration error state",UNEXPECTED_ERROR_STATE:"Unexpected error state"};var N,R,P=r(9762);function L(){return L=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},L.apply(null,arguments)}const D=function(e){return n.createElement("svg",L({width:18,height:18,fill:"none",className:"svg-icon spinner",viewBox:"0 0 18 18"},e),N||(N=n.createElement("circle",{id:"background",cx:8,cy:8,r:8,fill:"none",stroke:"var(--spinner-background)",strokeWidth:"var(--spinner-stroke-width)",transform:"translate(1 1)"})),R||(R=n.createElement("circle",{id:"loading",r:8,fill:"none",stroke:"var(--spinner-color)",strokeLinecap:"round",strokeWidth:"var(--spinner-stroke-width)",transform:"translate(9 9)"})))};class U extends n.Component{render(){return n.createElement("div",{className:"login-processing"},n.createElement("h1",null,this.props.title),n.createElement("div",{className:"processing-wrapper"},n.createElement(D,null)))}}U.propTypes={title:h().oneOfType([h().arrayOf(h().node),h().node,h().string])},U.defaultProps={title:n.createElement(P.x6,null,"Please wait...")};const $=(0,P.CI)("common")(U),V="https://download.passbolt.com/extension/chrome";class z extends n.Component{constructor(e){super(e),this.state=this.getDefaultState(),this.bindCallbacks()}getDefaultState(){const e=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";return{browserName:S(),theme:e}}bindCallbacks(){this.handleRefreshClick=this.handleRefreshClick.bind(this)}get browserStoreThumbnailUrl(){const e="dark"===this.state.theme?"white":"black";switch(this.state.browserName){case b:return`${this.props.context.trustedDomain}/img/third_party/FirefoxAMO_${e}.svg`;case w:return`${this.props.context.trustedDomain}/img/third_party/edge-addon-${e}.svg`;default:return`${this.props.context.trustedDomain}/img/third_party/ChromeWebStore_${e}.svg`}}get storeUrl(){switch(this.state.browserName){case v:return V;case b:return"https://addons.mozilla.org/firefox/addon/passbolt";case w:return"https://microsoftedge.microsoft.com/addons/detail/passbolt-extension/ljeppgjhohmhpbdhjjjbiflabdgfkhpo";default:return V}}get storeClassName(){return`browser-webstore ${this.state.browserName}`}handleRefreshClick(){C.reload()}render(){return n.createElement("div",{className:"install-extension"},n.createElement("h1",null,n.createElement(P.x6,null,"Please install the browser extension.")),n.createElement("p",null,n.createElement(P.x6,null,"Please download the browser extension and refresh this page to continue.")),this.state.browserName&&n.createElement("a",{href:this.storeUrl,className:this.storeClassName,target:"_blank",rel:"noopener noreferrer"},n.createElement("img",{src:this.browserStoreThumbnailUrl,alt:"browser store thumbnail"})),n.createElement("div",{className:"form-actions"},n.createElement("a",{href:this.storeUrl,className:"button primary big full-width",role:"button",target:"_blank",rel:"noopener noreferrer"},n.createElement(P.x6,null,"Download extension")),n.createElement("button",{className:"link",type:"button",onClick:this.handleRefreshClick},n.createElement(P.x6,null,"Refresh to detect extension"))))}}z.propTypes={context:h().any};const F=i((0,P.CI)("common")(z));class B extends n.Component{constructor(e){super(e),this.state=this.getDefaultState()}getDefaultState(){return{selectedBrowser:this.compatibleBrowserList[0]}}handleBrowserButtonClick(e){this.setState({selectedBrowser:e})}get compatibleBrowserList(){const e=[{name:"Mozilla Firefox",img:"firefox.svg",url:"https://www.mozilla.org/"},{name:"Google Chrome",img:"chrome.svg",url:"https://www.google.com/chrome/"},{name:"Microsoft Edge",img:"edge.svg",url:"https://www.microsoft.com/edge"},{name:"Brave",img:"brave.svg",url:"https://www.brave.com/"},{name:"Vivaldi",img:"vivaldi.svg",url:"https://www.vivaldi.com/"}];return this.props.context.siteSettings.canIUse("safari")&&e.push({name:"Safari",img:"safari.svg",url:"https://www.apple.com/safari/"}),e}render(){return n.createElement("div",{className:"browser-not-supported"},n.createElement("h1",null,n.createElement(P.x6,null,"Sorry, your browser is not supported.")),n.createElement("p",null,n.createElement(P.x6,null,"Please download one of these browsers to get started with passbolt:")),n.createElement("div",{className:"browser-button-list"},this.compatibleBrowserList.map((e,t)=>n.createElement("button",{key:t,className:"browser"+(e.name===this.state.selectedBrowser.name?" focused":""),target:"_blank",onClick:()=>this.handleBrowserButtonClick(e)},n.createElement("img",{src:`${this.props.context.trustedDomain}/img/third_party/${e.img}`})))),n.createElement("div",{className:"form-actions"},n.createElement("a",{href:this.state.selectedBrowser.url,rel:"noopener noreferrer",className:"button primary big full-width",role:"button",target:"_blank"},n.createElement(P.x6,null,"Download ",{browserName:this.state.selectedBrowser.name}))))}}B.propTypes={context:h().any};const M=i((0,P.CI)("common")(B));class j extends n.Component{render(){return n.createElement("div",{className:"setup-error"},n.createElement("h1",null,n.createElement(P.x6,null,"Access to this service requires an invitation.")),n.createElement("p",null,n.createElement(P.x6,null,"This email is not associated with any approved users on this domain.")," ",n.createElement(P.x6,null,"Please contact your administrator to request an invitation link.")),n.createElement("div",{className:"form-actions"},n.createElement("a",{href:`${this.props.context.trustedDomain}/users/recover`,className:"button primary big full-width",role:"button",rel:"noopener noreferrer"},n.createElement(P.x6,null,"Try with another email"))))}}j.propTypes={context:h().any};const H=i((0,P.CI)("common")(j));class W extends n.Component{render(){return n.createElement("div",{className:"setup-error"},n.createElement("h1",null,n.createElement(P.x6,null,"The invitation is expired.")),n.createElement("p",null,n.createElement(P.x6,null,"You can request another invitation email by clicking on the button below.")),n.createElement("div",{className:"form-actions"},n.createElement("a",{href:`${this.props.context.trustedDomain}/users/recover`,className:"button primary big full-width",role:"button",rel:"noopener noreferrer"},n.createElement(P.x6,null,"Request invitation"))))}}W.propTypes={context:h().any};const G=i((0,P.CI)("common")(W)),Z="setup",X="recover",J="account-recovery";class K extends n.Component{render(){return n.createElement("div",{className:"setup-error"},n.createElement("h1",null,n.createElement(P.x6,null,"Cannot perform the action while being logged in")),n.createElement("p",null,{[Z]:n.createElement(P.x6,null,"It is not possible to perform a setup of a new account as you are still logged in. You need to log out first before continuing."),[X]:n.createElement(P.x6,null,"It is not possible to perform the recovery of your account as you are still logged in. You need to log out first before continuing."),[J]:n.createElement(P.x6,null,"It is not possible to recover your private key of your account as you are still logged in. You need to log out first before continuing.")}[this.props.displayAs]),n.createElement("div",{className:"form-actions"},n.createElement("button",{onClick:this.props.onLogoutButtonClick.bind(this),className:"button primary big full-width",role:"button"},n.createElement(P.x6,null,"Sign out"))))}}K.propTypes={displayAs:h().oneOf([Z,X,J]).isRequired,onLogoutButtonClick:h().func.isRequired};const Y=(0,P.CI)("common")(K);var Q;function ee(){return ee=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ee.apply(null,arguments)}const te=function(e){return n.createElement("svg",ee({xmlns:"http://www.w3.org/2000/svg",width:10,height:8,fill:"none",viewBox:"0 0 10 8"},e),Q||(Q=n.createElement("path",{stroke:"var(--icon-color)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"m1 2 4 4 4-4"})))};var re;function ne(){return ne=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ne.apply(null,arguments)}const se=function(e){return n.createElement("svg",ne({xmlns:"http://www.w3.org/2000/svg",width:8,height:10,fill:"none",viewBox:"0 0 8 10"},e),re||(re=n.createElement("path",{stroke:"var(--icon-color)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"m2 9 4-4-4-4"})))};class ae extends n.Component{constructor(e){super(e),this.state=this.defaultState,this.bindCallbacks()}get defaultState(){return{showErrorDetails:!1}}bindCallbacks(){this.handleErrorDetailsToggle=this.handleErrorDetailsToggle.bind(this)}onClick(){this.props.context.port?this.props.context.port.request("passbolt.tab.reload"):C.reload()}handleErrorDetailsToggle(){this.setState({showErrorDetails:!this.state.showErrorDetails})}get hasErrorDetails(){const e=this.props?.error;return Boolean(e?.details)||Boolean(e?.data?.body)}formatErrors(){const e=this.props.error?.details||this.props.error?.data;return JSON.stringify(e,null,4)}render(){return n.createElement("div",{className:"setup-error"},n.createElement("h1",null,this.props.title),n.createElement("p",null,this.props.message),n.createElement("p",null,this.props.error&&this.props.error.message),this.hasErrorDetails&&n.createElement("div",{className:"accordion error-details"},n.createElement("div",{className:"accordion-header"},n.createElement("button",{className:"no-border",type:"button",onClick:this.handleErrorDetailsToggle},this.state.showErrorDetails?n.createElement(te,{className:"caret-down"}):n.createElement(se,{className:"caret-right"}),n.createElement("span",null,n.createElement(P.x6,null,"Error details")))),this.state.showErrorDetails&&n.createElement("div",{className:"accordion-content"},n.createElement("div",{className:"input text"},n.createElement("label",{htmlFor:"js_field_debug",className:"visuallyhidden"},n.createElement(P.x6,null,"Error details")),n.createElement("textarea",{id:"js_field_debug",defaultValue:`${this.formatErrors()}`,readOnly:!0})))),n.createElement("div",{className:"form-actions"},n.createElement("button",{onClick:this.onClick.bind(this),className:"button primary big full-width",role:"button"},n.createElement(P.x6,null,"Try again"))))}}ae.defaultProps={title:n.createElement(P.x6,null,"Something went wrong!"),message:n.createElement(P.x6,null,"The operation failed with the following error:")},ae.propTypes={context:h().any,title:h().oneOfType([h().arrayOf(h().node),h().node,h().string]),message:h().oneOfType([h().arrayOf(h().node),h().node,h().string]),error:h().any};const oe=i((0,P.CI)("common")(ae));var ie,le;function ce(){return ce=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ce.apply(null,arguments)}const he=function(e){return n.createElement("svg",ce({xmlns:"http://www.w3.org/2000/svg",id:"livetype",viewBox:"0 0 119.664 40"},e),ie||(ie=n.createElement("title",null,"Download_on_the_App_Store_Badge_US-UK_RGB_blk_4SVG_092917")),n.createElement("path",{d:"M110.135 0H9.535Q8.986 0 8.44.002q-.457.004-.919.013A13 13 0 0 0 5.517.19a6.7 6.7 0 0 0-1.9.627 6.4 6.4 0 0 0-1.62 1.18A6.3 6.3 0 0 0 .82 3.617a6.6 6.6 0 0 0-.625 1.903 13 13 0 0 0-.179 2.002c-.01.307-.01.615-.015.921V31.56c.005.31.006.61.015.921a13 13 0 0 0 .18 2.002 6.6 6.6 0 0 0 .624 1.905A6.2 6.2 0 0 0 1.998 38a6.3 6.3 0 0 0 1.618 1.179 6.7 6.7 0 0 0 1.901.63 13.5 13.5 0 0 0 2.004.177c.31.007.613.011.919.011.366.002.728.002 1.095.002h100.6c.36 0 .724 0 1.084-.002.304 0 .617-.004.922-.01a13 13 0 0 0 2-.178 6.8 6.8 0 0 0 1.908-.63A6.3 6.3 0 0 0 117.666 38a6.4 6.4 0 0 0 1.182-1.614 6.6 6.6 0 0 0 .619-1.905 13.5 13.5 0 0 0 .185-2.002c.004-.31.004-.61.004-.921.008-.364.008-.725.008-1.094V9.536q.002-.549-.008-1.092.001-.46-.004-.92a13.5 13.5 0 0 0-.185-2.003 6.6 6.6 0 0 0-.62-1.903 6.47 6.47 0 0 0-2.798-2.8 6.8 6.8 0 0 0-1.908-.627 13 13 0 0 0-2-.176c-.305-.005-.618-.011-.922-.013-.36-.002-.725-.002-1.084-.002Z",style:{fill:"#a6a6a6"}}),le||(le=n.createElement("path",{d:"M8.445 39.125c-.305 0-.602-.004-.904-.01a13 13 0 0 1-1.87-.164 5.9 5.9 0 0 1-1.656-.548 5.4 5.4 0 0 1-1.397-1.016 5.3 5.3 0 0 1-1.02-1.397 5.7 5.7 0 0 1-.544-1.657 12.4 12.4 0 0 1-.166-1.875c-.007-.21-.015-.913-.015-.913v-23.1s.009-.692.015-.895a12.4 12.4 0 0 1 .165-1.872 5.8 5.8 0 0 1 .544-1.662 5.4 5.4 0 0 1 1.015-1.398 5.6 5.6 0 0 1 1.402-1.023 5.8 5.8 0 0 1 1.653-.544A12.6 12.6 0 0 1 7.543.887l.902-.012h102.769l.913.013a12.4 12.4 0 0 1 1.858.162 6 6 0 0 1 1.671.548 5.6 5.6 0 0 1 2.415 2.42 5.8 5.8 0 0 1 .535 1.649 13 13 0 0 1 .174 1.887c.003.283.003.588.003.89.008.375.008.732.008 1.092v20.929c0 .363 0 .718-.008 1.075 0 .325 0 .623-.004.93a13 13 0 0 1-.17 1.853 5.7 5.7 0 0 1-.54 1.67 5.5 5.5 0 0 1-1.016 1.386 5.4 5.4 0 0 1-1.4 1.022 5.9 5.9 0 0 1-1.668.55 12.5 12.5 0 0 1-1.869.163c-.293.007-.6.011-.897.011l-1.084.002Z"})),n.createElement("g",{id:"_Group_","data-name":"<Group>"},n.createElement("g",{id:"_Group_2","data-name":"<Group>"},n.createElement("g",{id:"_Group_3","data-name":"<Group>"},n.createElement("path",{id:"_Path_",d:"M24.769 20.3a4.95 4.95 0 0 1 2.356-4.151 5.07 5.07 0 0 0-3.99-2.158c-1.68-.176-3.308 1.005-4.164 1.005-.872 0-2.19-.988-3.608-.958a5.32 5.32 0 0 0-4.473 2.728c-1.934 3.348-.491 8.269 1.361 10.976.927 1.325 2.01 2.805 3.428 2.753 1.387-.058 1.905-.885 3.58-.885 1.658 0 2.144.885 3.59.852 1.489-.025 2.426-1.332 3.32-2.67a11 11 0 0 0 1.52-3.092 4.78 4.78 0 0 1-2.92-4.4","data-name":"<Path>",style:{fill:"#fff"}}),n.createElement("path",{id:"_Path_2",d:"M22.037 12.21a4.87 4.87 0 0 0 1.115-3.49 4.96 4.96 0 0 0-3.208 1.66A4.64 4.64 0 0 0 18.8 13.74a4.1 4.1 0 0 0 3.237-1.53","data-name":"<Path>",style:{fill:"#fff"}}))),n.createElement("path",{d:"M42.302 27.14H37.57l-1.137 3.356h-2.005l4.484-12.418h2.083l4.483 12.418h-2.039Zm-4.243-1.55h3.752l-1.85-5.446h-.051ZM55.16 25.97c0 2.813-1.506 4.62-3.779 4.62a3.07 3.07 0 0 1-2.848-1.583h-.043v4.484H46.63V21.442h1.8v1.506h.033a3.21 3.21 0 0 1 2.883-1.6c2.298 0 3.813 1.816 3.813 4.622m-1.91 0c0-1.833-.948-3.038-2.393-3.038-1.42 0-2.375 1.23-2.375 3.038 0 1.824.955 3.046 2.375 3.046 1.445 0 2.393-1.197 2.393-3.046M65.125 25.97c0 2.813-1.506 4.62-3.779 4.62a3.07 3.07 0 0 1-2.848-1.583h-.043v4.484h-1.859V21.442h1.799v1.506h.034a3.21 3.21 0 0 1 2.883-1.6c2.298 0 3.813 1.816 3.813 4.622m-1.91 0c0-1.833-.948-3.038-2.393-3.038-1.42 0-2.375 1.23-2.375 3.038 0 1.824.955 3.046 2.375 3.046 1.445 0 2.392-1.197 2.392-3.046M71.71 27.036c.138 1.232 1.334 2.04 2.97 2.04 1.566 0 2.693-.808 2.693-1.919 0-.964-.68-1.54-2.29-1.936l-1.609-.388c-2.28-.55-3.339-1.617-3.339-3.348 0-2.142 1.867-3.614 4.519-3.614 2.624 0 4.423 1.472 4.483 3.614h-1.876c-.112-1.239-1.136-1.987-2.634-1.987s-2.521.757-2.521 1.858c0 .878.654 1.395 2.255 1.79l1.368.336c2.548.603 3.606 1.626 3.606 3.443 0 2.323-1.85 3.778-4.793 3.778-2.754 0-4.614-1.42-4.734-3.667ZM83.346 19.3v2.142h1.722v1.472h-1.722v4.991c0 .776.345 1.137 1.102 1.137a6 6 0 0 0 .611-.043v1.463a5 5 0 0 1-1.032.086c-1.833 0-2.548-.689-2.548-2.445v-5.189h-1.316v-1.472h1.316V19.3ZM86.065 25.97c0-2.849 1.678-4.639 4.294-4.639 2.625 0 4.295 1.79 4.295 4.639 0 2.856-1.661 4.638-4.295 4.638s-4.294-1.782-4.294-4.638m6.695 0c0-1.954-.895-3.108-2.401-3.108s-2.4 1.162-2.4 3.108c0 1.962.894 3.106 2.4 3.106s2.401-1.144 2.401-3.106M96.186 21.442h1.773v1.541h.043a2.16 2.16 0 0 1 2.177-1.635 3 3 0 0 1 .637.069v1.738a2.6 2.6 0 0 0-.835-.112 1.873 1.873 0 0 0-1.937 2.083v5.37h-1.858ZM109.384 27.837c-.25 1.643-1.85 2.771-3.898 2.771-2.634 0-4.269-1.764-4.269-4.595 0-2.84 1.644-4.682 4.19-4.682 2.506 0 4.08 1.72 4.08 4.466v.637h-6.394v.112a2.358 2.358 0 0 0 2.436 2.564 2.05 2.05 0 0 0 2.09-1.273Zm-6.282-2.702h4.526a2.177 2.177 0 0 0-2.22-2.298 2.29 2.29 0 0 0-2.306 2.298",style:{fill:"#fff"}})),n.createElement("g",{id:"_Group_4","data-name":"<Group>"},n.createElement("path",{d:"M37.826 8.731a2.64 2.64 0 0 1 2.808 2.965c0 1.906-1.03 3.002-2.808 3.002h-2.155V8.73Zm-1.228 5.123h1.125a1.876 1.876 0 0 0 1.967-2.146 1.88 1.88 0 0 0-1.967-2.134h-1.125ZM41.68 12.444a2.133 2.133 0 1 1 4.248 0 2.134 2.134 0 1 1-4.247 0m3.334 0c0-.976-.439-1.547-1.208-1.547-.773 0-1.207.571-1.207 1.547 0 .984.434 1.55 1.207 1.55.77 0 1.208-.57 1.208-1.55M51.573 14.698h-.922l-.93-3.317h-.07l-.927 3.317h-.913l-1.242-4.503h.902l.806 3.436h.067l.926-3.436h.852l.926 3.436h.07l.803-3.436h.889ZM53.854 10.195h.855v.715h.066a1.35 1.35 0 0 1 1.344-.802 1.465 1.465 0 0 1 1.559 1.675v2.915h-.889v-2.692c0-.724-.314-1.084-.972-1.084a1.033 1.033 0 0 0-1.075 1.141v2.635h-.888ZM59.094 8.437h.888v6.26h-.888ZM61.218 12.444a2.133 2.133 0 1 1 4.247 0 2.134 2.134 0 1 1-4.247 0m3.333 0c0-.976-.439-1.547-1.208-1.547-.773 0-1.207.571-1.207 1.547 0 .984.434 1.55 1.207 1.55.77 0 1.208-.57 1.208-1.55M66.4 13.424c0-.81.604-1.278 1.676-1.344l1.22-.07v-.389c0-.475-.315-.744-.922-.744-.497 0-.84.182-.939.5h-.86c.09-.773.818-1.27 1.84-1.27 1.128 0 1.765.563 1.765 1.514v3.077h-.855v-.633h-.07a1.52 1.52 0 0 1-1.353.707 1.36 1.36 0 0 1-1.501-1.348m2.895-.384v-.377l-1.1.07c-.62.042-.9.253-.9.65 0 .405.351.64.834.64a1.06 1.06 0 0 0 1.166-.983M71.348 12.444c0-1.423.732-2.324 1.87-2.324a1.48 1.48 0 0 1 1.38.79h.067V8.437h.888v6.26h-.851v-.71h-.07a1.56 1.56 0 0 1-1.415.785c-1.145 0-1.869-.901-1.869-2.328m.918 0c0 .955.45 1.53 1.203 1.53.75 0 1.212-.583 1.212-1.526 0-.938-.468-1.53-1.212-1.53-.748 0-1.203.58-1.203 1.526M79.23 12.444a2.133 2.133 0 1 1 4.247 0 2.134 2.134 0 1 1-4.247 0m3.333 0c0-.976-.438-1.547-1.208-1.547-.772 0-1.207.571-1.207 1.547 0 .984.435 1.55 1.207 1.55.77 0 1.208-.57 1.208-1.55M84.67 10.195h.855v.715h.066a1.35 1.35 0 0 1 1.344-.802 1.465 1.465 0 0 1 1.559 1.675v2.915h-.889v-2.692c0-.724-.314-1.084-.972-1.084a1.033 1.033 0 0 0-1.075 1.141v2.635h-.889ZM93.515 9.074v1.141h.976v.749h-.976v2.315c0 .472.194.679.637.679a3 3 0 0 0 .339-.021v.74a3 3 0 0 1-.484.046c-.988 0-1.381-.348-1.381-1.216v-2.543h-.715v-.749h.715V9.074ZM95.705 8.437h.88v2.481h.07a1.39 1.39 0 0 1 1.374-.806 1.483 1.483 0 0 1 1.55 1.679v2.907h-.889V12.01c0-.72-.335-1.084-.963-1.084a1.052 1.052 0 0 0-1.134 1.142v2.63h-.888ZM104.761 13.482a1.83 1.83 0 0 1-1.95 1.303 2.045 2.045 0 0 1-2.081-2.325 2.077 2.077 0 0 1 2.076-2.352c1.253 0 2.009.856 2.009 2.27v.31h-3.18v.05a1.19 1.19 0 0 0 1.2 1.29 1.08 1.08 0 0 0 1.07-.546Zm-3.126-1.451h2.275a1.086 1.086 0 0 0-1.109-1.167 1.15 1.15 0 0 0-1.166 1.167",style:{fill:"#fff"}})))},de="https://apps.apple.com/app/6754879299";class pe extends n.Component{constructor(e){super(e),this.bindCallbacks()}bindCallbacks(){this.handleInstallExtensionClick=this.handleInstallExtensionClick.bind(this),this.handleAlreadyInstalledClick=this.handleAlreadyInstalledClick.bind(this)}handleAlreadyInstalledClick(){this.props.onExtensionAlreadyInstalled()}handleInstallExtensionClick(){this.props.onExtensionDownloading()}render(){return n.createElement("div",{className:"install-extension"},n.createElement("h1",null,n.createElement(P.x6,null,"Please install the browser extension (BETA).")),n.createElement("p",null,n.createElement(P.x6,null,"Please download the browser extension and refresh this page to continue.")),n.createElement("a",{href:de,className:"browser-webstore safari",target:"_blank",rel:"noopener noreferrer",onClick:this.handleInstallExtensionClick},n.createElement(he,null)),n.createElement("div",{className:"form-actions"},n.createElement("a",{href:de,className:"button primary big full-width",role:"button",target:"_blank",rel:"noopener noreferrer",onClick:this.handleInstallExtensionClick},n.createElement(P.x6,null,"Download extension")),n.createElement("button",{className:"link",type:"button",onClick:this.handleAlreadyInstalledClick},n.createElement(P.x6,null,"I already installed the extension"))))}}pe.propTypes={context:h().any,onExtensionDownloading:h().func,onExtensionAlreadyInstalled:h().func};const ue=i((0,P.CI)("common")(pe));var me,Ee,fe,ge,ye,ve,we,be,xe,Se,Te,Ce,_e,qe,ke,Ae,Oe,Ie,Ne,Re,Pe,Le;function De(){return De=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},De.apply(null,arguments)}const Ue=function(e){return n.createElement("svg",De({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 484 307"},e),me||(me=n.createElement("rect",{width:483,height:306,x:.5,y:.5,fill:"#EBEBEB",rx:16.3})),Ee||(Ee=n.createElement("rect",{width:483,height:306,x:.5,y:.5,stroke:"#F5F5F5",rx:16.3})),fe||(fe=n.createElement("circle",{cx:21.613,cy:18.2,r:4.594,fill:"#EE6B5F",stroke:"#E93F30",strokeWidth:.438})),ge||(ge=n.createElement("circle",{cx:36.487,cy:18.2,r:4.594,fill:"#F5BE50",stroke:"#F2AD21",strokeWidth:.438})),ye||(ye=n.createElement("circle",{cx:51.362,cy:18.2,r:4.594,fill:"#62C655",stroke:"#47AC3A",strokeWidth:.438})),ve||(ve=n.createElement("rect",{width:25.106,height:24.105,x:146.275,y:6.147,fill:"#FDFDFD",rx:12.053})),we||(we=n.createElement("rect",{width:25.106,height:24.105,x:146.275,y:6.147,stroke:"#FEFEFE",rx:12.053})),be||(be=n.createElement("path",{fill:"#272727",d:"m165.841 17.203-6.06-5.592a1.42 1.42 0 0 0-.951-.364c-.352 0-.691.13-.95.364l-3.803 3.524a3.4 3.4 0 0 1 1.306.858c.361.382.624.843.768 1.344h5.134a.49.49 0 0 1 .337.137.47.47 0 0 1 .138.33v.768a.47.47 0 0 1-.475.467h-.593v1.085a.46.46 0 0 1-.292.432.5.5 0 0 1-.182.036h-1.301a.48.48 0 0 1-.439-.289.5.5 0 0 1-.035-.178v-1.086h-2.292a3.2 3.2 0 0 1-.759 1.36 3.3 3.3 0 0 1-1.315.86l3.82 3.53a1.42 1.42 0 0 0 1.901 0l6.05-5.59a1.364 1.364 0 0 0-.007-1.996"})),xe||(xe=n.createElement("path",{fill:"#272727",d:"M152.951 16.66a1.7 1.7 0 0 0-.712.169c-.248.12-.459.304-.61.531a1.5 1.5 0 0 0-.076 1.543c.129.24.321.442.556.586a1.577 1.577 0 0 0 2.161-.518c.141-.234.216-.5.216-.772a1.47 1.47 0 0 0-.436-1.086 1.56 1.56 0 0 0-1.099-.453"})),Se||(Se=n.createElement("rect",{width:185.694,height:24.2,x:186.381,y:6.1,fill:"#FDFDFD",rx:12.1})),Te||(Te=n.createElement("rect",{width:185.694,height:24.2,x:186.381,y:6.1,stroke:"#FEFEFE",rx:12.1})),Ce||(Ce=n.createElement("mask",{id:"a",fill:"#fff"},n.createElement("path",{d:"M172.799 44.954a5.6 5.6 0 0 0 3.245 1.036h74.14c12.372 0 22.401 10.03 22.401 22.4v178.137c0 12.371-10.029 22.401-22.401 22.401H68.307c-12.372 0-22.4-10.03-22.4-22.401V68.391c0-12.372 10.028-22.4 22.4-22.4h74.139a5.6 5.6 0 0 0 3.245-1.037L156 37.625a5.6 5.6 0 0 1 6.49 0z"}))),_e||(_e=n.createElement("path",{fill:"#F8F8F8",d:"M172.799 44.954a5.6 5.6 0 0 0 3.245 1.036h74.14c12.372 0 22.401 10.03 22.401 22.4v178.137c0 12.371-10.029 22.401-22.401 22.401H68.307c-12.372 0-22.4-10.03-22.4-22.401V68.391c0-12.372 10.028-22.4 22.4-22.4h74.139a5.6 5.6 0 0 0 3.245-1.037L156 37.625a5.6 5.6 0 0 1 6.49 0z"})),qe||(qe=n.createElement("path",{fill:"#A9A9A9",d:"m145.691 44.954-.405-.57zm27.108 0 .405-.57zm3.245 1.036v.7h74.14v-1.4h-74.14zm74.14 0v.7c11.985 0 21.701 9.716 21.701 21.7h1.4c0-12.757-10.343-23.1-23.101-23.1zm22.401 22.4h-.7v178.137h1.4V68.391h-.7Zm0 178.137h-.7c0 11.985-9.716 21.701-21.701 21.701v1.4c12.758 0 23.101-10.343 23.101-23.101zm-22.401 22.401v-.7H68.307v1.4h181.877zm-181.877 0v-.7c-11.985 0-21.7-9.716-21.7-21.701h-1.4c0 12.758 10.342 23.101 23.1 23.101zm-22.4-22.401h.7V68.391h-1.4v178.136zm0-178.136h.7c0-11.985 9.715-21.7 21.7-21.7v-1.4c-12.758 0-23.1 10.342-23.1 23.1zm22.4-22.4v.7h74.139v-1.4h-74.14zm77.384-1.037.406.57 10.309-7.328-.406-.57-.405-.571-10.309 7.329zm16.799-7.329-.406.57 10.309 7.33.406-.57.405-.571-10.309-7.33zm-20.044 8.365v.7a6.3 6.3 0 0 0 3.651-1.165l-.406-.57-.405-.571a4.9 4.9 0 0 1-2.84.906zM156 37.625l.406.57a4.9 4.9 0 0 1 5.678 0l.406-.57.405-.57a6.3 6.3 0 0 0-7.3 0zm20.044 8.365v-.7a4.9 4.9 0 0 1-2.84-.906l-.405.57-.406.57a6.3 6.3 0 0 0 3.651 1.166z",mask:"url(#safari_quickaccess_configuration_light_svg__a)"})),ke||(ke=n.createElement("path",{stroke:"#000",strokeLinecap:"round",strokeOpacity:.1,strokeWidth:7.388,d:"M72.024 63.89h174.452m-164.46 11.2h154.467m-127.822 11.2h101.178"})),Ae||(Ae=n.createElement("path",{stroke:"#000",strokeLinecap:"round",strokeOpacity:.1,strokeWidth:3.694,d:"M72.024 108.689h174.452M108.661 119.89h101.178M72.024 131.089h174.452M82.016 142.29h154.467m-127.822 11.199h101.178"})),Oe||(Oe=n.createElement("g",{opacity:.5},n.createElement("rect",{width:191.8,height:22.4,x:63.35,y:175.89,fill:"#3D76F9",rx:11.2}),n.createElement("path",{stroke:"#000",strokeLinecap:"round",strokeOpacity:.25,strokeWidth:2.8,d:"M130.051 187.089h58.398"}))),Ie||(Ie=n.createElement("g",{opacity:.5},n.createElement("rect",{width:191.8,height:22.4,x:63.35,y:203.89,fill:"#C5C5C5",rx:11.2}),n.createElement("path",{stroke:"#000",strokeLinecap:"round",strokeOpacity:.25,strokeWidth:2.8,d:"M130.051 215.089h58.398"}))),Ne||(Ne=n.createElement("rect",{width:191.8,height:22,x:63.35,y:231.89,fill:"#E4E4E4",rx:11})),Re||(Re=n.createElement("rect",{width:191.8,height:22,x:63.35,y:231.89,stroke:"#D40101",strokeWidth:3,rx:11})),Pe||(Pe=n.createElement("path",{fill:"#000",d:"M82.929 246.89h-.923l2.67-7.273h.91l2.67 7.273h-.924l-2.173-6.123h-.057zm.34-2.841h3.722v.781H83.27zm6.844-4.432v7.273h-.838v-7.273zm2.77 7.273-1.661-5.455h.88l1.18 4.176h.056l1.165-4.176h.895l1.15 4.162h.057l1.18-4.162h.88l-1.662 5.455h-.824l-1.193-4.191h-.085l-1.193 4.191h-.824Zm8.495.127q-.519 0-.941-.195a1.6 1.6 0 0 1-.671-.572q-.249-.377-.249-.909 0-.468.185-.76.185-.294.493-.461.31-.167.682-.249.376-.085.757-.135.497-.063.806-.096.312-.034.454-.117.146-.081.146-.284v-.028q0-.526-.288-.817-.284-.291-.863-.291-.6 0-.941.263-.34.262-.479.561l-.795-.285q.212-.496.568-.774.358-.28.781-.39a3.2 3.2 0 0 1 .838-.114q.262 0 .604.064.344.06.664.252.323.192.536.579t.213 1.037v3.594h-.838v-.739h-.043a1.5 1.5 0 0 1-.284.38q-.198.203-.529.344-.33.142-.806.142m.128-.752q.497 0 .838-.196a1.32 1.32 0 0 0 .696-1.154v-.767q-.054.064-.234.117a4 4 0 0 1-.412.089 18 18 0 0 1-.803.107 3 3 0 0 0-.611.138 1.05 1.05 0 0 0-.454.281q-.171.184-.171.504 0 .436.323.66.327.22.828.221m4.246 2.67q-.213 0-.38-.035a1 1 0 0 1-.231-.064l.213-.739q.306.078.54.057a.65.65 0 0 0 .416-.21q.184-.184.337-.6l.156-.426-2.017-5.483h.909l1.506 4.347h.057l1.505-4.347h.91l-2.316 6.25a2.4 2.4 0 0 1-.387.7 1.45 1.45 0 0 1-.536.415q-.302.135-.682.135m8.89-6.278-.752.213a1.4 1.4 0 0 0-.21-.366 1 1 0 0 0-.369-.298 1.35 1.35 0 0 0-.6-.117q-.5 0-.835.23-.33.228-.33.579 0 .313.227.494.228.181.71.302l.81.198q.732.178 1.09.544.359.362.359.934 0 .469-.27.838-.267.369-.746.582a2.7 2.7 0 0 1-1.115.213q-.835 0-1.381-.362-.547-.362-.693-1.058l.796-.199q.113.441.429.66.32.22.835.221.587 0 .93-.249.348-.252.348-.604a.63.63 0 0 0-.199-.475q-.198-.196-.61-.292l-.909-.213q-.75-.178-1.101-.55-.348-.377-.348-.941 0-.462.259-.817.262-.355.714-.558a2.5 2.5 0 0 1 1.03-.202q.809 0 1.271.355.465.355.66.938m4.586 4.233h-.923l2.67-7.273h.909l2.671 7.273h-.924l-2.173-6.123h-.057zm.341-2.841h3.721v.781h-3.721zm6.843-4.432v7.273h-.838v-7.273zm2.373 0v7.273h-.838v-7.273zm3.751 7.386q-.74 0-1.296-.351a2.4 2.4 0 0 1-.867-.984q-.309-.632-.309-1.477 0-.852.309-1.488.312-.636.867-.987.557-.352 1.296-.352.738 0 1.292.352.558.351.867.987.312.636.312 1.488 0 .845-.312 1.477a2.36 2.36 0 0 1-.867.984q-.554.351-1.292.351m0-.753q.561 0 .923-.287a1.7 1.7 0 0 0 .536-.757q.174-.469.174-1.015a2.9 2.9 0 0 0-.174-1.019 1.7 1.7 0 0 0-.536-.764q-.362-.291-.923-.291c-.561 0-.682.097-.924.291q-.362.291-.536.764a2.9 2.9 0 0 0-.174 1.019q0 .546.174 1.015a1.7 1.7 0 0 0 .536.757q.363.288.924.287m4.801.64-1.662-5.455h.881l1.179 4.176h.056l1.165-4.176h.895l1.151 4.162h.056l1.179-4.162h.881l-1.662 5.455h-.824l-1.193-4.191h-.085l-1.193 4.191zm11.917.113q-.738 0-1.296-.351a2.4 2.4 0 0 1-.866-.984q-.309-.632-.309-1.477 0-.852.309-1.488.312-.636.866-.987.558-.352 1.296-.352.74 0 1.293.352.558.351.867.987.312.636.312 1.488 0 .845-.312 1.477a2.36 2.36 0 0 1-.867.984q-.554.351-1.293.351m0-.753q.561 0 .924-.287a1.7 1.7 0 0 0 .536-.757q.174-.469.174-1.015a2.9 2.9 0 0 0-.174-1.019 1.7 1.7 0 0 0-.536-.764q-.363-.291-.924-.291c-.561 0-.681.097-.923.291q-.362.291-.536.764a2.9 2.9 0 0 0-.174 1.019q0 .546.174 1.015a1.7 1.7 0 0 0 .536.757q.362.288.923.287m4.589-2.642v3.282h-.838v-5.455h.81v.852h.071q.192-.415.582-.667.391-.256 1.009-.256.553 0 .969.227.416.225.647.682.231.455.231 1.151v3.466h-.839v-3.409q0-.644-.333-1.002-.334-.362-.917-.362-.4 0-.717.174a1.24 1.24 0 0 0-.493.508 1.7 1.7 0 0 0-.182.809m7.938 3.282v-7.273h4.389v.781h-3.508v2.458h3.281v.781h-3.281v2.471h3.565v.782zm10.323-5.455-2.017 5.455h-.852l-2.017-5.455h.909l1.506 4.347h.056l1.506-4.347zm3.198 5.568q-.789 0-1.36-.348a2.33 2.33 0 0 1-.877-.98q-.306-.632-.306-1.47t.306-1.477q.309-.644.859-1.002.554-.362 1.293-.362.426 0 .841.142.416.143.757.462.34.316.543.838t.203 1.285v.355h-4.205v-.724h3.352a1.8 1.8 0 0 0-.184-.824 1.4 1.4 0 0 0-.519-.572 1.46 1.46 0 0 0-.788-.209q-.501 0-.867.249a1.63 1.63 0 0 0-.557.639q-.195.393-.196.845v.483q0 .618.214 1.047.216.427.6.65.382.22.891.22.33 0 .597-.092.27-.096.465-.284a1.3 1.3 0 0 0 .302-.476l.809.227a1.8 1.8 0 0 1-.429.725q-.303.309-.746.483-.444.17-.998.17m3.533-.113v-5.455h.81v.824h.057q.148-.405.54-.657.39-.252.88-.252l.231.003q.138.004.21.011v.852a3 3 0 0 0-.512-.056q-.398 0-.71.166a1.23 1.23 0 0 0-.668 1.112v3.452zm4.427 2.045q-.213 0-.38-.035a1 1 0 0 1-.231-.064l.213-.739q.306.078.54.057a.64.64 0 0 0 .415-.21q.185-.184.338-.6l.156-.426-2.017-5.483h.909l1.506 4.347h.057l1.505-4.347h.909l-2.315 6.25a2.4 2.4 0 0 1-.387.7 1.46 1.46 0 0 1-.536.415q-.303.135-.682.135m9.274-2.045-1.989-7.273h.895l1.52 5.923h.071l1.548-5.923h.994l1.549 5.923h.071l1.52-5.923h.895l-1.989 7.273h-.909l-1.605-5.796h-.057l-1.605 5.796zm9.836.113q-.788 0-1.36-.348a2.33 2.33 0 0 1-.877-.98q-.305-.632-.305-1.47t.305-1.477q.31-.644.859-1.002.555-.362 1.293-.362.426 0 .842.142.415.143.756.462.341.316.543.838.203.522.203 1.285v.355h-4.205v-.724h3.353q0-.462-.185-.824a1.4 1.4 0 0 0-.519-.572 1.46 1.46 0 0 0-.788-.209q-.501 0-.866.249a1.6 1.6 0 0 0-.558.639q-.195.393-.195.845v.483q0 .618.213 1.047.216.427.6.65.384.22.891.22.33 0 .597-.092.27-.096.465-.284a1.3 1.3 0 0 0 .302-.476l.81.227a1.8 1.8 0 0 1-.43.725q-.302.309-.746.483-.443.17-.998.17m3.647-.113v-7.273h.838v2.685h.071q.093-.142.256-.363.167-.223.476-.397.312-.178.845-.178.689 0 1.215.345.525.344.82.976.294.633.295 1.492 0 .866-.295 1.502a2.33 2.33 0 0 1-.817.98 2.14 2.14 0 0 1-1.204.344q-.525 0-.841-.174a1.6 1.6 0 0 1-.487-.401 6 6 0 0 1-.263-.376h-.099v.838zm.824-2.728q0 .618.181 1.091.181.468.529.735.349.262.853.262.525 0 .877-.277a1.7 1.7 0 0 0 .533-.752q.18-.476.181-1.059 0-.575-.178-1.037a1.6 1.6 0 0 0-.529-.735q-.351-.273-.884-.273-.512 0-.86.259-.348.256-.525.717a2.9 2.9 0 0 0-.178 1.069m9.137-1.505-.753.213a1.4 1.4 0 0 0-.209-.366 1 1 0 0 0-.369-.298 1.35 1.35 0 0 0-.601-.117q-.5 0-.834.23-.33.228-.33.579 0 .313.227.494t.71.302l.81.198q.732.178 1.09.544.359.362.359.934 0 .469-.27.838-.267.369-.746.582-.48.213-1.115.213-.835 0-1.381-.362-.548-.362-.693-1.058l.796-.199q.113.441.429.66.32.22.835.221.586 0 .93-.249.348-.252.348-.604a.63.63 0 0 0-.199-.475q-.199-.196-.61-.292l-.91-.213q-.749-.177-1.1-.55-.348-.377-.348-.941 0-.462.259-.817.262-.356.714-.558a2.5 2.5 0 0 1 1.029-.202q.81 0 1.272.355.465.355.66.938m1.361 4.233v-5.455h.838v5.455zm.426-6.364a.6.6 0 0 1-.422-.167.54.54 0 0 1-.174-.401q0-.234.174-.401a.6.6 0 0 1 .422-.167.58.58 0 0 1 .419.167.53.53 0 0 1 .178.401q0 .234-.178.401a.58.58 0 0 1-.419.167m4.319.909v.71h-2.826v-.71zm-2.002-1.307h.838v5.199q0 .355.103.533a.53.53 0 0 0 .27.234q.167.057.351.057.138 0 .227-.014l.142-.029.171.753a1.6 1.6 0 0 1-.238.064 1.7 1.7 0 0 1-.387.036q-.355 0-.696-.153a1.4 1.4 0 0 1-.561-.465q-.22-.313-.22-.789zm5.491 6.875q-.787 0-1.36-.348a2.34 2.34 0 0 1-.877-.98q-.305-.632-.305-1.47t.305-1.477q.31-.644.86-1.002.554-.362 1.292-.362.426 0 .842.142.416.143.756.462.342.316.544.838t.202 1.285v.355h-4.205v-.724h3.353q0-.462-.185-.824a1.4 1.4 0 0 0-.518-.572 1.46 1.46 0 0 0-.789-.209 1.5 1.5 0 0 0-.866.249 1.6 1.6 0 0 0-.558.639q-.195.393-.195.845v.483q0 .618.213 1.047.216.427.6.65.384.22.891.22.33 0 .597-.092.27-.096.465-.284a1.3 1.3 0 0 0 .302-.476l.81.227a1.8 1.8 0 0 1-.43.725q-.302.309-.746.483-.443.17-.998.17m4.145-.057a.61.61 0 0 1-.451-.188.61.61 0 0 1-.189-.451q0-.262.189-.451a.62.62 0 0 1 .451-.188q.262 0 .451.188a.62.62 0 0 1 .188.451.66.66 0 0 1-.32.554.6.6 0 0 1-.319.085m2.754 0a.61.61 0 0 1-.451-.188.61.61 0 0 1-.189-.451q0-.262.189-.451a.62.62 0 0 1 .451-.188q.262 0 .451.188a.62.62 0 0 1 .188.451.66.66 0 0 1-.32.554.6.6 0 0 1-.319.085m2.753 0a.61.61 0 0 1-.451-.188.62.62 0 0 1-.188-.451q0-.262.188-.451a.62.62 0 0 1 .451-.188q.264 0 .451.188a.62.62 0 0 1 .189.451.66.66 0 0 1-.32.554.6.6 0 0 1-.32.085"})),Le||(Le=n.createElement("path",{fill:"#D40101",d:"M362.322 245.635a2.8 2.8 0 0 0 0-5.6zm-96.363-4.78a2.8 2.8 0 0 0 0 3.96l17.819 17.819a2.801 2.801 0 0 0 3.96-3.96l-15.839-15.839 15.839-15.839a2.8 2.8 0 1 0-3.96-3.96zm96.363 1.98v-2.8h-94.383v5.6h94.383z"})))};var $e,Ve,ze,Fe,Be,Me,je,He,We,Ge,Ze,Xe,Je,Ke,Ye,Qe,et,tt,rt,nt,st,at;function ot(){return ot=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ot.apply(null,arguments)}const it=function(e){return n.createElement("svg",ot({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 484 307"},e),$e||($e=n.createElement("rect",{width:483,height:306,x:.5,y:.5,fill:"#232222",rx:16.3})),Ve||(Ve=n.createElement("rect",{width:483,height:306,x:.5,y:.5,stroke:"#4F4F4F",rx:16.3})),ze||(ze=n.createElement("circle",{cx:21.613,cy:18.2,r:4.594,fill:"#EE6B5F",stroke:"#E93F30",strokeWidth:.438})),Fe||(Fe=n.createElement("circle",{cx:36.487,cy:18.2,r:4.594,fill:"#F5BE50",stroke:"#F2AD21",strokeWidth:.438})),Be||(Be=n.createElement("circle",{cx:51.362,cy:18.2,r:4.594,fill:"#62C655",stroke:"#47AC3A",strokeWidth:.438})),Me||(Me=n.createElement("rect",{width:25.106,height:24.105,x:146.275,y:6.147,fill:"#2C2A2A",rx:12.053})),je||(je=n.createElement("rect",{width:25.106,height:24.105,x:146.275,y:6.147,stroke:"#474747",rx:12.053})),He||(He=n.createElement("path",{fill:"#DFE0E1",d:"m165.841 17.203-6.06-5.592a1.42 1.42 0 0 0-.951-.364c-.352 0-.691.13-.95.364l-3.803 3.524a3.4 3.4 0 0 1 1.306.858c.361.382.624.843.768 1.344h5.134a.49.49 0 0 1 .337.137.47.47 0 0 1 .138.33v.768a.47.47 0 0 1-.475.467h-.593v1.085a.46.46 0 0 1-.292.432.5.5 0 0 1-.182.036h-1.301a.48.48 0 0 1-.439-.289.5.5 0 0 1-.035-.178v-1.086h-2.292a3.2 3.2 0 0 1-.759 1.36 3.3 3.3 0 0 1-1.315.86l3.82 3.53a1.42 1.42 0 0 0 1.901 0l6.05-5.59a1.364 1.364 0 0 0-.007-1.996"})),We||(We=n.createElement("path",{fill:"#DFE0E1",d:"M152.951 16.66a1.7 1.7 0 0 0-.712.169c-.248.12-.459.304-.61.531a1.5 1.5 0 0 0-.076 1.543c.129.24.321.442.556.586a1.577 1.577 0 0 0 2.161-.518c.141-.234.216-.5.216-.772a1.47 1.47 0 0 0-.436-1.086 1.56 1.56 0 0 0-1.099-.453"})),Ge||(Ge=n.createElement("rect",{width:185.694,height:24.2,x:186.381,y:6.1,fill:"#2C2A2A",rx:12.1})),Ze||(Ze=n.createElement("rect",{width:185.694,height:24.2,x:186.381,y:6.1,stroke:"#474747",rx:12.1})),Xe||(Xe=n.createElement("mask",{id:"a",fill:"#fff"},n.createElement("path",{fillRule:"evenodd",d:"M172.799 44.954a5.6 5.6 0 0 0 3.245 1.036h74.14c12.372 0 22.401 10.03 22.401 22.4v178.137c0 12.372-10.029 22.401-22.401 22.401H68.307c-12.372 0-22.4-10.029-22.4-22.401V68.391c0-12.372 10.028-22.4 22.4-22.4h74.139a5.6 5.6 0 0 0 3.245-1.037L156 37.625a5.6 5.6 0 0 1 6.49 0z",clipRule:"evenodd"}))),Je||(Je=n.createElement("path",{fill:"#3B3C3F",fillRule:"evenodd",d:"M172.799 44.954a5.6 5.6 0 0 0 3.245 1.036h74.14c12.372 0 22.401 10.03 22.401 22.4v178.137c0 12.372-10.029 22.401-22.401 22.401H68.307c-12.372 0-22.4-10.029-22.4-22.401V68.391c0-12.372 10.028-22.4 22.4-22.4h74.139a5.6 5.6 0 0 0 3.245-1.037L156 37.625a5.6 5.6 0 0 1 6.49 0z",clipRule:"evenodd"})),Ke||(Ke=n.createElement("path",{fill:"#7E7F80",d:"m145.691 44.954-.405-.57zm27.108 0 .405-.57zm3.245 1.036v.7h74.14v-1.4h-74.14zm74.14 0v.7c11.985 0 21.701 9.716 21.701 21.7h1.4c0-12.757-10.343-23.1-23.101-23.1zm22.401 22.4h-.7v178.137h1.4V68.391h-.7Zm0 178.137h-.7c0 11.985-9.716 21.701-21.701 21.701v1.4c12.758 0 23.101-10.343 23.101-23.101zm-22.401 22.401v-.7H68.307v1.4h181.877zm-181.877 0v-.7c-11.985 0-21.7-9.716-21.7-21.701h-1.4c0 12.758 10.342 23.101 23.1 23.101zm-22.4-22.401h.7V68.391h-1.4v178.136zm0-178.136h.7c0-11.985 9.715-21.7 21.7-21.7v-1.4c-12.758 0-23.1 10.342-23.1 23.1zm22.4-22.4v.7h74.139v-1.4h-74.14zm77.384-1.037.406.57 10.309-7.328-.406-.57-.405-.571-10.309 7.329zm16.799-7.329-.406.57 10.309 7.33.406-.57.405-.571-10.309-7.33zm-20.044 8.365v.7a6.3 6.3 0 0 0 3.651-1.165l-.406-.57-.405-.571a4.9 4.9 0 0 1-2.84.906zM156 37.625l.406.57a4.9 4.9 0 0 1 5.678 0l.406-.57.405-.57a6.3 6.3 0 0 0-7.3 0zm20.044 8.365v-.7a4.9 4.9 0 0 1-2.84-.906l-.405.57-.406.57a6.3 6.3 0 0 0 3.651 1.166z",mask:"url(#safari_quickaccess_configuration_dark_svg__a)"})),Ye||(Ye=n.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeOpacity:.1,strokeWidth:7.388,d:"M72.024 63.89h174.452m-164.46 11.2h154.467m-127.822 11.2h101.178"})),Qe||(Qe=n.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeOpacity:.1,strokeWidth:3.694,d:"M72.024 108.689h174.452M108.661 119.89h101.178M72.024 131.089h174.452M82.016 142.29h154.467m-127.822 11.199h101.178"})),et||(et=n.createElement("g",{opacity:.5},n.createElement("rect",{width:191.8,height:22.4,x:63.35,y:175.89,fill:"#007CFF",rx:11.2}),n.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeWidth:2.8,d:"M130.051 187.089h58.398"}))),tt||(tt=n.createElement("g",{opacity:.5},n.createElement("rect",{width:191.8,height:22.4,x:63.35,y:203.89,fill:"#727273",rx:11.2}),n.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeWidth:2.8,d:"M130.051 215.089h58.398"}))),rt||(rt=n.createElement("rect",{width:191.8,height:22,x:63.35,y:231.89,fill:"#575759",rx:11})),nt||(nt=n.createElement("rect",{width:191.8,height:22,x:63.35,y:231.89,stroke:"#D40101",strokeWidth:3,rx:11})),st||(st=n.createElement("path",{fill:"#fff",d:"M82.929 246.89h-.923l2.67-7.273h.91l2.67 7.273h-.924l-2.173-6.123h-.057zm.34-2.841h3.722v.781H83.27zm6.844-4.432v7.273h-.838v-7.273zm2.77 7.273-1.661-5.455h.88l1.18 4.176h.056l1.165-4.176h.895l1.15 4.162h.057l1.18-4.162h.88l-1.662 5.455h-.824l-1.193-4.191h-.085l-1.193 4.191h-.824Zm8.495.127q-.519 0-.941-.195a1.6 1.6 0 0 1-.671-.572q-.249-.377-.249-.909 0-.468.185-.76.185-.294.493-.461.31-.167.682-.249.376-.085.757-.135.497-.063.806-.096.312-.034.454-.117.146-.081.146-.284v-.028q0-.526-.288-.817-.284-.291-.863-.291-.6 0-.941.263-.34.262-.479.561l-.795-.285q.212-.496.568-.774.358-.28.781-.39a3.2 3.2 0 0 1 .838-.114q.262 0 .604.064.344.06.664.252.323.192.536.579t.213 1.037v3.594h-.838v-.739h-.043a1.5 1.5 0 0 1-.284.38q-.198.203-.529.344-.33.142-.806.142m.128-.752q.497 0 .838-.196a1.32 1.32 0 0 0 .696-1.154v-.767q-.054.064-.234.117a4 4 0 0 1-.412.089 18 18 0 0 1-.803.107 3 3 0 0 0-.611.138 1.05 1.05 0 0 0-.454.281q-.171.184-.171.504 0 .436.323.66.327.22.828.221m4.246 2.67q-.213 0-.38-.035a1 1 0 0 1-.231-.064l.213-.739q.306.078.54.057a.65.65 0 0 0 .416-.21q.184-.184.337-.6l.156-.426-2.017-5.483h.909l1.506 4.347h.057l1.505-4.347h.91l-2.316 6.25a2.4 2.4 0 0 1-.387.7 1.45 1.45 0 0 1-.536.415q-.302.135-.682.135m8.89-6.278-.752.213a1.4 1.4 0 0 0-.21-.366 1 1 0 0 0-.369-.298 1.35 1.35 0 0 0-.6-.117q-.5 0-.835.23-.33.228-.33.579 0 .313.227.494.228.181.71.302l.81.198q.732.178 1.09.544.359.362.359.934 0 .469-.27.838-.267.369-.746.582a2.7 2.7 0 0 1-1.115.213q-.835 0-1.381-.362-.547-.362-.693-1.058l.796-.199q.113.441.429.66.32.22.835.221.587 0 .93-.249.348-.252.348-.604a.63.63 0 0 0-.199-.475q-.198-.196-.61-.292l-.909-.213q-.75-.178-1.101-.55-.348-.377-.348-.941 0-.462.259-.817.262-.355.714-.558a2.5 2.5 0 0 1 1.03-.202q.809 0 1.271.355.465.355.66.938m4.586 4.233h-.923l2.67-7.273h.909l2.671 7.273h-.924l-2.173-6.123h-.057zm.341-2.841h3.721v.781h-3.721zm6.843-4.432v7.273h-.838v-7.273zm2.373 0v7.273h-.838v-7.273zm3.751 7.386q-.74 0-1.296-.351a2.4 2.4 0 0 1-.867-.984q-.309-.632-.309-1.477 0-.852.309-1.488.312-.636.867-.987.557-.352 1.296-.352.738 0 1.292.352.558.351.867.987.312.636.312 1.488 0 .845-.312 1.477a2.36 2.36 0 0 1-.867.984q-.554.351-1.292.351m0-.753q.561 0 .923-.287a1.7 1.7 0 0 0 .536-.757q.174-.469.174-1.015a2.9 2.9 0 0 0-.174-1.019 1.7 1.7 0 0 0-.536-.764q-.362-.291-.923-.291c-.561 0-.682.097-.924.291q-.362.291-.536.764a2.9 2.9 0 0 0-.174 1.019q0 .546.174 1.015a1.7 1.7 0 0 0 .536.757q.363.288.924.287m4.801.64-1.662-5.455h.881l1.179 4.176h.056l1.165-4.176h.895l1.151 4.162h.056l1.179-4.162h.881l-1.662 5.455h-.824l-1.193-4.191h-.085l-1.193 4.191zm11.917.113q-.738 0-1.296-.351a2.4 2.4 0 0 1-.866-.984q-.309-.632-.309-1.477 0-.852.309-1.488.312-.636.866-.987.558-.352 1.296-.352.74 0 1.293.352.558.351.867.987.312.636.312 1.488 0 .845-.312 1.477a2.36 2.36 0 0 1-.867.984q-.554.351-1.293.351m0-.753q.561 0 .924-.287a1.7 1.7 0 0 0 .536-.757q.174-.469.174-1.015a2.9 2.9 0 0 0-.174-1.019 1.7 1.7 0 0 0-.536-.764q-.363-.291-.924-.291c-.561 0-.681.097-.923.291q-.362.291-.536.764a2.9 2.9 0 0 0-.174 1.019q0 .546.174 1.015a1.7 1.7 0 0 0 .536.757q.362.288.923.287m4.589-2.642v3.282h-.838v-5.455h.81v.852h.071q.192-.415.582-.667.391-.256 1.009-.256.553 0 .969.227.416.225.647.682.231.455.231 1.151v3.466h-.839v-3.409q0-.644-.333-1.002-.334-.362-.917-.362-.4 0-.717.174a1.24 1.24 0 0 0-.493.508 1.7 1.7 0 0 0-.182.809m7.938 3.282v-7.273h4.389v.781h-3.508v2.458h3.281v.781h-3.281v2.471h3.565v.782zm10.323-5.455-2.017 5.455h-.852l-2.017-5.455h.909l1.506 4.347h.056l1.506-4.347zm3.198 5.568q-.789 0-1.36-.348a2.33 2.33 0 0 1-.877-.98q-.306-.632-.306-1.47t.306-1.477q.309-.644.859-1.002.554-.362 1.293-.362.426 0 .841.142.416.143.757.462.34.316.543.838t.203 1.285v.355h-4.205v-.724h3.352a1.8 1.8 0 0 0-.184-.824 1.4 1.4 0 0 0-.519-.572 1.46 1.46 0 0 0-.788-.209q-.501 0-.867.249a1.63 1.63 0 0 0-.557.639q-.195.393-.196.845v.483q0 .618.214 1.047.216.427.6.65.382.22.891.22.33 0 .597-.092.27-.096.465-.284a1.3 1.3 0 0 0 .302-.476l.809.227a1.8 1.8 0 0 1-.429.725q-.303.309-.746.483-.444.17-.998.17m3.533-.113v-5.455h.81v.824h.057q.148-.405.54-.657.39-.252.88-.252l.231.003q.138.004.21.011v.852a3 3 0 0 0-.512-.056q-.398 0-.71.166a1.23 1.23 0 0 0-.668 1.112v3.452zm4.427 2.045q-.213 0-.38-.035a1 1 0 0 1-.231-.064l.213-.739q.306.078.54.057a.64.64 0 0 0 .415-.21q.185-.184.338-.6l.156-.426-2.017-5.483h.909l1.506 4.347h.057l1.505-4.347h.909l-2.315 6.25a2.4 2.4 0 0 1-.387.7 1.46 1.46 0 0 1-.536.415q-.303.135-.682.135m9.274-2.045-1.989-7.273h.895l1.52 5.923h.071l1.548-5.923h.994l1.549 5.923h.071l1.52-5.923h.895l-1.989 7.273h-.909l-1.605-5.796h-.057l-1.605 5.796zm9.836.113q-.788 0-1.36-.348a2.33 2.33 0 0 1-.877-.98q-.305-.632-.305-1.47t.305-1.477q.31-.644.859-1.002.555-.362 1.293-.362.426 0 .842.142.415.143.756.462.341.316.543.838.203.522.203 1.285v.355h-4.205v-.724h3.353q0-.462-.185-.824a1.4 1.4 0 0 0-.519-.572 1.46 1.46 0 0 0-.788-.209q-.501 0-.866.249a1.6 1.6 0 0 0-.558.639q-.195.393-.195.845v.483q0 .618.213 1.047.216.427.6.65.384.22.891.22.33 0 .597-.092.27-.096.465-.284a1.3 1.3 0 0 0 .302-.476l.81.227a1.8 1.8 0 0 1-.43.725q-.302.309-.746.483-.443.17-.998.17m3.647-.113v-7.273h.838v2.685h.071q.093-.142.256-.363.167-.223.476-.397.312-.178.845-.178.689 0 1.215.345.525.344.82.976.294.633.295 1.492 0 .866-.295 1.502a2.33 2.33 0 0 1-.817.98 2.14 2.14 0 0 1-1.204.344q-.525 0-.841-.174a1.6 1.6 0 0 1-.487-.401 6 6 0 0 1-.263-.376h-.099v.838zm.824-2.728q0 .618.181 1.091.181.468.529.735.349.262.853.262.525 0 .877-.277a1.7 1.7 0 0 0 .533-.752q.18-.476.181-1.059 0-.575-.178-1.037a1.6 1.6 0 0 0-.529-.735q-.351-.273-.884-.273-.512 0-.86.259-.348.256-.525.717a2.9 2.9 0 0 0-.178 1.069m9.137-1.505-.753.213a1.4 1.4 0 0 0-.209-.366 1 1 0 0 0-.369-.298 1.35 1.35 0 0 0-.601-.117q-.5 0-.834.23-.33.228-.33.579 0 .313.227.494t.71.302l.81.198q.732.178 1.09.544.359.362.359.934 0 .469-.27.838-.267.369-.746.582-.48.213-1.115.213-.835 0-1.381-.362-.548-.362-.693-1.058l.796-.199q.113.441.429.66.32.22.835.221.586 0 .93-.249.348-.252.348-.604a.63.63 0 0 0-.199-.475q-.199-.196-.61-.292l-.91-.213q-.749-.177-1.1-.55-.348-.377-.348-.941 0-.462.259-.817.262-.356.714-.558a2.5 2.5 0 0 1 1.029-.202q.81 0 1.272.355.465.355.66.938m1.361 4.233v-5.455h.838v5.455zm.426-6.364a.6.6 0 0 1-.422-.167.54.54 0 0 1-.174-.401q0-.234.174-.401a.6.6 0 0 1 .422-.167.58.58 0 0 1 .419.167.53.53 0 0 1 .178.401q0 .234-.178.401a.58.58 0 0 1-.419.167m4.319.909v.71h-2.826v-.71zm-2.002-1.307h.838v5.199q0 .355.103.533a.53.53 0 0 0 .27.234q.167.057.351.057.138 0 .227-.014l.142-.029.171.753a1.6 1.6 0 0 1-.238.064 1.7 1.7 0 0 1-.387.036q-.355 0-.696-.153a1.4 1.4 0 0 1-.561-.465q-.22-.313-.22-.789zm5.491 6.875q-.787 0-1.36-.348a2.34 2.34 0 0 1-.877-.98q-.305-.632-.305-1.47t.305-1.477q.31-.644.86-1.002.554-.362 1.292-.362.426 0 .842.142.416.143.756.462.342.316.544.838t.202 1.285v.355h-4.205v-.724h3.353q0-.462-.185-.824a1.4 1.4 0 0 0-.518-.572 1.46 1.46 0 0 0-.789-.209 1.5 1.5 0 0 0-.866.249 1.6 1.6 0 0 0-.558.639q-.195.393-.195.845v.483q0 .618.213 1.047.216.427.6.65.384.22.891.22.33 0 .597-.092.27-.096.465-.284a1.3 1.3 0 0 0 .302-.476l.81.227a1.8 1.8 0 0 1-.43.725q-.302.309-.746.483-.443.17-.998.17m4.145-.057a.61.61 0 0 1-.451-.188.61.61 0 0 1-.189-.451q0-.262.189-.451a.62.62 0 0 1 .451-.188q.262 0 .451.188a.62.62 0 0 1 .188.451.66.66 0 0 1-.32.554.6.6 0 0 1-.319.085m2.754 0a.61.61 0 0 1-.451-.188.61.61 0 0 1-.189-.451q0-.262.189-.451a.62.62 0 0 1 .451-.188q.262 0 .451.188a.62.62 0 0 1 .188.451.66.66 0 0 1-.32.554.6.6 0 0 1-.319.085m2.753 0a.61.61 0 0 1-.451-.188.62.62 0 0 1-.188-.451q0-.262.188-.451a.62.62 0 0 1 .451-.188q.264 0 .451.188a.62.62 0 0 1 .189.451.66.66 0 0 1-.32.554.6.6 0 0 1-.32.085"})),at||(at=n.createElement("path",{fill:"#D40101",d:"M362.322 245.635a2.8 2.8 0 0 0 0-5.6zm-96.363-4.78a2.8 2.8 0 0 0 0 3.96l17.819 17.819a2.801 2.801 0 0 0 3.96-3.96l-15.839-15.839 15.839-15.839a2.8 2.8 0 1 0-3.96-3.96zm96.363 1.98v-2.8h-94.383v5.6h94.383z"})))};class lt extends n.Component{constructor(e){super(e),this.bindCallbacks()}bindCallbacks(){this.handleExtensionNotInstalledClick=this.handleExtensionNotInstalledClick.bind(this)}handleExtensionNotInstalledClick(){this.props.onExtensionNotDownloaded()}render(){const e=window.matchMedia("(prefers-color-scheme: dark)").matches;return n.createElement("div",{className:"install-extension"},n.createElement("h1",null,n.createElement(P.x6,null,"Allow the extension on every website.")),n.createElement("p",null,n.createElement(P.x6,null,"Once the extension is installed, it must be allowed on every website, otherwise it won't work as expected."," ",n.createElement("a",{href:"https://www.passbolt.com/docs/safari-onboarding",rel:"noopener noreferrer",target:"_blank"},"Learn more"))),e?n.createElement(it,null):n.createElement(Ue,null),n.createElement("div",{className:"form-actions"},n.createElement("p",null,n.createElement(P.x6,null,"Click on ",n.createElement("span",{className:"passbolt-logo"},"@"),' in the toolbar and select "',n.createElement("strong",null,"Always allow on every website…"),'"')),n.createElement("button",{className:"link",type:"button",onClick:this.handleExtensionNotInstalledClick},n.createElement(P.x6,null,"I didn't install the extension"))))}}lt.propTypes={context:h().any,onExtensionNotDownloaded:h().func};const ct=i((0,P.CI)("common")(lt));class ht extends n.Component{componentDidMount(){this.initializeRecover()}initializeRecover(){setTimeout(()=>this.props.apiRecoverContext.onInitializeRecoverRequested(),1e3)}render(){switch(this.props.apiRecoverContext.state){case I.INSTALL_EXTENSION_STATE:return n.createElement(F,null);case I.INSTALL_SAFARI_EXTENSION_STATE:return n.createElement(ue,{onExtensionDownloading:this.props.apiRecoverContext.handleSafariExtensionDownloading,onExtensionAlreadyInstalled:this.props.apiRecoverContext.handleExtensionAlreadyInstalled});case I.CONFIGURE_SAFARI_EXTENSION_STATE:return n.createElement(ct,{onExtensionNotDownloaded:this.props.apiRecoverContext.handleSafariExtensionNotDownloaded});case I.DOWNLOAD_SUPPORTED_BROWSER_STATE:return n.createElement(M,null);case I.TOKEN_EXPIRED_STATE:return n.createElement(G,null);case I.ERROR_ALREADY_SIGNED_IN_STATE:return n.createElement(Y,{onLogoutButtonClick:this.props.apiRecoverContext.logoutUserAndRefresh,displayAs:X});case I.REQUEST_INVITATION_ERROR:return n.createElement(H,null);case I.UNEXPECTED_ERROR_STATE:return n.createElement(oe,{error:this.props.apiRecoverContext.unexpectedError});default:return n.createElement($,null)}}}ht.propTypes={apiRecoverContext:h().object};const dt=O(ht);class pt{setBaseUrl(e){if(!e)throw new TypeError("ApiClientOption baseUrl is required.");if("string"==typeof e)try{this.baseUrl=new URL(e)}catch(e){throw new TypeError("ApiClientOption baseUrl is invalid.",{cause:e})}else{if(!(e instanceof URL))throw new TypeError("ApiClientOptions baseurl should be a string or URL");this.baseUrl=e}return this}setResourceName(e){if(!e)throw new TypeError("ApiClientOptions.setResourceName resourceName is required.");if("string"!=typeof e)throw new TypeError("ApiClientOptions.setResourceName resourceName should be a valid string.");return this.resourceName=e,this}getBaseUrl(){return this.baseUrl}getResourceName(){return this.resourceName}async getHeaders(){const e=await this.getCsrfToken();if(e)return{"X-CSRF-Token":e}}async getCsrfToken(){if("undefined"==typeof browser||void 0===browser.cookies){const e=document?.cookie?.split("; ")?.find(e=>e.startsWith("csrfToken"))?.split("=");return e&&2===e.length?e[1]:null}const e=this.baseUrl.toString(),t="/"===e.slice(-1)?e:`${e}/`,r=await browser.cookies.get({name:"csrfToken",url:t});return r?.value||null}}var ut;function mt(){return mt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},mt.apply(null,arguments)}const Et=function(e){return n.createElement("svg",mt({xmlns:"http://www.w3.org/2000/svg",width:17,height:16,fill:"none",viewBox:"0 0 17 16"},e),ut||(ut=n.createElement("g",{clipPath:"url(#heart_svg__clip0_93_734678)"},n.createElement("path",{stroke:"var(--icon-color)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M13.497 9.333c.993-.973 2-2.14 2-3.666A3.667 3.667 0 0 0 11.83 2c-1.173 0-2 .333-3 1.333-1-1-1.827-1.333-3-1.333a3.667 3.667 0 0 0-3.667 3.667c0 1.533 1 2.7 2 3.666L8.83 14z"}))))};class ft extends n.Component{render(){return n.createElement("div",{className:"tooltip",tabIndex:"0"},this.props.children,n.createElement("span",{className:`tooltip-text ${this.props.direction}`},this.props.message))}}ft.defaultProps={direction:"right"},ft.propTypes={children:h().any,message:h().any.isRequired,direction:h().string};const gt=ft;class yt extends n.Component{get privacyUrl(){return this.props.context.siteSettings.privacyLink}get creditsUrl(){return"https://www.passbolt.com/terms"}get unsafeUrl(){return"https://www.passbolt.com/docs/hosting/faq/why-I-see-unsafe-mode-banner/"}get termsUrl(){return this.props.context.siteSettings.termsLink}get versions(){const e=this.props.context.extensionVersion,t=this.props.context.siteSettings.version;return n.createElement("div",null,e&&n.createElement("div",null,this.props.t("Client")," ",e),t&&n.createElement(n.Fragment,null,e&&n.createElement("hr",null),n.createElement("div",null,this.props.t("Server")," ",t)))}get isUnsafeMode(){if(!this.props.context.siteSettings)return!1;const e=this.props.context.siteSettings.debug,t=this.props.context.siteSettings.url.startsWith("http://");return e||t}get isCloud(){const e=new URL(this.props.context.siteSettings.url);return"https:"===e.protocol&&Boolean(e.hostname.match(/cloud.passbolt.com$/))}render(){return n.createElement("footer",{className:"footer"},n.createElement("ul",{className:"footer-links"},this.isUnsafeMode&&n.createElement("li",{className:"error-message"},n.createElement("a",{href:this.unsafeUrl,target:"_blank",rel:"noopener noreferrer"},n.createElement(P.x6,null,"Unsafe mode"))),!this.isCloud&&n.createElement(n.Fragment,null,this.props.context.siteSettings.isCommunityEdition&&n.createElement("li",null,n.createElement(P.x6,null,"Community Edition",n.createElement("span",{className:"edition-suffix"}," (free)"))),!this.props.context.siteSettings.isCommunityEdition&&n.createElement("li",null,n.createElement(P.x6,null,"Pro Edition"))),this.isCloud&&n.createElement("li",null,n.createElement(P.x6,null,"Cloud")),n.createElement("li",null,this.versions&&n.createElement(gt,{message:this.versions,direction:"top-left"},n.createElement("a",{className:"button button-transparent inline",href:this.creditsUrl,target:"_blank",rel:"noopener noreferrer"},n.createElement(Et,null))),!this.versions&&n.createElement("a",{className:"button button-transparent inline",href:this.creditsUrl,target:"_blank",rel:"noopener noreferrer"},n.createElement(Et,null)))))}}yt.propTypes={context:h().any,t:h().func};const vt=i((0,P.CI)("common")(yt));var wt=r(5648);class bt extends Error{constructor(e="Collection validation error."){super(e),this.name="CollectionValidationError",this.errors=[]}addItemValidationError(e,t){if(!Number.isInteger(e))throw new TypeError('CollectionValidationError::addEntityValidationError expects "position" to be an integer.');if(!(t instanceof Tt||t instanceof bt))throw new TypeError('CollectionValidationError::addEntityValidationError expects "entityValidationError" to be an instance of EntityValidationError or CollectionValidationError.');this.errors[e]=t}addCollectionValidationError(e,t){if("string"!=typeof e)throw new TypeError('CollectionValidationError::addCollectionValidationError expects "rule" to be a string.');if("string"!=typeof t)throw new TypeError('CollectionValidationError::addCollectionValidationError expects "error" to be a string.');this.errors[e]=t}hasErrors(){return this.errors.some(e=>Object.keys(e.details).length>0)}get details(){const e={};for(const t in this.errors)this.errors[t]instanceof Tt||this.errors[t]instanceof bt?e[t]=this.errors[t].details:e[t]=this.errors[t];return e}}const xt=bt;class St extends Error{constructor(e="Entity validation error."){super(e),this.name="EntityValidationError",this.details={}}addError(e,t,r){if("string"!=typeof e)throw new TypeError("EntityValidationError addError property should be a string.");if("string"!=typeof t)throw new TypeError("EntityValidationError addError rule should be a string.");if("string"!=typeof r)throw new TypeError("EntityValidationError addError message should be a string.");Object.prototype.hasOwnProperty.call(this.details,e)||(this.details[e]={}),this.details[e][t]=r}addAssociationError(e,t){if("string"!=typeof e)throw new TypeError("EntityValidationError addAssociationError associationName should be a string.");if(!(t instanceof St||t instanceof xt))throw new TypeError("EntityValidationError addAssociationError errorDetails should be an object.");this.details[e]=t}getError(e,t){if(!this.hasError(e,t))return null;const r=this.details[e];return t?r[t]:r}hasError(e,t){if("string"!=typeof e)throw new TypeError("EntityValidationError hasError property should be a string.");const r=this.details&&Object.prototype.hasOwnProperty.call(this.details,e);if(!r)return!1;if(!t)return r;if("string"!=typeof t)throw new TypeError("EntityValidationError hasError rule should be a string.");return Object.prototype.hasOwnProperty.call(this.details[e],t)}hasErrors(){return Object.keys(this.details).length>0}getFirstRuleErrorByField(e){if(!this.hasError(e))return null;const t=this.details[e];return t[Object.keys(t)[0]]}}const Tt=St;var Ct=r(7761),_t=r.n(Ct);class qt{static validateSchema(e,t){if(!t)throw new TypeError(`Could not validate entity ${e}. No schema for entity ${e}.`);if(!t.type)throw new TypeError(`Could not validate entity ${e}. Type missing.`);if("array"!==t.type){if("object"===t.type){if(!t.required||!Array.isArray(t.required))throw new TypeError(`Could not validate entity ${e}. Schema error: no required properties.`);if(!t.properties||!Object.keys(t).length)throw new TypeError(`Could not validate entity ${e}. Schema error: no properties.`);const r=t.properties;for(const e in r){if(!Object.prototype.hasOwnProperty.call(r,e)||!r[e].type&&!r[e].anyOf)throw TypeError(`Invalid schema. Type missing for ${e}...`);if(r[e].anyOf&&(!Array.isArray(r[e].anyOf)||!r[e].anyOf.length))throw new TypeError(`Invalid schema, prop ${e} anyOf should be an array`)}}}else if(!t.items)throw new TypeError(`Could not validate entity ${e}. Schema error: missing item definition.`)}static validate(e,t,r){if(!e||!t||!r)throw new TypeError(`Could not validate entity ${e}. No data provided.`);switch(r.type){case"object":return qt.validateObject(e,t,r);case"array":return qt.validateArray(e,t,r);default:throw new TypeError(`Could not validate entity ${e}. Unsupported type.`)}}static validateArray(e,t,r){let n;const s=qt.validateProp("items",t,r);if("number"==typeof r.minItems&&(qt.isGreaterThanOrEqual(t.length,r.minItems)||(n=qt.handleCollectionValidationError("minItems",`The items array should contain at least ${r.minItems} item(s).`,n))),"number"==typeof r.maxItems&&(qt.isLessThanOrEqual(t.length,r.maxItems)||(n=qt.handleCollectionValidationError("maxItems",`The items array should contain at maximum ${r.maxItems} item(s).`,n))),n)throw n;return s}static validateObject(e,t,r){const n=r.required,s=r.properties,a={};let o;for(const r in s)if(Object.prototype.hasOwnProperty.call(s,r))if(null!==t?.[r]||!0!==s[r]?.nullable){if(n.includes(r)){if(!Object.prototype.hasOwnProperty.call(t,r)){o=qt.getOrInitEntityValidationError(e,o),o.addError(r,"required",`The ${r} is required.`);continue}}else if(!Object.prototype.hasOwnProperty.call(t,r))continue;try{a[r]=qt.validateProp(r,t[r],s[r])}catch(t){if(!(t instanceof Tt))throw t;o=qt.getOrInitEntityValidationError(e,o),o.details[r]=t.details[r]}}else a[r]=null;if(o)throw o;return a}static getOrInitEntityValidationError(e,t){return t||new Tt(`Could not validate entity ${e}.`)}static validateProp(e,t,r){if(r.anyOf)return qt.validateAnyOf(e,t,r.anyOf),t;if(!0===r.nullable&&null===t)return t;if(qt.validatePropType(e,t,r),r.enum)return qt.validatePropEnum(e,t,r),t;switch(r.type){case"string":qt.validatePropTypeString(e,t,r);break;case"integer":case"number":qt.validatePropTypeNumber(e,t,r);break;case"array":qt.validatePropTypeArray(e,t,r);break;case"object":case"boolean":case"blob":case"null":break;case"x-custom":qt.validatePropCustom(e,t,r);break;default:throw new TypeError(`Could not validate property ${e}. Unsupported prop type ${r.type}`)}return t}static validatePropType(e,t,r){if(!qt.isValidPropType(t,r.type))throw qt.handlePropertyValidationError(e,"type",`The ${e} is not a valid ${r.type}.`)}static validatePropCustom(e,t,r){try{r.validationCallback(t)}catch(t){throw qt.handlePropertyValidationError(e,"custom",`The ${e} is not valid: ${t.message}`)}}static validatePropTypeString(e,t,r){let n;if(r.format&&(qt.isValidStringFormat(t,r.format)||(n=qt.handlePropertyValidationError(e,"format",`The ${e} is not a valid ${r.format}.`,n))),r.length&&(qt.isValidStringLength(t,r.length,r.length)||(n=qt.handlePropertyValidationError(e,"length",`The ${e} should be ${r.length} character in length.`,n))),r.minLength&&(qt.isValidStringLength(t,r.minLength)||(n=qt.handlePropertyValidationError(e,"minLength",`The ${e} should be ${r.minLength} character in length minimum.`,n))),r.maxLength&&(qt.isValidStringLength(t,0,r.maxLength)||(n=qt.handlePropertyValidationError(e,"maxLength",`The ${e} should be ${r.maxLength} character in length maximum.`,n))),r.pattern&&(_t().matches(t,r.pattern)||(n=qt.handlePropertyValidationError(e,"pattern",`The ${e} is not valid.`,n))),r.custom&&(r.custom(t)||(n=qt.handlePropertyValidationError(e,"custom",`The ${e} is not valid.`,n))),n)throw n}static handlePropertyValidationError(e,t,r,n=null){return(n=n||new Tt(`Could not validate property ${e}.`)).addError(e,t,r),n}static handleCollectionValidationError(e,t,r=null){return(r=r||new xt("Could not validate collection.")).addCollectionValidationError(e,t),r}static validatePropTypeNumber(e,t,r){let n;if("number"==typeof r.minimum&&(qt.isGreaterThanOrEqual(t,r.minimum)||(n=qt.handlePropertyValidationError(e,"minimum",`The ${e} should be greater or equal to ${r.minimum}.`,n))),"number"==typeof r.maximum&&(qt.isLesserThanOrEqual(t,r.maximum)||(n=qt.handlePropertyValidationError(e,"maximum",`The ${e} should be lesser or equal to ${r.maximum}.`,n))),n)throw n}static validatePropTypeArray(e,t,r){let n;if(r?.items&&"object"==typeof r.items){for(let s=0;s<t.length;s++){const a=`${e}.${s}`;try{this.validateProp(a,t[s],r.items)}catch(t){if(!(t instanceof Tt))throw t;{n=qt.getOrInitEntityValidationError(e,n);const r=t.details[a];n.details[e]={...n.details[e],[s]:r}}}}if(n)throw n}}static validatePropEnum(e,t,r){if(!qt.isPropInEnum(t,r.enum)){const t=new Tt(`Could not validate property ${e}.`);throw t.addError(e,"enum",`The ${e} value is not included in the supported list.`),t}}static validateAnyOf(e,t,r){for(let n=0;n<r.length;n++)try{return void qt.validateProp(e,t,r[n])}catch{}const n=new Tt(`Could not validate property ${e}.`);throw n.addError(e,"type",`The ${e} does not match any of the supported types.`),n}static isValidPropType(e,t){if(Array.isArray(t))throw new TypeError("EntitySchema isValidPropType multiple types are not supported.");if("string"!=typeof t)throw new TypeError("EntitySchema isValidPropType type is invalid.");switch(t){case"null":return null===e;case"boolean":return"boolean"==typeof e;case"string":return"string"==typeof e;case"integer":return Number.isInteger(e);case"number":return"number"==typeof e;case"object":return"object"==typeof e;case"array":return Array.isArray(e);case"blob":return e instanceof Blob;case"x-custom":return!0;default:throw new TypeError("EntitySchema validation type not supported.")}}static isValidStringFormat(e,t){if("string"!=typeof t)throw new TypeError("EntitySchema validPropFormat format is invalid.");switch(t){case"uuid":return _t().isUUID(e);case"email":case"idn-email":return _t().isEmail(e);case"date-time":return _t().isISO8601(e);case"x-hex-color":return _t().isHexColor(e);case"x-base64":return _t().isBase64(e);default:throw new TypeError(`EntitySchema string validation format ${t} is not supported.`)}}static isValidStringLength(e,t,r){return t=t||0,_t().isLength(e,t,r)}static isPropInEnum(e,t){if(!t||!Array.isArray(t)||!t.length)throw new TypeError("EntitySchema enum schema cannot be empty.");return t.includes(e)}static isGreaterThanOrEqual(e,t){return e>=t}static isLessThanOrEqual(e,t){return e<=t}static isLesserThanOrEqual(e,t){return e<=t}}const kt=qt;class At{constructor(e,t={}){(t?.clone??!0)&&(e=JSON.parse(JSON.stringify(e))),this._props=e}toDto(){return JSON.parse(JSON.stringify(this))}toJSON(){return this._props}_hasProp(e){if(!e.includes(".")){const t=At._normalizePropName(e);return Object.prototype.hasOwnProperty.call(this._props,t)}try{return this._getPropByPath(e),!0}catch(t){return console.error(`Failed to check if property "${e}" is set:`,t),!1}}_getPropByPath(e){return At._normalizePropName(e).split(".").reduce((e,t)=>{if(Object.prototype.hasOwnProperty.call(e,t))return e[t];throw new Error},this._props)}static _normalizePropName(e){return e.replace(/([A-Z])/g,(e,t)=>`_${t.toLowerCase()}`).replace(/\._/,".").replace(/^_/,"").replace(/^\./,"")}}const Ot=At,It=e=>e?.replace(/_([a-z])/g,(e,t)=>t.toUpperCase());class Nt extends Error{constructor(e,t,r){if(super(r=r||"Entity collection error."),"number"!=typeof e)throw new TypeError("EntityCollectionError requires a valid position");if(!t||"string"!=typeof t)throw new TypeError("EntityCollectionError requires a valid rule");if(!r||"string"!=typeof r)throw new TypeError("EntityCollectionError requires a valid message");this.position=e,this.rule=t}}const Rt=Nt;class Pt{constructor(e=[],t={}){const r=t?.clone??!0;this._items=[],r&&(e=JSON.parse(JSON.stringify(e))),this._props=e}toDto(){return JSON.parse(JSON.stringify(this._items))}toJSON(){return this.toDto()}get items(){return this._items}get length(){return this._items.length}[Symbol.iterator](){let e=0;return{next:()=>e<this._items.length?{value:this._items[e++],done:!1}:{done:!0}}}getAll(e,t){if("string"!=typeof e)throw new TypeError("EntityCollection excludeAll expects propName to be string.");if("string"!=typeof t)throw new TypeError("EntityCollection excludeAll expects search to be string.");return this._items.filter(r=>Object.prototype.hasOwnProperty.call(r._props,e)&&r._props[e]===t)}getFirst(e,t){if("string"!=typeof e||"string"!=typeof t)throw new TypeError("EntityCollection getFirst by expect propName and search to be strings");const r=this.getAll(e,t);if(r&&r.length)return r[0]}extract(e){if("string"!=typeof e)throw new TypeError("EntityCollection extract expects propName to be a string.");return this._items.reduce((t,r)=>(void 0!==r._props[e]&&t.push(r._props[e]),t),[])}push(e){return this._items.push(e),this._items.length}unshift(e){return this._items.unshift(e),this._items.length}filterByPropertyValueIn(e,t,r=!0){if("string"!=typeof e)throw new TypeError("EntityCollection filterByPropertyValueIn expects propName to be a string.");if(!Array.isArray(t))throw new TypeError("EntityCollection filterByPropertyValueIn expects needles to be an array.");this.filterByCallback(n=>{const s=Object.prototype.hasOwnProperty.call(n._props,e);return!(r&&!s||s&&!t.includes(n._props[e]))})}filterByCallback(e){if("function"!=typeof e)throw new TypeError("EntityCollection filterByCallback expects callback to be a function.");for(let t=this._items.length-1;t>=0;t--)e(this._items[t])||this._items.splice(t,1)}assertUniqueByProperty(e,t){const r=`unique_${e}`,n=this.extract(e),s=new Set;t=t||`The collection should only contain items with unique values for the property: ${e}.`,n.forEach((e,n)=>{if(s.add(e),n!==s.size-1)throw new Rt(n,r,t)})}assertNotExist(e,t,r={}){if(void 0===t)return;let n=r?.haystackSet;if(!n){const t=this.extract(e);n=new Set(t)}if(n.has(t)){const t=new Tt,n=r?.message||`The collection already includes an element that has a property (${e}) with an identical value.`;throw t.addError(e,"unique",n),t}}}const Lt=Pt,Dt=["string","number","integer","boolean"];class Ut extends Ot{static _cachedSchema={};constructor(e={},t={}){const r=t?.validate??!0;super(e,t),this.marshall(),r&&this.validateSchema({schema:t?.schema,skipSchemaAssociationValidation:t?.skipSchemaAssociationValidation}),this.createAssociations(t),r&&this.validateBuildRules(t?.validateBuildRules)}marshall(){}validate(e={}){try{this.validateSchema({schema:e?.schema,skipSchemaAssociationValidation:e?.skipSchemaAssociationValidation}),this.validateBuildRules(e?.validateBuildRules),this.validateAssociations(e)}catch(e){if(!(e instanceof Tt))throw e;return e}return null}validateSchema(e=null){let t=e?.schema??this.cachedSchema;if(e?.skipSchemaAssociationValidation){t={...t};const e=Object.keys(this.constructor.associations),r=t.required.filter(t=>!e.includes(t));t.required=r}this._props=kt.validate(this.constructor.name,this._props,t)}get cachedSchema(){return this.constructor._cachedSchema[this.constructor.name]||(this.constructor._cachedSchema[this.constructor.name]=this.constructor.getSchema()),this.constructor._cachedSchema[this.constructor.name]}static getSchema(){throw new Error("The entity class should declare its schema.")}validateBuildRules(e={}){}createAssociations(e={}){if(Object.keys(this.constructor.associations).length>0){const t=new Tt;for(const[r,n]of Object.entries(this.constructor.associations))try{this._props[r]&&(this[`_${It(r)}`]=new n(this._props[r],{...e,clone:!1}),delete this._props[r])}catch(e){if(!(e instanceof Tt))throw e;t.addAssociationError(r,e)}if(t.hasErrors())throw t}}static get associations(){return{}}get(e){(0,wt.A)(e);const t=this.constructor.getSchema().properties[e];if(!t)throw new Error(`The property "${e}" has no schema definition.`);if(!Dt.includes(t?.type))throw new Error('The property "associated_entity" should reference scalar properties only.');return this._props[e]}set(e,t,r={}){(0,wt.A)(e);const n=r?.validate??!0;if(this.isAssociation(e))this.setAssociation(e,t,r);else{const s=e.split(".")[0],a=this.constructor.getSchema().properties[s];if(!a)throw new Error(`The property "${s}" has no schema definition.`);if("array"===a?.type)this.setArrayProp(e,t,r);else{if(a?.type&&!Dt.includes(a?.type))throw new Error('The property "associated_entity" should reference scalar properties only.');if(a?.anyOf?.some(e=>!Dt.includes(e.type)))throw new Error('The property "associated_entity" should reference scalar properties only.');n&&kt.validateProp(s,t,a),this._props[s]=t}}}setArrayProp(e,t,r){(0,wt.A)(e);const n=e.split("."),s=n[0];let a=null;const o=this.constructor.getSchema().properties[s],i=r?.validate??!0;if(2!==n.length)throw new Error(`The property "${n[0]}" has no index passed.`);{const e=n[1].match(/^(\d+)$/);if(!e)throw new Error(`The property "${n[0]}" has an invalid index format. Expected format: digits.`);a=parseInt(e[1],10)}if(!Dt.includes(o.items.type))throw new Error('The property "associated_entity" with array type should reference scalar properties only.');i&&kt.validateProp(s,t,o.items),this._props[s]||(this._props[s]=[]),null!=t?this._props[s][a]=t:this._props[s].splice(a,1)}setCollection(e,t,r){(0,wt.A)(e);const n=e.split("."),s=n[0];let a=null;if(1===n.length)t instanceof this.constructor.associations[e]?this[`_${s}`]=t:this[`_${s}`]=new this.constructor.associations[e](t,r);else{if(!(n.length>1))throw new Error(`The property "${n[0]}" has no index passed.`);{const e=n[1].match(/^(\d+)$/);if(!e)throw new Error(`The property "${n[0]}" has an invalid index format. Expected format: digits.`);a=parseInt(e[1],10)}}if(!this[`_${s}`])throw new Error(`The collection "${n[0]}" has no item".`);if(null!=t)if(n.length>2){if(!this[`_${s}`]._items[a])throw new Error(`The collection "${n[0]}" has no item at the index "${n[1]}".`);const e=n.slice(2).join(".");this[`_${s}`]._items[a].set(e,t,r)}else this[`_${s}`].push(t,r,r);else this[`_${s}`].items.splice(a,1)}setAssociation(e,t,r={}){if((0,wt.A)(e),this.isAssociation(e)){const n=e.split("."),s=It(n[0]);if(n.length>1)if(this[`_${s}`]||(this[`_${s}`]=new this.constructor.associations[n[0]]({},{validate:!1})),this[`_${s}`]instanceof Lt){const e=n.toSpliced(0,1,s).join(".");this.setCollection(e,t,r)}else{const e=n.slice(1).join(".");this[`_${s}`].set(e,t,r)}else t instanceof this.constructor.associations[e]?this[`_${s}`]=t:this[`_${s}`]=new this.constructor.associations[e](t,r)}}validateAssociations(e={}){const t=new Tt;if(Object.keys(this.constructor.associations).length>0&&Object.keys(this.constructor.associations).forEach(r=>{const n=It(r);if(this[`_${n}`]){const s=this[n].validate(e);s&&t.addAssociationError(r,s)}}),t.hasErrors())throw t}diffProps(e){if(!(e instanceof Ut))throw new TypeError('The property "compareEntity" should be of "EntityV2" type.');const t={},r=this.constructor.getSchema(),n=Object.keys(r.properties).filter(e=>Dt.includes(r.properties[e].type));for(const r of n){const n=this.get(r),s=e.get(r);n!==s&&(t[r]=s)}return t}hasDiffProps(e){const t=this.diffProps(e);return Object.keys(t).length>0}isAssociation(e){const t=e.split(".")[0];return Boolean(this.constructor.associations?.[t])}}const $t=Ut,Vt=(e,t)=>t.split(".").reduce((e,t)=>e?.[t],e);r.dn(Vt);const zt=(e,t)=>{if(void 0===e||"string"!=typeof e||!e.length)return!1;if((t=t||{}).whitelistedProtocols&&!Array.isArray(t.whitelistedProtocols))throw new TypeError("The whitelistedProtocols should be an array of string.");if(t.defaultProtocol&&"string"!=typeof t.defaultProtocol)throw new TypeError("The defaultProtocol should be a string.");const r=t.whitelistedProtocols||[Ft.HTTP,Ft.HTTPS],n=[Ft.JAVASCRIPT],s=t.defaultProtocol||"";!/^(?:(?!:\/\/).)*:\/\//.test(e)&&s&&(e=`${s}//${e}`);try{const t=new URL(e);return!n.includes(t.protocol)&&!!r.includes(t.protocol)&&t.href}catch(e){return console.error("Failed to sanitize URL:",e),!1}};r.dn(zt);const Ft={FTP:"http:",FTPS:"https:",HTTP:"http:",HTTPS:"https:",JAVASCRIPT:"javascript:",SSH:"ssh:"},Bt="enabled",Mt="disabled",jt="not found";class Ht extends $t{static getSchema(){return{type:"object",required:[],properties:{status:{type:"string",enum:[Bt,Mt,jt]},app:{type:"object"},passbolt:{type:"object"},serverTimeDiff:{type:"integer",nullable:!0}}}}marshall(){void 0===this._props.status&&(this._props.status=Bt),Ht.sanitizeEmailValidateRegex(this._props)}static sanitizeEmailValidateRegex(e){const t=e?.passbolt?.email?.validate?.regex;t&&"string"==typeof t&&t.trim().length&&(e.passbolt.email.validate.regex=t.trim().replace(/^\/+/,"").replace(/\/+$/,""))}static get disabledSiteSettings(){return{status:Mt}}toDto(){return{...this._props}}toJSON(){return this.toDto()}canIUse(e){const t=this._props?.passbolt?.plugins?.[e];return!(!t||"object"!=typeof t)&&!1!==t.enabled}isPluginEnabled(e){return this.canIUse(e)}isFeatureBeta(e){return(0,wt.A)(e),Vt(this._props,`passbolt.plugins.${e}.isInBeta`)||!1}getPluginSettings(e){return Vt(this._props,`passbolt.plugins.${e}`)}getRememberMeOptions(){return(this.getPluginSettings("rememberMe")||{}).options||{}}get hasRememberMeUntilILogoutOption(){return void 0!==(this.getRememberMeOptions()||{})[-1]}get generatorConfiguration(){return Vt(this._props,"passbolt.plugins.generator.configuration")}get locale(){return Vt(this._props,"app.locale")||Ht.DEFAULT_LOCALE.locale}async setLocale(e){this._props.app||(this._props.app={}),this._props.app.locale=e}get supportedLocales(){return Vt(this._props,"passbolt.plugins.locale.options")||Ht.DEFAULT_SUPPORTED_LOCALES}getServerTimezone(){return Vt(this._props,"passbolt.app.server_timezone")}get termsLink(){const e=Vt(this._props,"passbolt.legal.terms.url");return!!e&&zt(e)}get privacyLink(){const e=Vt(this._props,"passbolt.legal.privacy_policy.url");return!!e&&zt(e)}get registrationPublic(){return!0===Vt(this._props,"passbolt.registration.public")}get debug(){return!0===Vt(this._props,"app.debug")}get url(){return Vt(this._props,"app.url")||""}get version(){return Vt(this._props,"app.version.number")}get isCommunityEdition(){return"ce"===Vt(this._props,"passbolt.edition")}get emailValidateRegex(){return Vt(this._props,"passbolt.email.validate.regex")||null}isServerInPast(){return(this._props.serverTimeDiff||0)<0}get serverTime(){const e=this._props.serverTimeDiff||0;return(new Date).getTime()+e}static get ENTITY_NAME(){return"SiteSettings"}static get ORGANIZATION_ENABLED(){return Bt}static get ORGANIZATION_DISABLED(){return Mt}static get ORGANIZATION_NOT_FOUND(){return jt}static get DEFAULT_LOCALE(){return{locale:"en-UK",label:"English"}}static get DEFAULT_SUPPORTED_LOCALES(){return[Ht.DEFAULT_LOCALE]}}const Wt=Ht;var Gt=r(2635),Zt=r(2107);class Xt extends n.Component{constructor(e){super(e),this.state=this.defaultState}get defaultState(){return{ready:!1}}async componentDidMount(){await(0,Gt.Yx)(P.r9).use(Zt.A).init({lng:this.locale,load:"currentOnly",interpolation:{escapeValue:!1},react:{useSuspense:!1},backend:{loadPath:(e,t)=>this.getTranslationPath(e,t)},supportedLngs:this.supportedLocales,fallbackLng:!1,ns:["common"],defaultNS:"common",keySeparator:!1,nsSeparator:!1,debug:!1}),this.setState({ready:!0})}getTranslationPath(e,t){const r=e[0],n=t[0],s="en-GB"===r?"en-UK":r;return(this.props.loadingPath||"/locales/{{lng}}/{{ns}}.json").replace("{{lng}}",s).replace("{{ns}}",n)}get supportedLocales(){let e=[];return this.props.context.siteSettings?.supportedLocales?e=this.props.context.siteSettings?.supportedLocales.map(e=>e.locale):e.push(this.locale),e.includes("en-UK")&&e.push("en-GB"),e}get locale(){return this.props.context.locale}async componentDidUpdate(e){await this.handleLocaleChange(e.context.locale)}async handleLocaleChange(e){this.locale!==e&&await(0,Gt.v2)(this.locale)}get isReady(){return this.state.ready}render(){return n.createElement(n.Fragment,null,this.isReady&&this.props.children)}}Xt.propTypes={context:h().any,loadingPath:h().any,children:h().any};const Jt=i(Xt),Kt=new class{allPropTypes=(...e)=>(...t)=>{const r=e.map(e=>e(...t)).filter(Boolean);if(0===r.length)return;const n=r.map(e=>e.message).join("\n");return new Error(n)}};var Yt;function Qt(){return Qt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Qt.apply(null,arguments)}const er=function(e){return n.createElement("svg",Qt({width:25,height:24,fill:"none",viewBox:"0 0 25 24"},e),Yt||(Yt=n.createElement("path",{stroke:"var(--icon-color)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M11.597 19a8 8 0 1 0 0-16 8 8 0 0 0 0 16M21.597 21l-4.35-4.35"})))};class tr extends n.Component{constructor(e){super(e),this.state=this.getDefaultState(e),this.bindCallback(),this.createRefs()}getDefaultState(e){return{selectedValue:e.value,search:"",open:!1,style:void 0}}get listItemsFiltered(){const e=this.props.items.filter(e=>e.value!==this.state.selectedValue);return this.props.search&&""!==this.state.search?this.getItemsMatch(e,this.state.search):e}get selectedItemLabel(){const e=this.props.items&&this.props.items.find(e=>e.value===this.state.selectedValue);return e&&e.label||n.createElement(n.Fragment,null," ")}static getDerivedStateFromProps(e,t){return void 0!==e.value&&e.value!==t.selectedValue?{selectedValue:e.value}:null}bindCallback(){this.handleDocumentClickEvent=this.handleDocumentClickEvent.bind(this),this.handleDocumentContextualMenuEvent=this.handleDocumentContextualMenuEvent.bind(this),this.handleDocumentDragStartEvent=this.handleDocumentDragStartEvent.bind(this),this.handleDocumentScrollEvent=this.handleDocumentScrollEvent.bind(this),this.handleSelectClick=this.handleSelectClick.bind(this),this.handleInputChange=this.handleInputChange.bind(this),this.handleItemClick=this.handleItemClick.bind(this),this.handleSelectKeyDown=this.handleSelectKeyDown.bind(this),this.handleItemKeyDown=this.handleItemKeyDown.bind(this),this.handleBlur=this.handleBlur.bind(this)}createRefs(){this.selectedItemRef=n.createRef(),this.selectItemsRef=n.createRef(),this.itemsRef=n.createRef()}componentDidMount(){document.addEventListener("click",this.handleDocumentClickEvent,{capture:!0}),document.addEventListener("contextmenu",this.handleDocumentContextualMenuEvent,{capture:!0}),document.addEventListener("dragstart",this.handleDocumentDragStartEvent,{capture:!0}),document.addEventListener("scroll",this.handleDocumentScrollEvent,{capture:!0})}componentWillUnmount(){document.removeEventListener("click",this.handleDocumentClickEvent,{capture:!0}),document.removeEventListener("contextmenu",this.handleDocumentContextualMenuEvent,{capture:!0}),document.removeEventListener("dragstart",this.handleDocumentDragStartEvent,{capture:!0}),document.removeEventListener("scroll",this.handleDocumentScrollEvent,{capture:!0})}handleDocumentClickEvent(e){this.selectedItemRef.current.contains(e.target)||this.selectItemsRef.current.contains(e.target)||this.closeSelect()}handleDocumentContextualMenuEvent(e){this.selectedItemRef.current.contains(e.target)||this.selectItemsRef.current.contains(e.target)||this.closeSelect()}handleDocumentDragStartEvent(){this.closeSelect()}handleDocumentScrollEvent(e){this.itemsRef.current.contains(e.target)||this.selectItemsRef.current.contains(e.target)||this.closeSelect()}handleSelectClick(){if(this.props.disabled)this.closeSelect();else{const e=!this.state.open;e?this.forceVisibilitySelect():this.resetStyleSelect(),this.setState({open:e})}}getFirstParentWithTransform(){let e=this.selectedItemRef.current.parentElement;for(;null!==e&&""===e.style.getPropertyValue("transform");)e=e.parentElement;return e}forceVisibilitySelect(){const e=this.selectedItemRef.current.getBoundingClientRect(),{width:t,height:r}=e;let{top:n,left:s}=e;const a=this.getFirstParentWithTransform();if(a){const e=a.getBoundingClientRect();n-=e.top,s-=e.left}const o={position:"fixed",zIndex:1,width:t,height:r,top:n,left:s};this.setState({style:o})}handleBlur(e){e.currentTarget.contains(e.relatedTarget)||this.closeSelect()}closeSelect(){this.resetStyleSelect(),this.setState({open:!1})}resetStyleSelect(){this.setState({style:void 0})}handleInputChange(e){const t=e.target,r=t.value,n=t.name;this.setState({[n]:r})}handleItemClick(e){if(this.setState({selectedValue:e.value,open:!1}),"function"==typeof this.props.onChange){const t={target:{value:e.value,name:this.props.name}};this.props.onChange(t)}this.closeSelect()}getItemsMatch(e,t){const r=t&&t.split(/\s+/)||[""];return e.filter(e=>r.every(t=>((e,t)=>(e=>new RegExp((e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))(e),"i"))(e).test(t))(t,e.label)))}handleSelectKeyDown(e){switch(e.keyCode){case 13:return e.stopPropagation(),void this.handleSelectClick();case 40:return e.preventDefault(),e.stopPropagation(),void(this.state.open?this.focusItem(0):this.handleSelectClick());case 38:return e.preventDefault(),e.stopPropagation(),void(this.state.open?this.focusItem(this.listItemsFiltered.length-1):this.handleSelectClick());case 27:return e.stopPropagation(),void this.closeSelect();default:return}}focusItem(e){this.itemsRef.current.childNodes[e]?.focus()}handleItemKeyDown(e,t){switch(e.keyCode){case 13:return e.stopPropagation(),void this.handleItemClick(t);case 40:return e.stopPropagation(),e.preventDefault(),void(e.target.nextSibling?e.target.nextSibling.focus():this.focusItem(0));case 38:return e.stopPropagation(),e.preventDefault(),void(e.target.previousSibling?e.target.previousSibling.focus():this.focusItem(this.listItemsFiltered.length-1));default:return}}hasFilteredItems(){return this.listItemsFiltered.length>0}render(){return n.createElement("div",{className:`select-container ${this.props.className}`,style:{width:this.state.style?.width,height:this.state.style?.height}},n.createElement("div",{onKeyDown:this.handleSelectKeyDown,onBlur:this.handleBlur,id:this.props.id,className:`select ${this.props.direction} ${this.state.open?"open":""}`,style:this.state.style},n.createElement("div",{ref:this.selectedItemRef,className:"selected-value "+(this.props.disabled?"disabled":""),tabIndex:this.props.disabled?-1:0,onClick:this.handleSelectClick},n.createElement("span",{className:"value"},this.selectedItemLabel),n.createElement(te,null)),n.createElement("div",{ref:this.selectItemsRef,className:"select-items "+(this.state.open?"visible":"")},this.props.search&&n.createElement(n.Fragment,null,n.createElement("input",{className:"search-input",name:"search",value:this.state.search,onChange:this.handleInputChange,type:"text"}),n.createElement(er,{className:"search"})),n.createElement("ul",{ref:this.itemsRef,className:"items"},this.hasFilteredItems()&&this.listItemsFiltered.map(e=>n.createElement("li",{tabIndex:e.disabled?-1:0,key:e.value,title:e.title,className:`option ${e.value}`,onKeyDown:t=>this.handleItemKeyDown(t,e),onClick:()=>this.handleItemClick(e)},e.label)),!this.hasFilteredItems()&&this.props.search&&n.createElement("li",{className:"option no-results"},n.createElement(P.x6,null,"No results match")," ",n.createElement("span",null,this.state.search))))))}}tr.defaultProps={id:"",name:"select",className:"",direction:"bottom"},tr.propTypes={id:h().string,name:h().string,className:h().string,direction:h().oneOf(Object.values({top:"top",bottom:"bottom",left:"left",right:"right"})),search:h().bool,items:h().array,value:Kt.allPropTypes(h().oneOfType([h().string,h().number,h().bool]),(e,t,r)=>{const n=e[t],s=e.items;if(null!==n&&s.length>0&&s.every(e=>e.value!==n))return new Error(`Invalid prop ${t} passed to ${r}. Expected the value ${n} in items.`)}),disabled:h().bool,onChange:h().func};const rr=(0,P.CI)("common")(tr);class nr extends n.Component{constructor(e){super(e),this.state=this.defaultState,this.bindHandlers()}componentDidMount(){this.initLocale()}componentDidUpdate(e){this.handleLocaleChange(e.context.locale)}handleLocaleChange(e){this.props.context.locale!==e&&this.setState({locale:this.props.context.locale})}get defaultState(){return{loading:!0,locale:null,processing:!1}}get areActionsAllowed(){return!this.state.processing}bindHandlers(){this.handleLocaleInputChange=this.handleLocaleInputChange.bind(this)}async handleLocaleInputChange(e){const t=e.target.value;this.updateLocale(t)}async updateLocale(e){this.setState({processing:!0}),await this.props.context.onUpdateLocaleRequested(e),this.setState({processing:!1})}initLocale(){this.setState({locale:this.props.context.locale,loading:!1})}isLoading(){return this.state.loading}get supportedLocales(){return this.props.context.siteSettings.supportedLocales?this.props.context.siteSettings.supportedLocales.map(e=>({value:e.locale,label:e.label})):[]}render(){return n.createElement(n.Fragment,null,!this.isLoading()&&n.createElement("div",{className:"select-wrapper input"},n.createElement(rr,{id:"user-locale-input",className:"setup-extension",name:"locale",value:this.state.locale,disabled:!this.areActionsAllowed,items:this.supportedLocales,onChange:this.handleLocaleInputChange})))}}nr.propTypes={context:h().any};const sr=i(nr);class ar extends n.Component{get statesToHideLocaleSwitch(){return[I.INITIAL_STATE]}get mustDisplayLocaleSwitch(){return!this.statesToHideLocaleSwitch.includes(this.props.apiRecoverContext.state)}render(){return n.createElement(n.Fragment,null,this.mustDisplayLocaleSwitch&&n.createElement(sr,null))}}ar.propTypes={apiRecoverContext:h().any};const or=O(ar);var ir,lr,cr,hr,dr;function pr(){return pr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},pr.apply(null,arguments)}const ur=function(e){return n.createElement("svg",pr({xmlns:"http://www.w3.org/2000/svg",width:151,height:27,fill:"none","aria-labelledby":"logo-title logo-description",viewBox:"0 0 151 27"},e),ir||(ir=n.createElement("title",{id:"logo-title"},"Passbolt logo")),lr||(lr=n.createElement("desc",{id:"logo-description"},"This is the logo of passbolt.")),cr||(cr=n.createElement("path",{fill:"var(--icon-color)",d:"M4.648 9.234v8.607h2.48c1.646 0 2.786-.349 3.47-1.012.685-.664 1.013-1.823 1.013-3.395 0-1.52-.305-2.595-.938-3.218-.633-.673-1.695-.972-3.24-.972zM.597 5.963h7.797c2.357 0 4.178.676 5.496 2.048q1.976 2.058 1.974 5.689a8.6 8.6 0 0 1-.406 2.749 7.1 7.1 0 0 1-1.24 2.278 5.9 5.9 0 0 1-2.38 1.773c-.937.349-2.152.524-3.697.524H4.648V26.5H.597zM24.016 18.016h5.064v-3.119h-4.76c-.937 0-1.594.124-1.95.375-.357.25-.517.698-.517 1.321 0 .524.15.899.429 1.122.28.223.848.301 1.734.301M18.649 5.963h8.268c2.103 0 3.672.476 4.736 1.423 1.065.947 1.594 2.347 1.594 4.217v9.456H22.37c-1.52 0-2.708-.375-3.52-1.121-.81-.747-1.2-1.823-1.2-3.22 0-1.722.454-2.945 1.392-3.692s2.483-1.134 4.697-1.134h5.315v-.365c0-.898-.276-1.518-.809-1.896-.532-.377-1.47-.55-2.86-.55H18.65zM36.55 17.915h8.525c.76 0 1.318-.124 1.646-.35.183-.122.328-.29.423-.486.094-.197.134-.414.115-.63a1.2 1.2 0 0 0-.112-.632 1.24 1.24 0 0 0-.42-.492c-.355-.253-.91-.374-1.646-.374h-3.494c-2.067 0-3.467-.325-4.203-.947-.737-.623-1.088-1.747-1.088-3.32 0-1.62.431-2.82 1.318-3.592.886-.772 2.255-1.152 4.064-1.152h8.684v3.142h-7.134q-1.75 0-2.279.301c-.354.198-.532.547-.532 1.071-.017.193.016.387.096.564s.204.332.361.449c.302.223.809.324 1.468.324h3.676c1.672 0 2.961.397 3.824 1.172s1.315 1.871 1.315 3.32c0 1.397-.405 2.53-1.188 3.417-.37.427-.833.768-1.354.996-.522.23-1.09.34-1.661.325H36.549zM53.822 17.915h8.526c.76 0 1.318-.124 1.646-.35a1.23 1.23 0 0 0 .42-.487c.093-.196.132-.413.112-.629a1.2 1.2 0 0 0-.111-.632 1.24 1.24 0 0 0-.421-.492c-.354-.253-.91-.374-1.646-.374h-3.493c-2.067 0-3.467-.325-4.204-.947-.736-.623-1.088-1.752-1.088-3.324 0-1.62.432-2.82 1.318-3.593.886-.772 2.253-1.147 4.075-1.147h8.686v3.142h-7.141q-1.747 0-2.28.301c-.353.198-.531.547-.531 1.071-.017.193.016.387.096.564s.204.332.361.449c.302.223.809.324 1.468.324h3.671c1.672 0 2.963.397 3.824 1.172s1.315 1.871 1.315 3.32c0 1.397-.403 2.53-1.188 3.417-.37.427-.832.767-1.354.996a3.9 3.9 0 0 1-1.66.325H53.769v-3.106zM75.387.5v5.463h3.47c1.55 0 2.759.175 3.694.55.946.362 1.77.976 2.38 1.772a7.2 7.2 0 0 1 1.243 2.296c.281.888.417 1.814.403 2.744q0 3.63-1.974 5.689c-1.315 1.372-3.14 2.046-5.493 2.046h-7.8V.5zm2.462 8.734h-2.483v8.608h2.785c1.55 0 2.633-.324 3.243-.95s.935-1.721.935-3.268-.354-2.694-1.033-3.367c-.68-.673-1.832-1.023-3.447-1.023M92.3 13.525c0 1.445.328 2.532 1.013 3.367s1.62 1.198 2.86 1.198 2.152-.398 2.863-1.198 1.033-1.921 1.033-3.367-.356-2.547-1.033-3.344c-.677-.798-1.62-1.198-2.863-1.198a3.64 3.64 0 0 0-1.57.279 3.6 3.6 0 0 0-1.29.919c-.685.797-1.013 1.921-1.013 3.344m12.002 0q0 3.544-2.202 5.689c-1.47 1.397-3.42 2.121-5.901 2.121s-4.457-.699-5.924-2.121-2.202-3.292-2.202-5.664q0-3.558 2.202-5.69c1.467-1.424 3.444-2.145 5.919-2.145s4.431.724 5.901 2.144 2.207 3.294 2.207 5.666M110.935 21.06h-4.202V.5h4.202zM112.884 5.963h2.86V.5h4.052v5.463h4.278v3.02h-4.278v6.09c0 1.12.204 1.895.581 2.343.377.449 1.064.649 2.026.649h1.671v3.02h-3.72c-1.494 0-2.636-.4-3.444-1.223-.809-.823-1.189-1.995-1.189-3.519v-7.36h-2.863v-3.02z"})),hr||(hr=n.createElement("path",{fill:"#D40101",d:"m149.951 10.68-9.059-8.36a2.12 2.12 0 0 0-1.421-.543c-.526 0-1.033.194-1.421.544l-5.684 5.268c.745.271 1.414.71 1.952 1.282.539.572.933 1.26 1.149 2.01h7.673a.73.73 0 0 1 .504.204.69.69 0 0 1 .207.494v1.147a.68.68 0 0 1-.207.494.72.72 0 0 1-.504.204h-.886v1.623a.68.68 0 0 1-.205.494.72.72 0 0 1-.503.205h-1.945a.73.73 0 0 1-.503-.205.69.69 0 0 1-.205-.494v-1.623h-3.426a4.84 4.84 0 0 1-1.135 2.033 5 5 0 0 1-1.966 1.287l5.71 5.276c.388.349.895.543 1.421.543a2.12 2.12 0 0 0 1.421-.543l9.043-8.355a2.03 2.03 0 0 0-.01-2.985"})),dr||(dr=n.createElement("path",{fill:"#D40101",d:"M130.683 9.867a2.6 2.6 0 0 0-1.064.253c-.371.18-.686.455-.913.794a2.242 2.242 0 0 0-.113 2.305 2.3 2.3 0 0 0 .831.877 2.36 2.36 0 0 0 2.355.059c.362-.197.664-.484.875-.833a2.24 2.24 0 0 0 .324-1.153 2.21 2.21 0 0 0-.653-1.625 2.3 2.3 0 0 0-.751-.5 2.3 2.3 0 0 0-.891-.177"})))};class mr extends n.Component{constructor(e){super(e),this.state=this.defaultState,this.userId=null,this.token=null,this.initializeProperties()}get defaultState(){return{siteSettings:null,trustedDomain:this.baseUrl,getApiClientOptions:this.getApiClientOptions.bind(this),locale:null,onUpdateLocaleRequested:this.onUpdateLocaleRequested.bind(this)}}async componentDidMount(){const e=await this.getSiteSettings();this.initLocale(e)}initializeProperties(){const e="[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[0-5][a-fA-F0-9]{3}-[089aAbB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}",t=new RegExp(`(setup/recover|setup/recover/start)/(${e})/(${e})$`),r=window.location.pathname.match(t);r?(this.userId=r[2],this.token=r[3]):console.error("Unable to retrieve the user id and token from the url")}get baseUrl(){const e=document.getElementsByTagName("base")&&document.getElementsByTagName("base")[0];return e?e.attributes.href.value.replace(/\/*$/g,""):(console.error("Unable to retrieve the page base tag"),"")}getApiClientOptions(){return(new pt).setBaseUrl(this.state.trustedDomain)}async getSiteSettings(){const e=this.getApiClientOptions().setResourceName("settings"),t=new y(e),{body:r}=await t.findAll(),n=new Wt(r);return this.setState({siteSettings:n}),n}initLocale(e){const t=this.getUrlLocale(e)||this.getBrowserLocale(e)||this.getBrowserSimilarLocale(e)||e.locale;this.setState({locale:t})}getUrlLocale(e){const t=new URL(window.location.href).searchParams.get("locale");if(t){const r=e.supportedLocales.find(e=>t===e.locale);if(r)return r.locale}}getBrowserLocale(e){const t=e.supportedLocales.find(e=>navigator.language===e.locale);if(t)return t.locale}getBrowserSimilarLocale(e){const t=navigator.language.split("-")[0],r=e.supportedLocales.find(e=>t===e.locale.split("-")[0]);if(r)return r.locale}onUpdateLocaleRequested(e){this.setState({locale:e}),this.setUrlLocale(e)}setUrlLocale(e){const t=new URL(window.location.href);t.searchParams.set("locale",e),window.history.replaceState(null,null,t)}isReady(){return null!==this.state.siteSettings&&null!==this.state.locale}render(){return n.createElement(l.Provider,{value:this.state},this.isReady()&&n.createElement(Jt,{loadingPath:`${this.state.trustedDomain}/locales/{{lng}}/{{ns}}.json`},n.createElement(A,{value:{userId:this.userId,token:this.token}},n.createElement("div",{id:"container",className:"container page login"},n.createElement("div",{className:"content"},n.createElement("div",{className:"header"},n.createElement("div",{className:"logo-svg"},n.createElement(ur,{role:"img",width:"20rem",height:"3.5rem"}))),n.createElement("div",{className:"login-form"},n.createElement(dt,null)),n.createElement(or,null)),n.createElement(vt,null)))))}}const Er=mr,fr=document.createElement("div");document.body.appendChild(fr),(0,s.H)(fr).render(n.createElement(Er,null))}},r={};function n(e){var s=r[e];if(void 0!==s)return s.exports;var a=r[e]={exports:{}};return t[e].call(a.exports,a,a.exports,n),a.exports}n.m=t,e=[],n.O=(t,r,s,a)=>{if(!r){var o=1/0;for(h=0;h<e.length;h++){for(var[r,s,a]=e[h],i=!0,l=0;l<r.length;l++)(!1&a||o>=a)&&Object.keys(n.O).every(e=>n.O[e](r[l]))?r.splice(l--,1):(i=!1,a<o&&(o=a));if(i){e.splice(h--,1);var c=s();void 0!==c&&(t=c)}}return t}a=a||0;for(var h=e.length;h>0&&e[h-1][2]>a;h--)e[h]=e[h-1];e[h]=[r,s,a]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.j=478,n.dn=e=>{(Object.getOwnPropertyDescriptor(e,"name")||{}).writable||Object.defineProperty(e,"name",{value:"default",configurable:!0})},(()=>{var e={478:0};n.O.j=t=>0===e[t];var t=(t,r)=>{var s,a,[o,i,l]=r,c=0;if(o.some(t=>0!==e[t])){for(s in i)n.o(i,s)&&(n.m[s]=i[s]);if(l)var h=l(n)}for(t&&t(r);c<o.length;c++)a=o[c],n.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return n.O(h)},r=self.webpackChunkpassbolt_styleguide=self.webpackChunkpassbolt_styleguide||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var s=n.O(void 0,[847],()=>n(8286));s=n.O(s)})();
|
|
2
|
+
(()=>{"use strict";var e,t={3062(e,t,s){var n=s(6540),i=s(5338);function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)({}).hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e},r.apply(null,arguments)}const a=n.createContext({user:null,users:null,roles:null,rememberMeOptions:{},resources:null,resource:null,shareResources:null,selectedResources:null,selectedUser:null,folders:null,resourceCommentId:null,mustRefreshComments:!1,siteSettings:null,userSettings:null,onCheckIsAuthenticatedRequested:null});function o(e){return class extends n.Component{render(){return n.createElement(a.Consumer,null,t=>n.createElement(e,r({context:t},this.props)))}}}const l=a;var c=s(5556),h=s.n(c);class d extends Error{constructor(e,t){super(e),this.name="PassboltApiFetchError",this.data=t||{}}}const p=d;class u extends Error{constructor(){super("An internal error occurred. The server response could not be parsed. Please contact your administrator."),this.name="PassboltBadResponseError"}}const m=u;class g extends Error{constructor(e){super(e=e||"The service is unavailable"),this.name="PassboltServiceUnavailableError"}}const E=g,y=["GET","POST","PUT","DELETE"];class b{constructor(e){if(this.options=e,!this.options.getBaseUrl())throw new TypeError("ApiClient constructor error: baseUrl is required.");if(!this.options.getResourceName())throw new TypeError("ApiClient constructor error: resourceName is required.");try{let e=this.options.getBaseUrl().toString();e.endsWith("/")&&(e=e.slice(0,-1));let t=this.options.getResourceName();t.startsWith("/")&&(t=t.slice(1)),t.endsWith("/")&&(t=t.slice(0,-1)),this.baseUrl=`${e}/${t}`,this.baseUrl=new URL(this.baseUrl)}catch(e){throw new TypeError("ApiClient constructor error: b.",{cause:e})}this.apiVersion="api-version=v2"}getDefaultHeaders(){return{Accept:"application/json","content-type":"application/json"}}async buildFetchOptions(){const e=await this.options.getHeaders();return{credentials:"include",headers:{...this.getDefaultHeaders(),...e}}}async get(e,t){this.assertValidId(e);const s=this.buildUrl(`${this.baseUrl}/${e}`,t||{});return this.fetchAndHandleResponse("GET",s)}async delete(e,t,s,n){let i;this.assertValidId(e),void 0===n&&(n=!1),i=n?this.buildUrl(`${this.baseUrl}/${e}/dry-run`,s||{}):this.buildUrl(`${this.baseUrl}/${e}`,s||{});let r=null;return t&&(r=this.buildBody(t)),this.fetchAndHandleResponse("DELETE",i,r)}async findAll(e){const t=this.buildUrl(this.baseUrl.toString(),e||{});return this.fetchAndHandleResponse("GET",t)}async create(e,t){const s=this.buildUrl(this.baseUrl.toString(),t||{}),n=this.buildBody(e);return this.fetchAndHandleResponse("POST",s,n)}async update(e,t,s,n){let i;this.assertValidId(e),void 0===n&&(n=!1),i=n?this.buildUrl(`${this.baseUrl}/${e}/dry-run`,s||{}):this.buildUrl(`${this.baseUrl}/${e}`,s||{});let r=null;return t&&(r=this.buildBody(t)),this.fetchAndHandleResponse("PUT",i,r)}async updateAll(e,t={}){const s=this.buildUrl(this.baseUrl.toString(),t),n=e?this.buildBody(e):null;return this.fetchAndHandleResponse("PUT",s,n)}assertValidId(e){if(!e)throw new TypeError("ApiClient.assertValidId error: id cannot be empty");if("string"!=typeof e)throw new TypeError("ApiClient.assertValidId error: id should be a string")}assertMethod(e){if("string"!=typeof e)throw new TypeError("ApiClient.assertValidMethod method should be a string.");if(y.indexOf(e.toUpperCase())<0)throw new TypeError(`ApiClient.assertValidMethod error: method ${e} is not supported.`)}assertUrl(e){if(!e)throw new TypeError("ApliClient.assertUrl error: url is required.");if(!(e instanceof URL))throw new TypeError("ApliClient.assertUrl error: url should be a valid URL object.");if("https:"!==e.protocol&&"http:"!==e.protocol)throw new TypeError("ApliClient.assertUrl error: url protocol should only be https or http.")}assertBody(e){if(!(e instanceof FormData)&&"string"!=typeof e)throw new TypeError("ApiClient.assertBody error: body should be a string or a FormData.")}buildBody(e){return JSON.stringify(e)}buildUrl(e,t){if("string"!=typeof e)throw new TypeError("ApiClient.buildUrl error: url should be a string.");const s=new URL(`${e}.json?${this.apiVersion}`);t=t||{};for(const[e,n]of Object.entries(t)){if("string"!=typeof e)throw new TypeError("ApiClient.buildUrl error: urlOptions key should be a string.");if("string"==typeof n)s.searchParams.append(e,n);else{if(!Array.isArray(n))throw new TypeError("ApiClient.buildUrl error: urlOptions value should be a string or array.");n.forEach(t=>{s.searchParams.append(e,t)})}}return s}async sendRequest(e,t,s,n){this.assertUrl(t),this.assertMethod(e),s&&this.assertBody(s);const i="undefined"!=typeof customApiClientFetch?customApiClientFetch:fetch,r={...await this.buildFetchOptions(),...n};r.method=e,s&&(r.body=s);try{return await i(t.toString(),r)}catch(e){throw console.error(e),navigator.onLine?new E("Unable to reach the server, an unexpected error occurred"):new E("Unable to reach the server, you are not connected to the network")}}async fetchAndHandleResponse(e,t,s,n){const i=await this.sendRequest(e,t,s,n);return this.parseResponseJson(i)}async parseResponseJson(e){let t;try{t=await e.json()}catch(t){throw console.debug(e.url.toString(),t),new m(t,e)}if(!e.ok){const s=t.header.message;throw new p(s,{code:e.status,body:t.body})}return t}}const f="chrome",v="edge",T="firefox",w="safari";function S(){const e=window.navigator.userAgent.toLowerCase();let t;return t=e.indexOf("firefox")>-1?T:e.indexOf("samsungbrowser")>-1?"samsung":e.indexOf("opera")>-1||e.indexOf("opr")>-1?"opera":e.indexOf("trident")>-1?"internet-explorer":e.indexOf("edg")>-1?v:e.indexOf("chrome")>-1?f:e.indexOf("safari")>-1?w:"unknown",t}const x=class{constructor(e){e.setResourceName("auth"),this.apiClient=new b(e)}async logout(){const e=this.apiClient.buildUrl(`${this.apiClient.baseUrl}/logout`,{}),t=await this.apiClient.sendRequest("POST",e,null,{redirect:"manual"});if(!t.ok&&0!==t.status)return this._logoutLegacy()}async _logoutLegacy(){const e=this.apiClient.buildUrl(`${this.apiClient.baseUrl}/logout`,{}),t=await this.apiClient.sendRequest("GET",e,null,{redirect:"manual"});if(!t.ok&&0!==t.status)throw new p("An unexpected error happened during the legacy logout process",{code:t.status})}};class A{static reload(){window.location.reload()}}function C(){return C=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)({}).hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e},C.apply(null,arguments)}const R=n.createContext({userId:null,token:null,state:null,unexpectedError:null,onInitializeRecoverRequested:()=>{},logoutUserAndRefresh:()=>{}});class q extends n.Component{constructor(e){super(e),this.state=Object.assign(this.defaultState,e.value),this.authLogoutService=new x(e.context.getApiClientOptions())}get defaultState(){return{userId:null,token:null,state:O.INITIAL_STATE,unexpectedError:null,onInitializeRecoverRequested:this.onInitializeRecoverRequested.bind(this),logoutUserAndRefresh:this.logoutUserAndRefresh.bind(this),handleSafariExtensionDownloading:this.handleSafariExtensionDownloading.bind(this),handleSafariExtensionNotDownloaded:this.handleSafariExtensionNotDownloaded.bind(this),handleExtensionAlreadyInstalled:this.handleExtensionAlreadyInstalled.bind(this)}}async onInitializeRecoverRequested(){return this.state.userId&&this.state.token?this.isBrowserSupported()?void await this.startRecover().then(this.handleStartRecoverSuccess.bind(this)).catch(this.handleStartRecoverError.bind(this)):this.setState({state:O.DOWNLOAD_SUPPORTED_BROWSER_STATE}):this.setState({state:O.REQUEST_INVITATION_ERROR})}handleStartRecoverSuccess(){const e=S()===w?O.INSTALL_SAFARI_EXTENSION_STATE:O.INSTALL_EXTENSION_STATE;this.setState({state:e})}handleSafariExtensionDownloading(){const e=O.CONFIGURE_SAFARI_EXTENSION_STATE;this.setState({state:e})}handleSafariExtensionNotDownloaded(){const e=O.INSTALL_SAFARI_EXTENSION_STATE;this.setState({state:e})}handleExtensionAlreadyInstalled(){const e=O.CONFIGURE_SAFARI_EXTENSION_STATE;this.setState({state:e})}handleStartRecoverError(e){if(e instanceof p){if(403===e.data.code)return this.setState({state:O.ERROR_ALREADY_SIGNED_IN_STATE});const t=Boolean(e.data.body?.token?.expired),s=Boolean(e.data.body?.token?.isActive);if(t||s)return this.setState({state:O.TOKEN_EXPIRED_STATE});if(400===e?.data?.code)return this.setState({state:O.REQUEST_INVITATION_ERROR})}return this.setState({state:O.UNEXPECTED_ERROR_STATE})}async logoutUserAndRefresh(){try{await this.authLogoutService.logout()}catch(e){const t=new E(e.message);return this.setState({unexpectedError:t,state:O.UNEXPECTED_ERROR_STATE})}A.reload()}isBrowserSupported(){const e=S(),t=[f,T,v];return this.props.context.siteSettings.canIUse("safari")&&t.push(w),t.includes(e)}async startRecover(){const e=this.props.context.getApiClientOptions();e.setResourceName("setup");const t=new b(e);await t.get(`recover/${this.state.userId}/${this.state.token}`)}render(){return n.createElement(R.Provider,{value:this.state},this.props.children)}}q.propTypes={context:h().any,value:h().any,children:h().any};const N=o(q);function k(e){return class extends n.Component{render(){return n.createElement(R.Consumer,null,t=>n.createElement(e,C({apiRecoverContext:t},this.props)))}}}const O={INITIAL_STATE:"Initial state",DOWNLOAD_SUPPORTED_BROWSER_STATE:"Download supported browser state",INSTALL_EXTENSION_STATE:"Install extension state",INSTALL_SAFARI_EXTENSION_STATE:"Install Safari extension state",CONFIGURE_SAFARI_EXTENSION_STATE:"Configure Safari extension state",TOKEN_EXPIRED_STATE:"Token expired state",ERROR_ALREADY_SIGNED_IN_STATE:"Error, already signed in state",REQUEST_INVITATION_ERROR:"Request inviration error state",UNEXPECTED_ERROR_STATE:"Unexpected error state"};var _,I,P=s(9762);function D(){return D=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)({}).hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e},D.apply(null,arguments)}const U=function(e){return n.createElement("svg",D({width:18,height:18,fill:"none",className:"svg-icon spinner",viewBox:"0 0 18 18"},e),_||(_=n.createElement("circle",{id:"background",cx:8,cy:8,r:8,fill:"none",stroke:"var(--spinner-background)",strokeWidth:"var(--spinner-stroke-width)",transform:"translate(1 1)"})),I||(I=n.createElement("circle",{id:"loading",r:8,fill:"none",stroke:"var(--spinner-color)",strokeLinecap:"round",strokeWidth:"var(--spinner-stroke-width)",transform:"translate(9 9)"})))};class G extends n.Component{render(){return n.createElement("div",{className:"login-processing"},n.createElement("h1",null,this.props.title),n.createElement("div",{className:"processing-wrapper"},n.createElement(U,null)))}}G.propTypes={title:h().oneOfType([h().arrayOf(h().node),h().node,h().string])},G.defaultProps={title:n.createElement(P.x6,null,"Please wait...")};const L=(0,P.CI)("common")(G),M="https://download.passbolt.com/extension/chrome";class F extends n.Component{constructor(e){super(e),this.state=this.getDefaultState(),this.bindCallbacks()}getDefaultState(){const e=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";return{browserName:S(),theme:e}}bindCallbacks(){this.handleRefreshClick=this.handleRefreshClick.bind(this)}get browserStoreThumbnailUrl(){const e="dark"===this.state.theme?"white":"black";switch(this.state.browserName){case T:return`${this.props.context.trustedDomain}/img/third_party/FirefoxAMO_${e}.svg`;case v:return`${this.props.context.trustedDomain}/img/third_party/edge-addon-${e}.svg`;default:return`${this.props.context.trustedDomain}/img/third_party/ChromeWebStore_${e}.svg`}}get storeUrl(){switch(this.state.browserName){case f:return M;case T:return"https://addons.mozilla.org/firefox/addon/passbolt";case v:return"https://microsoftedge.microsoft.com/addons/detail/passbolt-extension/ljeppgjhohmhpbdhjjjbiflabdgfkhpo";default:return M}}get storeClassName(){return`browser-webstore ${this.state.browserName}`}handleRefreshClick(){A.reload()}render(){return n.createElement("div",{className:"install-extension"},n.createElement("h1",null,n.createElement(P.x6,null,"Please install the browser extension.")),n.createElement("p",null,n.createElement(P.x6,null,"Please download the browser extension and refresh this page to continue.")),this.state.browserName&&n.createElement("a",{href:this.storeUrl,className:this.storeClassName,target:"_blank",rel:"noopener noreferrer"},n.createElement("img",{src:this.browserStoreThumbnailUrl,alt:"browser store thumbnail"})),n.createElement("div",{className:"form-actions"},n.createElement("a",{href:this.storeUrl,className:"button primary big full-width",role:"button",target:"_blank",rel:"noopener noreferrer"},n.createElement(P.x6,null,"Download extension")),n.createElement("button",{className:"link",type:"button",onClick:this.handleRefreshClick},n.createElement(P.x6,null,"Refresh to detect extension"))))}}F.propTypes={context:h().any};const $=o((0,P.CI)("common")(F));class j extends n.Component{constructor(e){super(e),this.state=this.getDefaultState()}getDefaultState(){return{selectedBrowser:this.compatibleBrowserList[0]}}handleBrowserButtonClick(e){this.setState({selectedBrowser:e})}get compatibleBrowserList(){const e=[{name:"Mozilla Firefox",img:"firefox.svg",url:"https://www.mozilla.org/"},{name:"Google Chrome",img:"chrome.svg",url:"https://www.google.com/chrome/"},{name:"Microsoft Edge",img:"edge.svg",url:"https://www.microsoft.com/edge"},{name:"Brave",img:"brave.svg",url:"https://www.brave.com/"},{name:"Vivaldi",img:"vivaldi.svg",url:"https://www.vivaldi.com/"}];return this.props.context.siteSettings.canIUse("safari")&&e.push({name:"Safari",img:"safari.svg",url:"https://www.apple.com/safari/"}),e}render(){return n.createElement("div",{className:"browser-not-supported"},n.createElement("h1",null,n.createElement(P.x6,null,"Sorry, your browser is not supported.")),n.createElement("p",null,n.createElement(P.x6,null,"Please download one of these browsers to get started with passbolt:")),n.createElement("div",{className:"browser-button-list"},this.compatibleBrowserList.map((e,t)=>n.createElement("button",{key:t,className:"browser"+(e.name===this.state.selectedBrowser.name?" focused":""),target:"_blank",onClick:()=>this.handleBrowserButtonClick(e)},n.createElement("img",{src:`${this.props.context.trustedDomain}/img/third_party/${e.img}`})))),n.createElement("div",{className:"form-actions"},n.createElement("a",{href:this.state.selectedBrowser.url,rel:"noopener noreferrer",className:"button primary big full-width",role:"button",target:"_blank"},n.createElement(P.x6,null,"Download ",{browserName:this.state.selectedBrowser.name}))))}}j.propTypes={context:h().any};const V=o((0,P.CI)("common")(j));class K extends n.Component{render(){return n.createElement("div",{className:"setup-error"},n.createElement("h1",null,n.createElement(P.x6,null,"Access to this service requires an invitation.")),n.createElement("p",null,n.createElement(P.x6,null,"This email is not associated with any approved users on this domain.")," ",n.createElement(P.x6,null,"Please contact your administrator to request an invitation link.")),n.createElement("div",{className:"form-actions"},n.createElement("a",{href:`${this.props.context.trustedDomain}/users/recover`,className:"button primary big full-width",role:"button",rel:"noopener noreferrer"},n.createElement(P.x6,null,"Try with another email"))))}}K.propTypes={context:h().any};const B=o((0,P.CI)("common")(K));class z extends n.Component{render(){return n.createElement("div",{className:"setup-error"},n.createElement("h1",null,n.createElement(P.x6,null,"The invitation is expired.")),n.createElement("p",null,n.createElement(P.x6,null,"You can request another invitation email by clicking on the button below.")),n.createElement("div",{className:"form-actions"},n.createElement("a",{href:`${this.props.context.trustedDomain}/users/recover`,className:"button primary big full-width",role:"button",rel:"noopener noreferrer"},n.createElement(P.x6,null,"Request invitation"))))}}z.propTypes={context:h().any};const H=o((0,P.CI)("common")(z)),W="setup",Y="recover",Z="account-recovery";class X extends n.Component{render(){return n.createElement("div",{className:"setup-error"},n.createElement("h1",null,n.createElement(P.x6,null,"Cannot perform the action while being logged in")),n.createElement("p",null,{[W]:n.createElement(P.x6,null,"It is not possible to perform a setup of a new account as you are still logged in. You need to log out first before continuing."),[Y]:n.createElement(P.x6,null,"It is not possible to perform the recovery of your account as you are still logged in. You need to log out first before continuing."),[Z]:n.createElement(P.x6,null,"It is not possible to recover your private key of your account as you are still logged in. You need to log out first before continuing.")}[this.props.displayAs]),n.createElement("div",{className:"form-actions"},n.createElement("button",{onClick:this.props.onLogoutButtonClick.bind(this),className:"button primary big full-width",role:"button"},n.createElement(P.x6,null,"Sign out"))))}}X.propTypes={displayAs:h().oneOf([W,Y,Z]).isRequired,onLogoutButtonClick:h().func.isRequired};const J=(0,P.CI)("common")(X);var Q;function ee(){return ee=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)({}).hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e},ee.apply(null,arguments)}const te=function(e){return n.createElement("svg",ee({xmlns:"http://www.w3.org/2000/svg",width:10,height:8,fill:"none",viewBox:"0 0 10 8"},e),Q||(Q=n.createElement("path",{stroke:"var(--icon-color)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"m1 2 4 4 4-4"})))};var se;function ne(){return ne=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)({}).hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e},ne.apply(null,arguments)}const ie=function(e){return n.createElement("svg",ne({xmlns:"http://www.w3.org/2000/svg",width:8,height:10,fill:"none",viewBox:"0 0 8 10"},e),se||(se=n.createElement("path",{stroke:"var(--icon-color)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"m2 9 4-4-4-4"})))};class re extends n.Component{constructor(e){super(e),this.state=this.defaultState,this.bindCallbacks()}get defaultState(){return{showErrorDetails:!1}}bindCallbacks(){this.handleErrorDetailsToggle=this.handleErrorDetailsToggle.bind(this)}onClick(){this.props.context.port?this.props.context.port.request("passbolt.tab.reload"):A.reload()}handleErrorDetailsToggle(){this.setState({showErrorDetails:!this.state.showErrorDetails})}get hasErrorDetails(){const e=this.props?.error;return Boolean(e?.details)||Boolean(e?.data?.body)}formatErrors(){const e=this.props.error?.details||this.props.error?.data;return JSON.stringify(e,null,4)}render(){return n.createElement("div",{className:"setup-error"},n.createElement("h1",null,this.props.title),n.createElement("p",null,this.props.message),n.createElement("p",null,this.props.error&&this.props.error.message),this.hasErrorDetails&&n.createElement("div",{className:"accordion error-details"},n.createElement("div",{className:"accordion-header"},n.createElement("button",{className:"no-border",type:"button",onClick:this.handleErrorDetailsToggle},this.state.showErrorDetails?n.createElement(te,{className:"caret-down"}):n.createElement(ie,{className:"caret-right"}),n.createElement("span",null,n.createElement(P.x6,null,"Error details")))),this.state.showErrorDetails&&n.createElement("div",{className:"accordion-content"},n.createElement("div",{className:"input text"},n.createElement("label",{htmlFor:"js_field_debug",className:"visuallyhidden"},n.createElement(P.x6,null,"Error details")),n.createElement("textarea",{id:"js_field_debug",defaultValue:`${this.formatErrors()}`,readOnly:!0})))),n.createElement("div",{className:"form-actions"},n.createElement("button",{onClick:this.onClick.bind(this),className:"button primary big full-width",role:"button"},n.createElement(P.x6,null,"Try again"))))}}re.defaultProps={title:n.createElement(P.x6,null,"Something went wrong!"),message:n.createElement(P.x6,null,"The operation failed with the following error:")},re.propTypes={context:h().any,title:h().oneOfType([h().arrayOf(h().node),h().node,h().string]),message:h().oneOfType([h().arrayOf(h().node),h().node,h().string]),error:h().any};const ae=o((0,P.CI)("common")(re));var oe,le;function ce(){return ce=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)({}).hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e},ce.apply(null,arguments)}const he=function(e){return n.createElement("svg",ce({xmlns:"http://www.w3.org/2000/svg",id:"livetype",viewBox:"0 0 119.664 40"},e),oe||(oe=n.createElement("title",null,"Download_on_the_App_Store_Badge_US-UK_RGB_blk_4SVG_092917")),n.createElement("path",{d:"M110.135 0H9.535Q8.986 0 8.44.002q-.457.004-.919.013A13 13 0 0 0 5.517.19a6.7 6.7 0 0 0-1.9.627 6.4 6.4 0 0 0-1.62 1.18A6.3 6.3 0 0 0 .82 3.617a6.6 6.6 0 0 0-.625 1.903 13 13 0 0 0-.179 2.002c-.01.307-.01.615-.015.921V31.56c.005.31.006.61.015.921a13 13 0 0 0 .18 2.002 6.6 6.6 0 0 0 .624 1.905A6.2 6.2 0 0 0 1.998 38a6.3 6.3 0 0 0 1.618 1.179 6.7 6.7 0 0 0 1.901.63 13.5 13.5 0 0 0 2.004.177c.31.007.613.011.919.011.366.002.728.002 1.095.002h100.6c.36 0 .724 0 1.084-.002.304 0 .617-.004.922-.01a13 13 0 0 0 2-.178 6.8 6.8 0 0 0 1.908-.63A6.3 6.3 0 0 0 117.666 38a6.4 6.4 0 0 0 1.182-1.614 6.6 6.6 0 0 0 .619-1.905 13.5 13.5 0 0 0 .185-2.002c.004-.31.004-.61.004-.921.008-.364.008-.725.008-1.094V9.536q.002-.549-.008-1.092.001-.46-.004-.92a13.5 13.5 0 0 0-.185-2.003 6.6 6.6 0 0 0-.62-1.903 6.47 6.47 0 0 0-2.798-2.8 6.8 6.8 0 0 0-1.908-.627 13 13 0 0 0-2-.176c-.305-.005-.618-.011-.922-.013-.36-.002-.725-.002-1.084-.002Z",style:{fill:"#a6a6a6"}}),le||(le=n.createElement("path",{d:"M8.445 39.125c-.305 0-.602-.004-.904-.01a13 13 0 0 1-1.87-.164 5.9 5.9 0 0 1-1.656-.548 5.4 5.4 0 0 1-1.397-1.016 5.3 5.3 0 0 1-1.02-1.397 5.7 5.7 0 0 1-.544-1.657 12.4 12.4 0 0 1-.166-1.875c-.007-.21-.015-.913-.015-.913v-23.1s.009-.692.015-.895a12.4 12.4 0 0 1 .165-1.872 5.8 5.8 0 0 1 .544-1.662 5.4 5.4 0 0 1 1.015-1.398 5.6 5.6 0 0 1 1.402-1.023 5.8 5.8 0 0 1 1.653-.544A12.6 12.6 0 0 1 7.543.887l.902-.012h102.769l.913.013a12.4 12.4 0 0 1 1.858.162 6 6 0 0 1 1.671.548 5.6 5.6 0 0 1 2.415 2.42 5.8 5.8 0 0 1 .535 1.649 13 13 0 0 1 .174 1.887c.003.283.003.588.003.89.008.375.008.732.008 1.092v20.929c0 .363 0 .718-.008 1.075 0 .325 0 .623-.004.93a13 13 0 0 1-.17 1.853 5.7 5.7 0 0 1-.54 1.67 5.5 5.5 0 0 1-1.016 1.386 5.4 5.4 0 0 1-1.4 1.022 5.9 5.9 0 0 1-1.668.55 12.5 12.5 0 0 1-1.869.163c-.293.007-.6.011-.897.011l-1.084.002Z"})),n.createElement("g",{id:"_Group_","data-name":"<Group>"},n.createElement("g",{id:"_Group_2","data-name":"<Group>"},n.createElement("g",{id:"_Group_3","data-name":"<Group>"},n.createElement("path",{id:"_Path_",d:"M24.769 20.3a4.95 4.95 0 0 1 2.356-4.151 5.07 5.07 0 0 0-3.99-2.158c-1.68-.176-3.308 1.005-4.164 1.005-.872 0-2.19-.988-3.608-.958a5.32 5.32 0 0 0-4.473 2.728c-1.934 3.348-.491 8.269 1.361 10.976.927 1.325 2.01 2.805 3.428 2.753 1.387-.058 1.905-.885 3.58-.885 1.658 0 2.144.885 3.59.852 1.489-.025 2.426-1.332 3.32-2.67a11 11 0 0 0 1.52-3.092 4.78 4.78 0 0 1-2.92-4.4","data-name":"<Path>",style:{fill:"#fff"}}),n.createElement("path",{id:"_Path_2",d:"M22.037 12.21a4.87 4.87 0 0 0 1.115-3.49 4.96 4.96 0 0 0-3.208 1.66A4.64 4.64 0 0 0 18.8 13.74a4.1 4.1 0 0 0 3.237-1.53","data-name":"<Path>",style:{fill:"#fff"}}))),n.createElement("path",{d:"M42.302 27.14H37.57l-1.137 3.356h-2.005l4.484-12.418h2.083l4.483 12.418h-2.039Zm-4.243-1.55h3.752l-1.85-5.446h-.051ZM55.16 25.97c0 2.813-1.506 4.62-3.779 4.62a3.07 3.07 0 0 1-2.848-1.583h-.043v4.484H46.63V21.442h1.8v1.506h.033a3.21 3.21 0 0 1 2.883-1.6c2.298 0 3.813 1.816 3.813 4.622m-1.91 0c0-1.833-.948-3.038-2.393-3.038-1.42 0-2.375 1.23-2.375 3.038 0 1.824.955 3.046 2.375 3.046 1.445 0 2.393-1.197 2.393-3.046M65.125 25.97c0 2.813-1.506 4.62-3.779 4.62a3.07 3.07 0 0 1-2.848-1.583h-.043v4.484h-1.859V21.442h1.799v1.506h.034a3.21 3.21 0 0 1 2.883-1.6c2.298 0 3.813 1.816 3.813 4.622m-1.91 0c0-1.833-.948-3.038-2.393-3.038-1.42 0-2.375 1.23-2.375 3.038 0 1.824.955 3.046 2.375 3.046 1.445 0 2.392-1.197 2.392-3.046M71.71 27.036c.138 1.232 1.334 2.04 2.97 2.04 1.566 0 2.693-.808 2.693-1.919 0-.964-.68-1.54-2.29-1.936l-1.609-.388c-2.28-.55-3.339-1.617-3.339-3.348 0-2.142 1.867-3.614 4.519-3.614 2.624 0 4.423 1.472 4.483 3.614h-1.876c-.112-1.239-1.136-1.987-2.634-1.987s-2.521.757-2.521 1.858c0 .878.654 1.395 2.255 1.79l1.368.336c2.548.603 3.606 1.626 3.606 3.443 0 2.323-1.85 3.778-4.793 3.778-2.754 0-4.614-1.42-4.734-3.667ZM83.346 19.3v2.142h1.722v1.472h-1.722v4.991c0 .776.345 1.137 1.102 1.137a6 6 0 0 0 .611-.043v1.463a5 5 0 0 1-1.032.086c-1.833 0-2.548-.689-2.548-2.445v-5.189h-1.316v-1.472h1.316V19.3ZM86.065 25.97c0-2.849 1.678-4.639 4.294-4.639 2.625 0 4.295 1.79 4.295 4.639 0 2.856-1.661 4.638-4.295 4.638s-4.294-1.782-4.294-4.638m6.695 0c0-1.954-.895-3.108-2.401-3.108s-2.4 1.162-2.4 3.108c0 1.962.894 3.106 2.4 3.106s2.401-1.144 2.401-3.106M96.186 21.442h1.773v1.541h.043a2.16 2.16 0 0 1 2.177-1.635 3 3 0 0 1 .637.069v1.738a2.6 2.6 0 0 0-.835-.112 1.873 1.873 0 0 0-1.937 2.083v5.37h-1.858ZM109.384 27.837c-.25 1.643-1.85 2.771-3.898 2.771-2.634 0-4.269-1.764-4.269-4.595 0-2.84 1.644-4.682 4.19-4.682 2.506 0 4.08 1.72 4.08 4.466v.637h-6.394v.112a2.358 2.358 0 0 0 2.436 2.564 2.05 2.05 0 0 0 2.09-1.273Zm-6.282-2.702h4.526a2.177 2.177 0 0 0-2.22-2.298 2.29 2.29 0 0 0-2.306 2.298",style:{fill:"#fff"}})),n.createElement("g",{id:"_Group_4","data-name":"<Group>"},n.createElement("path",{d:"M37.826 8.731a2.64 2.64 0 0 1 2.808 2.965c0 1.906-1.03 3.002-2.808 3.002h-2.155V8.73Zm-1.228 5.123h1.125a1.876 1.876 0 0 0 1.967-2.146 1.88 1.88 0 0 0-1.967-2.134h-1.125ZM41.68 12.444a2.133 2.133 0 1 1 4.248 0 2.134 2.134 0 1 1-4.247 0m3.334 0c0-.976-.439-1.547-1.208-1.547-.773 0-1.207.571-1.207 1.547 0 .984.434 1.55 1.207 1.55.77 0 1.208-.57 1.208-1.55M51.573 14.698h-.922l-.93-3.317h-.07l-.927 3.317h-.913l-1.242-4.503h.902l.806 3.436h.067l.926-3.436h.852l.926 3.436h.07l.803-3.436h.889ZM53.854 10.195h.855v.715h.066a1.35 1.35 0 0 1 1.344-.802 1.465 1.465 0 0 1 1.559 1.675v2.915h-.889v-2.692c0-.724-.314-1.084-.972-1.084a1.033 1.033 0 0 0-1.075 1.141v2.635h-.888ZM59.094 8.437h.888v6.26h-.888ZM61.218 12.444a2.133 2.133 0 1 1 4.247 0 2.134 2.134 0 1 1-4.247 0m3.333 0c0-.976-.439-1.547-1.208-1.547-.773 0-1.207.571-1.207 1.547 0 .984.434 1.55 1.207 1.55.77 0 1.208-.57 1.208-1.55M66.4 13.424c0-.81.604-1.278 1.676-1.344l1.22-.07v-.389c0-.475-.315-.744-.922-.744-.497 0-.84.182-.939.5h-.86c.09-.773.818-1.27 1.84-1.27 1.128 0 1.765.563 1.765 1.514v3.077h-.855v-.633h-.07a1.52 1.52 0 0 1-1.353.707 1.36 1.36 0 0 1-1.501-1.348m2.895-.384v-.377l-1.1.07c-.62.042-.9.253-.9.65 0 .405.351.64.834.64a1.06 1.06 0 0 0 1.166-.983M71.348 12.444c0-1.423.732-2.324 1.87-2.324a1.48 1.48 0 0 1 1.38.79h.067V8.437h.888v6.26h-.851v-.71h-.07a1.56 1.56 0 0 1-1.415.785c-1.145 0-1.869-.901-1.869-2.328m.918 0c0 .955.45 1.53 1.203 1.53.75 0 1.212-.583 1.212-1.526 0-.938-.468-1.53-1.212-1.53-.748 0-1.203.58-1.203 1.526M79.23 12.444a2.133 2.133 0 1 1 4.247 0 2.134 2.134 0 1 1-4.247 0m3.333 0c0-.976-.438-1.547-1.208-1.547-.772 0-1.207.571-1.207 1.547 0 .984.435 1.55 1.207 1.55.77 0 1.208-.57 1.208-1.55M84.67 10.195h.855v.715h.066a1.35 1.35 0 0 1 1.344-.802 1.465 1.465 0 0 1 1.559 1.675v2.915h-.889v-2.692c0-.724-.314-1.084-.972-1.084a1.033 1.033 0 0 0-1.075 1.141v2.635h-.889ZM93.515 9.074v1.141h.976v.749h-.976v2.315c0 .472.194.679.637.679a3 3 0 0 0 .339-.021v.74a3 3 0 0 1-.484.046c-.988 0-1.381-.348-1.381-1.216v-2.543h-.715v-.749h.715V9.074ZM95.705 8.437h.88v2.481h.07a1.39 1.39 0 0 1 1.374-.806 1.483 1.483 0 0 1 1.55 1.679v2.907h-.889V12.01c0-.72-.335-1.084-.963-1.084a1.052 1.052 0 0 0-1.134 1.142v2.63h-.888ZM104.761 13.482a1.83 1.83 0 0 1-1.95 1.303 2.045 2.045 0 0 1-2.081-2.325 2.077 2.077 0 0 1 2.076-2.352c1.253 0 2.009.856 2.009 2.27v.31h-3.18v.05a1.19 1.19 0 0 0 1.2 1.29 1.08 1.08 0 0 0 1.07-.546Zm-3.126-1.451h2.275a1.086 1.086 0 0 0-1.109-1.167 1.15 1.15 0 0 0-1.166 1.167",style:{fill:"#fff"}})))},de="https://apps.apple.com/app/6754879299";class pe extends n.Component{constructor(e){super(e),this.bindCallbacks()}bindCallbacks(){this.handleInstallExtensionClick=this.handleInstallExtensionClick.bind(this),this.handleAlreadyInstalledClick=this.handleAlreadyInstalledClick.bind(this)}handleAlreadyInstalledClick(){this.props.onExtensionAlreadyInstalled()}handleInstallExtensionClick(){this.props.onExtensionDownloading()}render(){return n.createElement("div",{className:"install-extension"},n.createElement("h1",null,n.createElement(P.x6,null,"Please install the browser extension (BETA).")),n.createElement("p",null,n.createElement(P.x6,null,"Please download the browser extension and refresh this page to continue.")),n.createElement("a",{href:de,className:"browser-webstore safari",target:"_blank",rel:"noopener noreferrer",onClick:this.handleInstallExtensionClick},n.createElement(he,null)),n.createElement("div",{className:"form-actions"},n.createElement("a",{href:de,className:"button primary big full-width",role:"button",target:"_blank",rel:"noopener noreferrer",onClick:this.handleInstallExtensionClick},n.createElement(P.x6,null,"Download extension")),n.createElement("button",{className:"link",type:"button",onClick:this.handleAlreadyInstalledClick},n.createElement(P.x6,null,"I already installed the extension"))))}}pe.propTypes={context:h().any,onExtensionDownloading:h().func,onExtensionAlreadyInstalled:h().func};const ue=o((0,P.CI)("common")(pe));var me,ge,Ee,ye,be,fe,ve,Te,we,Se,xe,Ae,Ce,Re,qe,Ne,ke,Oe,_e,Ie,Pe,De;function Ue(){return Ue=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)({}).hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e},Ue.apply(null,arguments)}const Ge=function(e){return n.createElement("svg",Ue({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 484 307"},e),me||(me=n.createElement("rect",{width:483,height:306,x:.5,y:.5,fill:"#EBEBEB",rx:16.3})),ge||(ge=n.createElement("rect",{width:483,height:306,x:.5,y:.5,stroke:"#F5F5F5",rx:16.3})),Ee||(Ee=n.createElement("circle",{cx:21.613,cy:18.2,r:4.594,fill:"#EE6B5F",stroke:"#E93F30",strokeWidth:.438})),ye||(ye=n.createElement("circle",{cx:36.487,cy:18.2,r:4.594,fill:"#F5BE50",stroke:"#F2AD21",strokeWidth:.438})),be||(be=n.createElement("circle",{cx:51.362,cy:18.2,r:4.594,fill:"#62C655",stroke:"#47AC3A",strokeWidth:.438})),fe||(fe=n.createElement("rect",{width:25.106,height:24.105,x:146.275,y:6.147,fill:"#FDFDFD",rx:12.053})),ve||(ve=n.createElement("rect",{width:25.106,height:24.105,x:146.275,y:6.147,stroke:"#FEFEFE",rx:12.053})),Te||(Te=n.createElement("path",{fill:"#272727",d:"m165.841 17.203-6.06-5.592a1.42 1.42 0 0 0-.951-.364c-.352 0-.691.13-.95.364l-3.803 3.524a3.4 3.4 0 0 1 1.306.858c.361.382.624.843.768 1.344h5.134a.49.49 0 0 1 .337.137.47.47 0 0 1 .138.33v.768a.47.47 0 0 1-.475.467h-.593v1.085a.46.46 0 0 1-.292.432.5.5 0 0 1-.182.036h-1.301a.48.48 0 0 1-.439-.289.5.5 0 0 1-.035-.178v-1.086h-2.292a3.2 3.2 0 0 1-.759 1.36 3.3 3.3 0 0 1-1.315.86l3.82 3.53a1.42 1.42 0 0 0 1.901 0l6.05-5.59a1.364 1.364 0 0 0-.007-1.996"})),we||(we=n.createElement("path",{fill:"#272727",d:"M152.951 16.66a1.7 1.7 0 0 0-.712.169c-.248.12-.459.304-.61.531a1.5 1.5 0 0 0-.076 1.543c.129.24.321.442.556.586a1.577 1.577 0 0 0 2.161-.518c.141-.234.216-.5.216-.772a1.47 1.47 0 0 0-.436-1.086 1.56 1.56 0 0 0-1.099-.453"})),Se||(Se=n.createElement("rect",{width:185.694,height:24.2,x:186.381,y:6.1,fill:"#FDFDFD",rx:12.1})),xe||(xe=n.createElement("rect",{width:185.694,height:24.2,x:186.381,y:6.1,stroke:"#FEFEFE",rx:12.1})),Ae||(Ae=n.createElement("mask",{id:"a",fill:"#fff"},n.createElement("path",{d:"M172.799 44.954a5.6 5.6 0 0 0 3.245 1.036h74.14c12.372 0 22.401 10.03 22.401 22.4v178.137c0 12.371-10.029 22.401-22.401 22.401H68.307c-12.372 0-22.4-10.03-22.4-22.401V68.391c0-12.372 10.028-22.4 22.4-22.4h74.139a5.6 5.6 0 0 0 3.245-1.037L156 37.625a5.6 5.6 0 0 1 6.49 0z"}))),Ce||(Ce=n.createElement("path",{fill:"#F8F8F8",d:"M172.799 44.954a5.6 5.6 0 0 0 3.245 1.036h74.14c12.372 0 22.401 10.03 22.401 22.4v178.137c0 12.371-10.029 22.401-22.401 22.401H68.307c-12.372 0-22.4-10.03-22.4-22.401V68.391c0-12.372 10.028-22.4 22.4-22.4h74.139a5.6 5.6 0 0 0 3.245-1.037L156 37.625a5.6 5.6 0 0 1 6.49 0z"})),Re||(Re=n.createElement("path",{fill:"#A9A9A9",d:"m145.691 44.954-.405-.57zm27.108 0 .405-.57zm3.245 1.036v.7h74.14v-1.4h-74.14zm74.14 0v.7c11.985 0 21.701 9.716 21.701 21.7h1.4c0-12.757-10.343-23.1-23.101-23.1zm22.401 22.4h-.7v178.137h1.4V68.391h-.7Zm0 178.137h-.7c0 11.985-9.716 21.701-21.701 21.701v1.4c12.758 0 23.101-10.343 23.101-23.101zm-22.401 22.401v-.7H68.307v1.4h181.877zm-181.877 0v-.7c-11.985 0-21.7-9.716-21.7-21.701h-1.4c0 12.758 10.342 23.101 23.1 23.101zm-22.4-22.401h.7V68.391h-1.4v178.136zm0-178.136h.7c0-11.985 9.715-21.7 21.7-21.7v-1.4c-12.758 0-23.1 10.342-23.1 23.1zm22.4-22.4v.7h74.139v-1.4h-74.14zm77.384-1.037.406.57 10.309-7.328-.406-.57-.405-.571-10.309 7.329zm16.799-7.329-.406.57 10.309 7.33.406-.57.405-.571-10.309-7.33zm-20.044 8.365v.7a6.3 6.3 0 0 0 3.651-1.165l-.406-.57-.405-.571a4.9 4.9 0 0 1-2.84.906zM156 37.625l.406.57a4.9 4.9 0 0 1 5.678 0l.406-.57.405-.57a6.3 6.3 0 0 0-7.3 0zm20.044 8.365v-.7a4.9 4.9 0 0 1-2.84-.906l-.405.57-.406.57a6.3 6.3 0 0 0 3.651 1.166z",mask:"url(#safari_quickaccess_configuration_light_svg__a)"})),qe||(qe=n.createElement("path",{stroke:"#000",strokeLinecap:"round",strokeOpacity:.1,strokeWidth:7.388,d:"M72.024 63.89h174.452m-164.46 11.2h154.467m-127.822 11.2h101.178"})),Ne||(Ne=n.createElement("path",{stroke:"#000",strokeLinecap:"round",strokeOpacity:.1,strokeWidth:3.694,d:"M72.024 108.689h174.452M108.661 119.89h101.178M72.024 131.089h174.452M82.016 142.29h154.467m-127.822 11.199h101.178"})),ke||(ke=n.createElement("g",{opacity:.5},n.createElement("rect",{width:191.8,height:22.4,x:63.35,y:175.89,fill:"#3D76F9",rx:11.2}),n.createElement("path",{stroke:"#000",strokeLinecap:"round",strokeOpacity:.25,strokeWidth:2.8,d:"M130.051 187.089h58.398"}))),Oe||(Oe=n.createElement("g",{opacity:.5},n.createElement("rect",{width:191.8,height:22.4,x:63.35,y:203.89,fill:"#C5C5C5",rx:11.2}),n.createElement("path",{stroke:"#000",strokeLinecap:"round",strokeOpacity:.25,strokeWidth:2.8,d:"M130.051 215.089h58.398"}))),_e||(_e=n.createElement("rect",{width:191.8,height:22,x:63.35,y:231.89,fill:"#E4E4E4",rx:11})),Ie||(Ie=n.createElement("rect",{width:191.8,height:22,x:63.35,y:231.89,stroke:"#D40101",strokeWidth:3,rx:11})),Pe||(Pe=n.createElement("path",{fill:"#000",d:"M82.929 246.89h-.923l2.67-7.273h.91l2.67 7.273h-.924l-2.173-6.123h-.057zm.34-2.841h3.722v.781H83.27zm6.844-4.432v7.273h-.838v-7.273zm2.77 7.273-1.661-5.455h.88l1.18 4.176h.056l1.165-4.176h.895l1.15 4.162h.057l1.18-4.162h.88l-1.662 5.455h-.824l-1.193-4.191h-.085l-1.193 4.191h-.824Zm8.495.127q-.519 0-.941-.195a1.6 1.6 0 0 1-.671-.572q-.249-.377-.249-.909 0-.468.185-.76.185-.294.493-.461.31-.167.682-.249.376-.085.757-.135.497-.063.806-.096.312-.034.454-.117.146-.081.146-.284v-.028q0-.526-.288-.817-.284-.291-.863-.291-.6 0-.941.263-.34.262-.479.561l-.795-.285q.212-.496.568-.774.358-.28.781-.39a3.2 3.2 0 0 1 .838-.114q.262 0 .604.064.344.06.664.252.323.192.536.579t.213 1.037v3.594h-.838v-.739h-.043a1.5 1.5 0 0 1-.284.38q-.198.203-.529.344-.33.142-.806.142m.128-.752q.497 0 .838-.196a1.32 1.32 0 0 0 .696-1.154v-.767q-.054.064-.234.117a4 4 0 0 1-.412.089 18 18 0 0 1-.803.107 3 3 0 0 0-.611.138 1.05 1.05 0 0 0-.454.281q-.171.184-.171.504 0 .436.323.66.327.22.828.221m4.246 2.67q-.213 0-.38-.035a1 1 0 0 1-.231-.064l.213-.739q.306.078.54.057a.65.65 0 0 0 .416-.21q.184-.184.337-.6l.156-.426-2.017-5.483h.909l1.506 4.347h.057l1.505-4.347h.91l-2.316 6.25a2.4 2.4 0 0 1-.387.7 1.45 1.45 0 0 1-.536.415q-.302.135-.682.135m8.89-6.278-.752.213a1.4 1.4 0 0 0-.21-.366 1 1 0 0 0-.369-.298 1.35 1.35 0 0 0-.6-.117q-.5 0-.835.23-.33.228-.33.579 0 .313.227.494.228.181.71.302l.81.198q.732.178 1.09.544.359.362.359.934 0 .469-.27.838-.267.369-.746.582a2.7 2.7 0 0 1-1.115.213q-.835 0-1.381-.362-.547-.362-.693-1.058l.796-.199q.113.441.429.66.32.22.835.221.587 0 .93-.249.348-.252.348-.604a.63.63 0 0 0-.199-.475q-.198-.196-.61-.292l-.909-.213q-.75-.178-1.101-.55-.348-.377-.348-.941 0-.462.259-.817.262-.355.714-.558a2.5 2.5 0 0 1 1.03-.202q.809 0 1.271.355.465.355.66.938m4.586 4.233h-.923l2.67-7.273h.909l2.671 7.273h-.924l-2.173-6.123h-.057zm.341-2.841h3.721v.781h-3.721zm6.843-4.432v7.273h-.838v-7.273zm2.373 0v7.273h-.838v-7.273zm3.751 7.386q-.74 0-1.296-.351a2.4 2.4 0 0 1-.867-.984q-.309-.632-.309-1.477 0-.852.309-1.488.312-.636.867-.987.557-.352 1.296-.352.738 0 1.292.352.558.351.867.987.312.636.312 1.488 0 .845-.312 1.477a2.36 2.36 0 0 1-.867.984q-.554.351-1.292.351m0-.753q.561 0 .923-.287a1.7 1.7 0 0 0 .536-.757q.174-.469.174-1.015a2.9 2.9 0 0 0-.174-1.019 1.7 1.7 0 0 0-.536-.764q-.362-.291-.923-.291c-.561 0-.682.097-.924.291q-.362.291-.536.764a2.9 2.9 0 0 0-.174 1.019q0 .546.174 1.015a1.7 1.7 0 0 0 .536.757q.363.288.924.287m4.801.64-1.662-5.455h.881l1.179 4.176h.056l1.165-4.176h.895l1.151 4.162h.056l1.179-4.162h.881l-1.662 5.455h-.824l-1.193-4.191h-.085l-1.193 4.191zm11.917.113q-.738 0-1.296-.351a2.4 2.4 0 0 1-.866-.984q-.309-.632-.309-1.477 0-.852.309-1.488.312-.636.866-.987.558-.352 1.296-.352.74 0 1.293.352.558.351.867.987.312.636.312 1.488 0 .845-.312 1.477a2.36 2.36 0 0 1-.867.984q-.554.351-1.293.351m0-.753q.561 0 .924-.287a1.7 1.7 0 0 0 .536-.757q.174-.469.174-1.015a2.9 2.9 0 0 0-.174-1.019 1.7 1.7 0 0 0-.536-.764q-.363-.291-.924-.291c-.561 0-.681.097-.923.291q-.362.291-.536.764a2.9 2.9 0 0 0-.174 1.019q0 .546.174 1.015a1.7 1.7 0 0 0 .536.757q.362.288.923.287m4.589-2.642v3.282h-.838v-5.455h.81v.852h.071q.192-.415.582-.667.391-.256 1.009-.256.553 0 .969.227.416.225.647.682.231.455.231 1.151v3.466h-.839v-3.409q0-.644-.333-1.002-.334-.362-.917-.362-.4 0-.717.174a1.24 1.24 0 0 0-.493.508 1.7 1.7 0 0 0-.182.809m7.938 3.282v-7.273h4.389v.781h-3.508v2.458h3.281v.781h-3.281v2.471h3.565v.782zm10.323-5.455-2.017 5.455h-.852l-2.017-5.455h.909l1.506 4.347h.056l1.506-4.347zm3.198 5.568q-.789 0-1.36-.348a2.33 2.33 0 0 1-.877-.98q-.306-.632-.306-1.47t.306-1.477q.309-.644.859-1.002.554-.362 1.293-.362.426 0 .841.142.416.143.757.462.34.316.543.838t.203 1.285v.355h-4.205v-.724h3.352a1.8 1.8 0 0 0-.184-.824 1.4 1.4 0 0 0-.519-.572 1.46 1.46 0 0 0-.788-.209q-.501 0-.867.249a1.63 1.63 0 0 0-.557.639q-.195.393-.196.845v.483q0 .618.214 1.047.216.427.6.65.382.22.891.22.33 0 .597-.092.27-.096.465-.284a1.3 1.3 0 0 0 .302-.476l.809.227a1.8 1.8 0 0 1-.429.725q-.303.309-.746.483-.444.17-.998.17m3.533-.113v-5.455h.81v.824h.057q.148-.405.54-.657.39-.252.88-.252l.231.003q.138.004.21.011v.852a3 3 0 0 0-.512-.056q-.398 0-.71.166a1.23 1.23 0 0 0-.668 1.112v3.452zm4.427 2.045q-.213 0-.38-.035a1 1 0 0 1-.231-.064l.213-.739q.306.078.54.057a.64.64 0 0 0 .415-.21q.185-.184.338-.6l.156-.426-2.017-5.483h.909l1.506 4.347h.057l1.505-4.347h.909l-2.315 6.25a2.4 2.4 0 0 1-.387.7 1.46 1.46 0 0 1-.536.415q-.303.135-.682.135m9.274-2.045-1.989-7.273h.895l1.52 5.923h.071l1.548-5.923h.994l1.549 5.923h.071l1.52-5.923h.895l-1.989 7.273h-.909l-1.605-5.796h-.057l-1.605 5.796zm9.836.113q-.788 0-1.36-.348a2.33 2.33 0 0 1-.877-.98q-.305-.632-.305-1.47t.305-1.477q.31-.644.859-1.002.555-.362 1.293-.362.426 0 .842.142.415.143.756.462.341.316.543.838.203.522.203 1.285v.355h-4.205v-.724h3.353q0-.462-.185-.824a1.4 1.4 0 0 0-.519-.572 1.46 1.46 0 0 0-.788-.209q-.501 0-.866.249a1.6 1.6 0 0 0-.558.639q-.195.393-.195.845v.483q0 .618.213 1.047.216.427.6.65.384.22.891.22.33 0 .597-.092.27-.096.465-.284a1.3 1.3 0 0 0 .302-.476l.81.227a1.8 1.8 0 0 1-.43.725q-.302.309-.746.483-.443.17-.998.17m3.647-.113v-7.273h.838v2.685h.071q.093-.142.256-.363.167-.223.476-.397.312-.178.845-.178.689 0 1.215.345.525.344.82.976.294.633.295 1.492 0 .866-.295 1.502a2.33 2.33 0 0 1-.817.98 2.14 2.14 0 0 1-1.204.344q-.525 0-.841-.174a1.6 1.6 0 0 1-.487-.401 6 6 0 0 1-.263-.376h-.099v.838zm.824-2.728q0 .618.181 1.091.181.468.529.735.349.262.853.262.525 0 .877-.277a1.7 1.7 0 0 0 .533-.752q.18-.476.181-1.059 0-.575-.178-1.037a1.6 1.6 0 0 0-.529-.735q-.351-.273-.884-.273-.512 0-.86.259-.348.256-.525.717a2.9 2.9 0 0 0-.178 1.069m9.137-1.505-.753.213a1.4 1.4 0 0 0-.209-.366 1 1 0 0 0-.369-.298 1.35 1.35 0 0 0-.601-.117q-.5 0-.834.23-.33.228-.33.579 0 .313.227.494t.71.302l.81.198q.732.178 1.09.544.359.362.359.934 0 .469-.27.838-.267.369-.746.582-.48.213-1.115.213-.835 0-1.381-.362-.548-.362-.693-1.058l.796-.199q.113.441.429.66.32.22.835.221.586 0 .93-.249.348-.252.348-.604a.63.63 0 0 0-.199-.475q-.199-.196-.61-.292l-.91-.213q-.749-.177-1.1-.55-.348-.377-.348-.941 0-.462.259-.817.262-.356.714-.558a2.5 2.5 0 0 1 1.029-.202q.81 0 1.272.355.465.355.66.938m1.361 4.233v-5.455h.838v5.455zm.426-6.364a.6.6 0 0 1-.422-.167.54.54 0 0 1-.174-.401q0-.234.174-.401a.6.6 0 0 1 .422-.167.58.58 0 0 1 .419.167.53.53 0 0 1 .178.401q0 .234-.178.401a.58.58 0 0 1-.419.167m4.319.909v.71h-2.826v-.71zm-2.002-1.307h.838v5.199q0 .355.103.533a.53.53 0 0 0 .27.234q.167.057.351.057.138 0 .227-.014l.142-.029.171.753a1.6 1.6 0 0 1-.238.064 1.7 1.7 0 0 1-.387.036q-.355 0-.696-.153a1.4 1.4 0 0 1-.561-.465q-.22-.313-.22-.789zm5.491 6.875q-.787 0-1.36-.348a2.34 2.34 0 0 1-.877-.98q-.305-.632-.305-1.47t.305-1.477q.31-.644.86-1.002.554-.362 1.292-.362.426 0 .842.142.416.143.756.462.342.316.544.838t.202 1.285v.355h-4.205v-.724h3.353q0-.462-.185-.824a1.4 1.4 0 0 0-.518-.572 1.46 1.46 0 0 0-.789-.209 1.5 1.5 0 0 0-.866.249 1.6 1.6 0 0 0-.558.639q-.195.393-.195.845v.483q0 .618.213 1.047.216.427.6.65.384.22.891.22.33 0 .597-.092.27-.096.465-.284a1.3 1.3 0 0 0 .302-.476l.81.227a1.8 1.8 0 0 1-.43.725q-.302.309-.746.483-.443.17-.998.17m4.145-.057a.61.61 0 0 1-.451-.188.61.61 0 0 1-.189-.451q0-.262.189-.451a.62.62 0 0 1 .451-.188q.262 0 .451.188a.62.62 0 0 1 .188.451.66.66 0 0 1-.32.554.6.6 0 0 1-.319.085m2.754 0a.61.61 0 0 1-.451-.188.61.61 0 0 1-.189-.451q0-.262.189-.451a.62.62 0 0 1 .451-.188q.262 0 .451.188a.62.62 0 0 1 .188.451.66.66 0 0 1-.32.554.6.6 0 0 1-.319.085m2.753 0a.61.61 0 0 1-.451-.188.62.62 0 0 1-.188-.451q0-.262.188-.451a.62.62 0 0 1 .451-.188q.264 0 .451.188a.62.62 0 0 1 .189.451.66.66 0 0 1-.32.554.6.6 0 0 1-.32.085"})),De||(De=n.createElement("path",{fill:"#D40101",d:"M362.322 245.635a2.8 2.8 0 0 0 0-5.6zm-96.363-4.78a2.8 2.8 0 0 0 0 3.96l17.819 17.819a2.801 2.801 0 0 0 3.96-3.96l-15.839-15.839 15.839-15.839a2.8 2.8 0 1 0-3.96-3.96zm96.363 1.98v-2.8h-94.383v5.6h94.383z"})))};var Le,Me,Fe,$e,je,Ve,Ke,Be,ze,He,We,Ye,Ze,Xe,Je,Qe,et,tt,st,nt,it,rt;function at(){return at=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)({}).hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e},at.apply(null,arguments)}const ot=function(e){return n.createElement("svg",at({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 484 307"},e),Le||(Le=n.createElement("rect",{width:483,height:306,x:.5,y:.5,fill:"#232222",rx:16.3})),Me||(Me=n.createElement("rect",{width:483,height:306,x:.5,y:.5,stroke:"#4F4F4F",rx:16.3})),Fe||(Fe=n.createElement("circle",{cx:21.613,cy:18.2,r:4.594,fill:"#EE6B5F",stroke:"#E93F30",strokeWidth:.438})),$e||($e=n.createElement("circle",{cx:36.487,cy:18.2,r:4.594,fill:"#F5BE50",stroke:"#F2AD21",strokeWidth:.438})),je||(je=n.createElement("circle",{cx:51.362,cy:18.2,r:4.594,fill:"#62C655",stroke:"#47AC3A",strokeWidth:.438})),Ve||(Ve=n.createElement("rect",{width:25.106,height:24.105,x:146.275,y:6.147,fill:"#2C2A2A",rx:12.053})),Ke||(Ke=n.createElement("rect",{width:25.106,height:24.105,x:146.275,y:6.147,stroke:"#474747",rx:12.053})),Be||(Be=n.createElement("path",{fill:"#DFE0E1",d:"m165.841 17.203-6.06-5.592a1.42 1.42 0 0 0-.951-.364c-.352 0-.691.13-.95.364l-3.803 3.524a3.4 3.4 0 0 1 1.306.858c.361.382.624.843.768 1.344h5.134a.49.49 0 0 1 .337.137.47.47 0 0 1 .138.33v.768a.47.47 0 0 1-.475.467h-.593v1.085a.46.46 0 0 1-.292.432.5.5 0 0 1-.182.036h-1.301a.48.48 0 0 1-.439-.289.5.5 0 0 1-.035-.178v-1.086h-2.292a3.2 3.2 0 0 1-.759 1.36 3.3 3.3 0 0 1-1.315.86l3.82 3.53a1.42 1.42 0 0 0 1.901 0l6.05-5.59a1.364 1.364 0 0 0-.007-1.996"})),ze||(ze=n.createElement("path",{fill:"#DFE0E1",d:"M152.951 16.66a1.7 1.7 0 0 0-.712.169c-.248.12-.459.304-.61.531a1.5 1.5 0 0 0-.076 1.543c.129.24.321.442.556.586a1.577 1.577 0 0 0 2.161-.518c.141-.234.216-.5.216-.772a1.47 1.47 0 0 0-.436-1.086 1.56 1.56 0 0 0-1.099-.453"})),He||(He=n.createElement("rect",{width:185.694,height:24.2,x:186.381,y:6.1,fill:"#2C2A2A",rx:12.1})),We||(We=n.createElement("rect",{width:185.694,height:24.2,x:186.381,y:6.1,stroke:"#474747",rx:12.1})),Ye||(Ye=n.createElement("mask",{id:"a",fill:"#fff"},n.createElement("path",{fillRule:"evenodd",d:"M172.799 44.954a5.6 5.6 0 0 0 3.245 1.036h74.14c12.372 0 22.401 10.03 22.401 22.4v178.137c0 12.372-10.029 22.401-22.401 22.401H68.307c-12.372 0-22.4-10.029-22.4-22.401V68.391c0-12.372 10.028-22.4 22.4-22.4h74.139a5.6 5.6 0 0 0 3.245-1.037L156 37.625a5.6 5.6 0 0 1 6.49 0z",clipRule:"evenodd"}))),Ze||(Ze=n.createElement("path",{fill:"#3B3C3F",fillRule:"evenodd",d:"M172.799 44.954a5.6 5.6 0 0 0 3.245 1.036h74.14c12.372 0 22.401 10.03 22.401 22.4v178.137c0 12.372-10.029 22.401-22.401 22.401H68.307c-12.372 0-22.4-10.029-22.4-22.401V68.391c0-12.372 10.028-22.4 22.4-22.4h74.139a5.6 5.6 0 0 0 3.245-1.037L156 37.625a5.6 5.6 0 0 1 6.49 0z",clipRule:"evenodd"})),Xe||(Xe=n.createElement("path",{fill:"#7E7F80",d:"m145.691 44.954-.405-.57zm27.108 0 .405-.57zm3.245 1.036v.7h74.14v-1.4h-74.14zm74.14 0v.7c11.985 0 21.701 9.716 21.701 21.7h1.4c0-12.757-10.343-23.1-23.101-23.1zm22.401 22.4h-.7v178.137h1.4V68.391h-.7Zm0 178.137h-.7c0 11.985-9.716 21.701-21.701 21.701v1.4c12.758 0 23.101-10.343 23.101-23.101zm-22.401 22.401v-.7H68.307v1.4h181.877zm-181.877 0v-.7c-11.985 0-21.7-9.716-21.7-21.701h-1.4c0 12.758 10.342 23.101 23.1 23.101zm-22.4-22.401h.7V68.391h-1.4v178.136zm0-178.136h.7c0-11.985 9.715-21.7 21.7-21.7v-1.4c-12.758 0-23.1 10.342-23.1 23.1zm22.4-22.4v.7h74.139v-1.4h-74.14zm77.384-1.037.406.57 10.309-7.328-.406-.57-.405-.571-10.309 7.329zm16.799-7.329-.406.57 10.309 7.33.406-.57.405-.571-10.309-7.33zm-20.044 8.365v.7a6.3 6.3 0 0 0 3.651-1.165l-.406-.57-.405-.571a4.9 4.9 0 0 1-2.84.906zM156 37.625l.406.57a4.9 4.9 0 0 1 5.678 0l.406-.57.405-.57a6.3 6.3 0 0 0-7.3 0zm20.044 8.365v-.7a4.9 4.9 0 0 1-2.84-.906l-.405.57-.406.57a6.3 6.3 0 0 0 3.651 1.166z",mask:"url(#safari_quickaccess_configuration_dark_svg__a)"})),Je||(Je=n.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeOpacity:.1,strokeWidth:7.388,d:"M72.024 63.89h174.452m-164.46 11.2h154.467m-127.822 11.2h101.178"})),Qe||(Qe=n.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeOpacity:.1,strokeWidth:3.694,d:"M72.024 108.689h174.452M108.661 119.89h101.178M72.024 131.089h174.452M82.016 142.29h154.467m-127.822 11.199h101.178"})),et||(et=n.createElement("g",{opacity:.5},n.createElement("rect",{width:191.8,height:22.4,x:63.35,y:175.89,fill:"#007CFF",rx:11.2}),n.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeWidth:2.8,d:"M130.051 187.089h58.398"}))),tt||(tt=n.createElement("g",{opacity:.5},n.createElement("rect",{width:191.8,height:22.4,x:63.35,y:203.89,fill:"#727273",rx:11.2}),n.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeWidth:2.8,d:"M130.051 215.089h58.398"}))),st||(st=n.createElement("rect",{width:191.8,height:22,x:63.35,y:231.89,fill:"#575759",rx:11})),nt||(nt=n.createElement("rect",{width:191.8,height:22,x:63.35,y:231.89,stroke:"#D40101",strokeWidth:3,rx:11})),it||(it=n.createElement("path",{fill:"#fff",d:"M82.929 246.89h-.923l2.67-7.273h.91l2.67 7.273h-.924l-2.173-6.123h-.057zm.34-2.841h3.722v.781H83.27zm6.844-4.432v7.273h-.838v-7.273zm2.77 7.273-1.661-5.455h.88l1.18 4.176h.056l1.165-4.176h.895l1.15 4.162h.057l1.18-4.162h.88l-1.662 5.455h-.824l-1.193-4.191h-.085l-1.193 4.191h-.824Zm8.495.127q-.519 0-.941-.195a1.6 1.6 0 0 1-.671-.572q-.249-.377-.249-.909 0-.468.185-.76.185-.294.493-.461.31-.167.682-.249.376-.085.757-.135.497-.063.806-.096.312-.034.454-.117.146-.081.146-.284v-.028q0-.526-.288-.817-.284-.291-.863-.291-.6 0-.941.263-.34.262-.479.561l-.795-.285q.212-.496.568-.774.358-.28.781-.39a3.2 3.2 0 0 1 .838-.114q.262 0 .604.064.344.06.664.252.323.192.536.579t.213 1.037v3.594h-.838v-.739h-.043a1.5 1.5 0 0 1-.284.38q-.198.203-.529.344-.33.142-.806.142m.128-.752q.497 0 .838-.196a1.32 1.32 0 0 0 .696-1.154v-.767q-.054.064-.234.117a4 4 0 0 1-.412.089 18 18 0 0 1-.803.107 3 3 0 0 0-.611.138 1.05 1.05 0 0 0-.454.281q-.171.184-.171.504 0 .436.323.66.327.22.828.221m4.246 2.67q-.213 0-.38-.035a1 1 0 0 1-.231-.064l.213-.739q.306.078.54.057a.65.65 0 0 0 .416-.21q.184-.184.337-.6l.156-.426-2.017-5.483h.909l1.506 4.347h.057l1.505-4.347h.91l-2.316 6.25a2.4 2.4 0 0 1-.387.7 1.45 1.45 0 0 1-.536.415q-.302.135-.682.135m8.89-6.278-.752.213a1.4 1.4 0 0 0-.21-.366 1 1 0 0 0-.369-.298 1.35 1.35 0 0 0-.6-.117q-.5 0-.835.23-.33.228-.33.579 0 .313.227.494.228.181.71.302l.81.198q.732.178 1.09.544.359.362.359.934 0 .469-.27.838-.267.369-.746.582a2.7 2.7 0 0 1-1.115.213q-.835 0-1.381-.362-.547-.362-.693-1.058l.796-.199q.113.441.429.66.32.22.835.221.587 0 .93-.249.348-.252.348-.604a.63.63 0 0 0-.199-.475q-.198-.196-.61-.292l-.909-.213q-.75-.178-1.101-.55-.348-.377-.348-.941 0-.462.259-.817.262-.355.714-.558a2.5 2.5 0 0 1 1.03-.202q.809 0 1.271.355.465.355.66.938m4.586 4.233h-.923l2.67-7.273h.909l2.671 7.273h-.924l-2.173-6.123h-.057zm.341-2.841h3.721v.781h-3.721zm6.843-4.432v7.273h-.838v-7.273zm2.373 0v7.273h-.838v-7.273zm3.751 7.386q-.74 0-1.296-.351a2.4 2.4 0 0 1-.867-.984q-.309-.632-.309-1.477 0-.852.309-1.488.312-.636.867-.987.557-.352 1.296-.352.738 0 1.292.352.558.351.867.987.312.636.312 1.488 0 .845-.312 1.477a2.36 2.36 0 0 1-.867.984q-.554.351-1.292.351m0-.753q.561 0 .923-.287a1.7 1.7 0 0 0 .536-.757q.174-.469.174-1.015a2.9 2.9 0 0 0-.174-1.019 1.7 1.7 0 0 0-.536-.764q-.362-.291-.923-.291c-.561 0-.682.097-.924.291q-.362.291-.536.764a2.9 2.9 0 0 0-.174 1.019q0 .546.174 1.015a1.7 1.7 0 0 0 .536.757q.363.288.924.287m4.801.64-1.662-5.455h.881l1.179 4.176h.056l1.165-4.176h.895l1.151 4.162h.056l1.179-4.162h.881l-1.662 5.455h-.824l-1.193-4.191h-.085l-1.193 4.191zm11.917.113q-.738 0-1.296-.351a2.4 2.4 0 0 1-.866-.984q-.309-.632-.309-1.477 0-.852.309-1.488.312-.636.866-.987.558-.352 1.296-.352.74 0 1.293.352.558.351.867.987.312.636.312 1.488 0 .845-.312 1.477a2.36 2.36 0 0 1-.867.984q-.554.351-1.293.351m0-.753q.561 0 .924-.287a1.7 1.7 0 0 0 .536-.757q.174-.469.174-1.015a2.9 2.9 0 0 0-.174-1.019 1.7 1.7 0 0 0-.536-.764q-.363-.291-.924-.291c-.561 0-.681.097-.923.291q-.362.291-.536.764a2.9 2.9 0 0 0-.174 1.019q0 .546.174 1.015a1.7 1.7 0 0 0 .536.757q.362.288.923.287m4.589-2.642v3.282h-.838v-5.455h.81v.852h.071q.192-.415.582-.667.391-.256 1.009-.256.553 0 .969.227.416.225.647.682.231.455.231 1.151v3.466h-.839v-3.409q0-.644-.333-1.002-.334-.362-.917-.362-.4 0-.717.174a1.24 1.24 0 0 0-.493.508 1.7 1.7 0 0 0-.182.809m7.938 3.282v-7.273h4.389v.781h-3.508v2.458h3.281v.781h-3.281v2.471h3.565v.782zm10.323-5.455-2.017 5.455h-.852l-2.017-5.455h.909l1.506 4.347h.056l1.506-4.347zm3.198 5.568q-.789 0-1.36-.348a2.33 2.33 0 0 1-.877-.98q-.306-.632-.306-1.47t.306-1.477q.309-.644.859-1.002.554-.362 1.293-.362.426 0 .841.142.416.143.757.462.34.316.543.838t.203 1.285v.355h-4.205v-.724h3.352a1.8 1.8 0 0 0-.184-.824 1.4 1.4 0 0 0-.519-.572 1.46 1.46 0 0 0-.788-.209q-.501 0-.867.249a1.63 1.63 0 0 0-.557.639q-.195.393-.196.845v.483q0 .618.214 1.047.216.427.6.65.382.22.891.22.33 0 .597-.092.27-.096.465-.284a1.3 1.3 0 0 0 .302-.476l.809.227a1.8 1.8 0 0 1-.429.725q-.303.309-.746.483-.444.17-.998.17m3.533-.113v-5.455h.81v.824h.057q.148-.405.54-.657.39-.252.88-.252l.231.003q.138.004.21.011v.852a3 3 0 0 0-.512-.056q-.398 0-.71.166a1.23 1.23 0 0 0-.668 1.112v3.452zm4.427 2.045q-.213 0-.38-.035a1 1 0 0 1-.231-.064l.213-.739q.306.078.54.057a.64.64 0 0 0 .415-.21q.185-.184.338-.6l.156-.426-2.017-5.483h.909l1.506 4.347h.057l1.505-4.347h.909l-2.315 6.25a2.4 2.4 0 0 1-.387.7 1.46 1.46 0 0 1-.536.415q-.303.135-.682.135m9.274-2.045-1.989-7.273h.895l1.52 5.923h.071l1.548-5.923h.994l1.549 5.923h.071l1.52-5.923h.895l-1.989 7.273h-.909l-1.605-5.796h-.057l-1.605 5.796zm9.836.113q-.788 0-1.36-.348a2.33 2.33 0 0 1-.877-.98q-.305-.632-.305-1.47t.305-1.477q.31-.644.859-1.002.555-.362 1.293-.362.426 0 .842.142.415.143.756.462.341.316.543.838.203.522.203 1.285v.355h-4.205v-.724h3.353q0-.462-.185-.824a1.4 1.4 0 0 0-.519-.572 1.46 1.46 0 0 0-.788-.209q-.501 0-.866.249a1.6 1.6 0 0 0-.558.639q-.195.393-.195.845v.483q0 .618.213 1.047.216.427.6.65.384.22.891.22.33 0 .597-.092.27-.096.465-.284a1.3 1.3 0 0 0 .302-.476l.81.227a1.8 1.8 0 0 1-.43.725q-.302.309-.746.483-.443.17-.998.17m3.647-.113v-7.273h.838v2.685h.071q.093-.142.256-.363.167-.223.476-.397.312-.178.845-.178.689 0 1.215.345.525.344.82.976.294.633.295 1.492 0 .866-.295 1.502a2.33 2.33 0 0 1-.817.98 2.14 2.14 0 0 1-1.204.344q-.525 0-.841-.174a1.6 1.6 0 0 1-.487-.401 6 6 0 0 1-.263-.376h-.099v.838zm.824-2.728q0 .618.181 1.091.181.468.529.735.349.262.853.262.525 0 .877-.277a1.7 1.7 0 0 0 .533-.752q.18-.476.181-1.059 0-.575-.178-1.037a1.6 1.6 0 0 0-.529-.735q-.351-.273-.884-.273-.512 0-.86.259-.348.256-.525.717a2.9 2.9 0 0 0-.178 1.069m9.137-1.505-.753.213a1.4 1.4 0 0 0-.209-.366 1 1 0 0 0-.369-.298 1.35 1.35 0 0 0-.601-.117q-.5 0-.834.23-.33.228-.33.579 0 .313.227.494t.71.302l.81.198q.732.178 1.09.544.359.362.359.934 0 .469-.27.838-.267.369-.746.582-.48.213-1.115.213-.835 0-1.381-.362-.548-.362-.693-1.058l.796-.199q.113.441.429.66.32.22.835.221.586 0 .93-.249.348-.252.348-.604a.63.63 0 0 0-.199-.475q-.199-.196-.61-.292l-.91-.213q-.749-.177-1.1-.55-.348-.377-.348-.941 0-.462.259-.817.262-.356.714-.558a2.5 2.5 0 0 1 1.029-.202q.81 0 1.272.355.465.355.66.938m1.361 4.233v-5.455h.838v5.455zm.426-6.364a.6.6 0 0 1-.422-.167.54.54 0 0 1-.174-.401q0-.234.174-.401a.6.6 0 0 1 .422-.167.58.58 0 0 1 .419.167.53.53 0 0 1 .178.401q0 .234-.178.401a.58.58 0 0 1-.419.167m4.319.909v.71h-2.826v-.71zm-2.002-1.307h.838v5.199q0 .355.103.533a.53.53 0 0 0 .27.234q.167.057.351.057.138 0 .227-.014l.142-.029.171.753a1.6 1.6 0 0 1-.238.064 1.7 1.7 0 0 1-.387.036q-.355 0-.696-.153a1.4 1.4 0 0 1-.561-.465q-.22-.313-.22-.789zm5.491 6.875q-.787 0-1.36-.348a2.34 2.34 0 0 1-.877-.98q-.305-.632-.305-1.47t.305-1.477q.31-.644.86-1.002.554-.362 1.292-.362.426 0 .842.142.416.143.756.462.342.316.544.838t.202 1.285v.355h-4.205v-.724h3.353q0-.462-.185-.824a1.4 1.4 0 0 0-.518-.572 1.46 1.46 0 0 0-.789-.209 1.5 1.5 0 0 0-.866.249 1.6 1.6 0 0 0-.558.639q-.195.393-.195.845v.483q0 .618.213 1.047.216.427.6.65.384.22.891.22.33 0 .597-.092.27-.096.465-.284a1.3 1.3 0 0 0 .302-.476l.81.227a1.8 1.8 0 0 1-.43.725q-.302.309-.746.483-.443.17-.998.17m4.145-.057a.61.61 0 0 1-.451-.188.61.61 0 0 1-.189-.451q0-.262.189-.451a.62.62 0 0 1 .451-.188q.262 0 .451.188a.62.62 0 0 1 .188.451.66.66 0 0 1-.32.554.6.6 0 0 1-.319.085m2.754 0a.61.61 0 0 1-.451-.188.61.61 0 0 1-.189-.451q0-.262.189-.451a.62.62 0 0 1 .451-.188q.262 0 .451.188a.62.62 0 0 1 .188.451.66.66 0 0 1-.32.554.6.6 0 0 1-.319.085m2.753 0a.61.61 0 0 1-.451-.188.62.62 0 0 1-.188-.451q0-.262.188-.451a.62.62 0 0 1 .451-.188q.264 0 .451.188a.62.62 0 0 1 .189.451.66.66 0 0 1-.32.554.6.6 0 0 1-.32.085"})),rt||(rt=n.createElement("path",{fill:"#D40101",d:"M362.322 245.635a2.8 2.8 0 0 0 0-5.6zm-96.363-4.78a2.8 2.8 0 0 0 0 3.96l17.819 17.819a2.801 2.801 0 0 0 3.96-3.96l-15.839-15.839 15.839-15.839a2.8 2.8 0 1 0-3.96-3.96zm96.363 1.98v-2.8h-94.383v5.6h94.383z"})))};class lt extends n.Component{constructor(e){super(e),this.bindCallbacks()}bindCallbacks(){this.handleExtensionNotInstalledClick=this.handleExtensionNotInstalledClick.bind(this)}handleExtensionNotInstalledClick(){this.props.onExtensionNotDownloaded()}render(){const e=window.matchMedia("(prefers-color-scheme: dark)").matches;return n.createElement("div",{className:"install-extension"},n.createElement("h1",null,n.createElement(P.x6,null,"Allow the extension on every website.")),n.createElement("p",null,n.createElement(P.x6,null,"Once the extension is installed, it must be allowed on every website, otherwise it won't work as expected."," ",n.createElement("a",{href:"https://www.passbolt.com/docs/safari-onboarding",rel:"noopener noreferrer",target:"_blank"},"Learn more"))),e?n.createElement(ot,null):n.createElement(Ge,null),n.createElement("div",{className:"form-actions"},n.createElement("p",null,n.createElement(P.x6,null,"Click on ",n.createElement("span",{className:"passbolt-logo"},"@"),' in the toolbar and select "',n.createElement("strong",null,"Always allow on every website…"),'"')),n.createElement("button",{className:"link",type:"button",onClick:this.handleExtensionNotInstalledClick},n.createElement(P.x6,null,"I didn't install the extension"))))}}lt.propTypes={context:h().any,onExtensionNotDownloaded:h().func};const ct=o((0,P.CI)("common")(lt));class ht extends n.Component{componentDidMount(){this.initializeRecover()}initializeRecover(){setTimeout(()=>this.props.apiRecoverContext.onInitializeRecoverRequested(),1e3)}render(){switch(this.props.apiRecoverContext.state){case O.INSTALL_EXTENSION_STATE:return n.createElement($,null);case O.INSTALL_SAFARI_EXTENSION_STATE:return n.createElement(ue,{onExtensionDownloading:this.props.apiRecoverContext.handleSafariExtensionDownloading,onExtensionAlreadyInstalled:this.props.apiRecoverContext.handleExtensionAlreadyInstalled});case O.CONFIGURE_SAFARI_EXTENSION_STATE:return n.createElement(ct,{onExtensionNotDownloaded:this.props.apiRecoverContext.handleSafariExtensionNotDownloaded});case O.DOWNLOAD_SUPPORTED_BROWSER_STATE:return n.createElement(V,null);case O.TOKEN_EXPIRED_STATE:return n.createElement(H,null);case O.ERROR_ALREADY_SIGNED_IN_STATE:return n.createElement(J,{onLogoutButtonClick:this.props.apiRecoverContext.logoutUserAndRefresh,displayAs:Y});case O.REQUEST_INVITATION_ERROR:return n.createElement(B,null);case O.UNEXPECTED_ERROR_STATE:return n.createElement(ae,{error:this.props.apiRecoverContext.unexpectedError});default:return n.createElement(L,null)}}}ht.propTypes={apiRecoverContext:h().object};const dt=k(ht);class pt{setBaseUrl(e){if(!e)throw new TypeError("ApiClientOption baseUrl is required.");if("string"==typeof e)try{this.baseUrl=new URL(e)}catch(e){throw new TypeError("ApiClientOption baseUrl is invalid.",{cause:e})}else{if(!(e instanceof URL))throw new TypeError("ApiClientOptions baseurl should be a string or URL");this.baseUrl=e}return this}setResourceName(e){if(!e)throw new TypeError("ApiClientOptions.setResourceName resourceName is required.");if("string"!=typeof e)throw new TypeError("ApiClientOptions.setResourceName resourceName should be a valid string.");return this.resourceName=e,this}getBaseUrl(){return this.baseUrl}getResourceName(){return this.resourceName}async getHeaders(){const e=await this.getCsrfToken();if(e)return{"X-CSRF-Token":e}}async getCsrfToken(){if("undefined"==typeof browser||void 0===browser.cookies){const e=document?.cookie?.split("; ")?.find(e=>e.startsWith("csrfToken"))?.split("=");return e&&2===e.length?e[1]:null}const e=this.baseUrl.toString(),t="/"===e.slice(-1)?e:`${e}/`,s=await browser.cookies.get({name:"csrfToken",url:t});return s?.value||null}}var ut;function mt(){return mt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)({}).hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e},mt.apply(null,arguments)}const gt=function(e){return n.createElement("svg",mt({xmlns:"http://www.w3.org/2000/svg",width:17,height:16,fill:"none",viewBox:"0 0 17 16"},e),ut||(ut=n.createElement("g",{clipPath:"url(#heart_svg__clip0_93_734678)"},n.createElement("path",{stroke:"var(--icon-color)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M13.497 9.333c.993-.973 2-2.14 2-3.666A3.667 3.667 0 0 0 11.83 2c-1.173 0-2 .333-3 1.333-1-1-1.827-1.333-3-1.333a3.667 3.667 0 0 0-3.667 3.667c0 1.533 1 2.7 2 3.666L8.83 14z"}))))};class Et extends n.Component{render(){return n.createElement("div",{className:"tooltip",tabIndex:"0"},this.props.children,n.createElement("span",{className:`tooltip-text ${this.props.direction}`},this.props.message))}}Et.defaultProps={direction:"right"},Et.propTypes={children:h().any,message:h().any.isRequired,direction:h().string};const yt=Et;var bt=s(8097),ft=s(4296);function vt(){return vt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)({}).hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e},vt.apply(null,arguments)}const Tt=n.createContext({dialogs:[],open:()=>{},close:()=>{}});class wt extends n.Component{constructor(e){super(e),this.state=this.defaultState}get defaultState(){return{dialogs:[],open:(e,t)=>{const s=(0,ft.A)();return this.setState(n=>({dialogs:[...n.dialogs,{key:s,Dialog:e,DialogProps:t}]})),s},close:e=>{this.setState(t=>({dialogs:t.dialogs.filter(t=>e!==t.key)}))},closeAll:()=>this.setState({dialogs:[]})}}render(){return n.createElement(Tt.Provider,{value:this.state},this.props.children)}}function St(e){return class extends n.Component{render(){return n.createElement(Tt.Consumer,null,t=>n.createElement(e,vt({dialogContext:t},this.props)))}}}wt.displayName="DialogContextProvider",wt.propTypes={children:h().any};var xt=s(6347);function At(){return At=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)({}).hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e},At.apply(null,arguments)}const Ct=n.createContext({onGoToAdministrationRequested:()=>{},onGoToAdministrationSelfRegistrationRequested:()=>{},onGoToAdministrationMfaRequested:()=>{},onGoToAdministrationUsersDirectoryRequested:()=>{},onGoToAdministrationEmailNotificationsRequested:()=>{},onGoToAdministrationSubscriptionRequested:()=>{},onGoToAdministrationDowngradeToCeRequested:()=>{},onGoToAdministrationInternationalizationRequested:()=>{},onGoToAdministrationAccountRecoveryRequested:()=>{},onGoToAdministrationSmtpSettingsRequested:()=>{},onGoToAdministrationSsoRequested:()=>{},onGoToAdministrationPasswordPoliciesRequested:()=>{},onGoToAdministrationSecretHistoryRequested:()=>{},onGoToAdministrationUserPassphrasePoliciesRequested:()=>{},onGoToAdministrationPasswordExpirySettingsRequested:()=>{},onGoToAdministrationHealthcheckRequested:()=>{},onGoToPasswordsRequested:()=>{},onGoToUsersRequested:()=>{},onGoToTermsRequested:()=>{},onGoToHelpRequested:()=>{},onGoToUserSettingsProfileRequested:()=>{},onGoToUserSettingsPassphraseRequested:()=>{},onGoToUserSettingsSecurityTokenRequested:()=>{},onGoToUserSettingsThemeRequested:()=>{},onGoToUserSettingsMfaRequested:()=>{},onGoToUserSettingsKeysRequested:()=>{},onGoToUserSettingsMobileRequested:()=>{},onGoToUserSettingsDesktopRequested:()=>{},onGoToUserSettingsAccountRecoveryRequested:()=>{},onGoToNewTab:()=>{},onGoToAdministrationRbacsRequested:()=>{},onGoToAdministrationMigrateMetadataRequested:()=>{},onGoToAdministrationAllowContentTypesRequested:()=>{},onGoToAdministrationMetadataGettingStartedRequested:()=>{},onGoToAdministrationSubscriptionRequestedTeasing:()=>{},onGoToAdministrationPasswordPoliciesRequestedTeasing:()=>{},onGoToAdministrationUserPassphrasePoliciesRequestedTeasing:()=>{},onGoToAdministrationAccountRecoveryRequestedTeasing:()=>{},onGoToAdministrationSsoRequestedTeasing:()=>{},onGoToAdministrationMfaPolicyRequestedTeasing:()=>{},onGoToAdministrationUsersDirectoryRequestedTeasing:()=>{},onGoToAdministrationScimRequestedTeasing:()=>{},onGoToAdministrationScimRequested:()=>{}});class Rt extends n.Component{constructor(e){super(e),this.state=this.defaultState}get defaultState(){return{onGoToNewTab:this.onGoToNewTab.bind(this),onGoToAdministrationRequested:this.onGoToAdministrationRequested.bind(this),onGoToAdministrationMfaRequested:this.onGoToAdministrationMfaRequested.bind(this),onGoToAdministrationUsersDirectoryRequested:this.onGoToAdministrationUsersDirectoryRequested.bind(this),onGoToAdministrationEmailNotificationsRequested:this.onGoToAdministrationEmailNotificationsRequested.bind(this),onGoToAdministrationSubscriptionRequested:this.onGoToAdministrationSubscriptionRequested.bind(this),onGoToAdministrationDowngradeToCeRequested:this.onGoToAdministrationDowngradeToCeRequested.bind(this),onGoToAdministrationInternationalizationRequested:this.onGoToAdministrationInternationalizationRequested.bind(this),onGoToAdministrationAccountRecoveryRequested:this.onGoToAdministrationAccountRecoveryRequested.bind(this),onGoToAdministrationSmtpSettingsRequested:this.onGoToAdministrationSmtpSettingsRequested.bind(this),onGoToAdministrationSelfRegistrationRequested:this.onGoToAdministrationSelfRegistrationRequested.bind(this),onGoToAdministrationSsoRequested:this.onGoToAdministrationSsoRequested.bind(this),onGoToAdministrationMfaPolicyRequested:this.onGoToAdministrationMfaPolicyRequested.bind(this),onGoToAdministrationPasswordPoliciesRequested:this.onGoToAdministrationPasswordPoliciesRequested.bind(this),onGoToAdministrationSecretHistoryRequested:this.onGoToAdministrationSecretHistoryRequested.bind(this),onGoToAdministrationUserPassphrasePoliciesRequested:this.onGoToAdministrationUserPassphrasePoliciesRequested.bind(this),onGoToAdministrationPasswordExpirySettingsRequested:this.onGoToAdministrationPasswordExpirySettingsRequested.bind(this),onGoToAdministrationHealthcheckRequested:this.onGoToAdministrationHealthcheckRequested.bind(this),onGoToAdministrationContentTypesEncryptedMetadataRequested:this.onGoToAdministrationContentTypesEncryptedMetadataRequested.bind(this),onGoToAdministrationContentTypesMetadataKeyRequested:this.onGoToAdministrationContentTypesMetadataKeyRequested.bind(this),onGoToAdministrationMigrateMetadataRequested:this.onGoToAdministrationMigrateMetadataRequested.bind(this),onGoToAdministrationAllowContentTypesRequested:this.onGoToAdministrationAllowContentTypesRequested.bind(this),onGoToPasswordsRequested:this.onGoToPasswordsRequested.bind(this),onGoToUsersRequested:this.onGoToUsersRequested.bind(this),onGoToHelpRequested:this.onGoToHelpRequested.bind(this),onGoToTermsRequested:this.onGoToTermsRequested.bind(this),onGoToUserSettingsProfileRequested:this.onGoToUserSettingsProfileRequested.bind(this),onGoToUserSettingsPassphraseRequested:this.onGoToUserSettingsPassphraseRequested.bind(this),onGoToUserSettingsSecurityTokenRequested:this.onGoToUserSettingsSecurityTokenRequested.bind(this),onGoToUserSettingsThemeRequested:this.onGoToUserSettingsThemeRequested.bind(this),onGoToUserSettingsMfaRequested:this.onGoToUserSettingsMfaRequested.bind(this),onGoToUserSettingsKeysRequested:this.onGoToUserSettingsKeysRequested.bind(this),onGoToUserSettingsMobileRequested:this.onGoToUserSettingsMobileRequested.bind(this),onGoToUserSettingsDesktopRequested:this.onGoToUserSettingsDesktopRequested.bind(this),onGoToUserSettingsAccountRecoveryRequested:this.onGoToUserSettingsAccountRecoveryRequested.bind(this),onGoToAdministrationRbacsRequested:this.onGoToAdministrationRbacsRequested.bind(this),onGoToAdministrationMetadataGettingStartedRequested:this.onGoToAdministrationMetadataGettingStartedRequested.bind(this),onGoToAdministrationSubscriptionRequestedTeasing:this.onGoToAdministrationSubscriptionRequestedTeasing.bind(this),onGoToAdministrationPasswordPoliciesRequestedTeasing:this.onGoToAdministrationPasswordPoliciesRequestedTeasing.bind(this),onGoToAdministrationUserPassphrasePoliciesRequestedTeasing:this.onGoToAdministrationUserPassphrasePoliciesRequestedTeasing.bind(this),onGoToAdministrationAccountRecoveryRequestedTeasing:this.onGoToAdministrationAccountRecoveryRequestedTeasing.bind(this),onGoToAdministrationSsoRequestedTeasing:this.onGoToAdministrationSsoRequestedTeasing.bind(this),onGoToAdministrationMfaPolicyRequestedTeasing:this.onGoToAdministrationMfaPolicyRequestedTeasing.bind(this),onGoToAdministrationUsersDirectoryRequestedTeasing:this.onGoToAdministrationUsersDirectoryRequestedTeasing.bind(this),onGoToAdministrationScimRequestedTeasing:this.onGoToAdministrationScimRequestedTeasing.bind(this),onGoToAdministrationScimRequested:this.onGoToAdministrationScimRequested.bind(this)}}async goTo(e,t){if(e===this.props.context.name)return void await this.props.history.push({pathname:t});if("api"===e)return void await this.props.context.port.request("passbolt.tabs.open-admin-page",t);const s=`${this.props.context.userSettings?this.props.context.userSettings.getTrustedDomain():this.props.context.trustedDomain}${t}`;window.open(s,"_parent","noopener,noreferrer")}onGoToNewTab(e){window.open(e,"_blank","noopener,noreferrer")}async onGoToAdministrationRequested(){await this.goTo("browser-extension","/app/administration")}async onGoToAdministrationMfaRequested(){await this.goTo("api","/app/administration/mfa")}async onGoToAdministrationMfaPolicyRequested(){await this.goTo("api","/app/administration/mfa-policy")}async onGoToAdministrationPasswordPoliciesRequested(){await this.goTo("browser-extension","/app/administration/password-policies")}async onGoToAdministrationSecretHistoryRequested(){await this.goTo("browser-extension","/app/administration/secret-history")}async onGoToAdministrationSelfRegistrationRequested(){await this.goTo("api","/app/administration/self-registration")}async onGoToAdministrationUsersDirectoryRequested(){await this.goTo("api","/app/administration/users-directory")}async onGoToAdministrationHealthcheckRequested(){await this.goTo("api","/app/administration/healthcheck")}async onGoToAdministrationEmailNotificationsRequested(){await this.goTo("api","/app/administration/email-notification")}async onGoToAdministrationSmtpSettingsRequested(){await this.goTo("api","/app/administration/smtp-settings")}async onGoToAdministrationSubscriptionRequested(){await this.goTo("browser-extension","/app/administration/subscription")}async onGoToAdministrationDowngradeToCeRequested(){await this.goTo("browser-extension","/app/administration/ce-downgrade")}async onGoToAdministrationInternationalizationRequested(){await this.goTo("api","/app/administration/internationalization")}async onGoToAdministrationAccountRecoveryRequested(){await this.goTo("browser-extension","/app/administration/account-recovery")}async onGoToAdministrationSsoRequested(){await this.goTo("browser-extension","/app/administration/sso")}async onGoToAdministrationRbacsRequested(){await this.goTo("api","/app/administration/rbacs")}async onGoToAdministrationMetadataGettingStartedRequested(){await this.goTo("browser-extension","/app/administration/content-types/metadata-getting-started")}async onGoToAdministrationScimRequested(){await this.goTo("browser-extension","/app/administration/user-provisionning/scim")}async onGoToAdministrationUserPassphrasePoliciesRequested(){await this.goTo("browser-extension","/app/administration/user-passphrase-policies")}async onGoToAdministrationPasswordExpirySettingsRequested(){await this.goTo("browser-extension","/app/administration/password-expiry")}async onGoToAdministrationContentTypesEncryptedMetadataRequested(){await this.goTo("browser-extension","/app/administration/content-types/metadata")}async onGoToAdministrationContentTypesMetadataKeyRequested(){await this.goTo("browser-extension","/app/administration/content-types/metadata-key")}async onGoToAdministrationMigrateMetadataRequested(){await this.goTo("browser-extension","/app/administration/migrate-metadata")}async onGoToAdministrationAllowContentTypesRequested(){await this.goTo("browser-extension","/app/administration/allow-content-types")}async onGoToAdministrationSubscriptionRequestedTeasing(){await this.goTo("browser-extension","/app/administration/subscription-teasing")}async onGoToAdministrationPasswordPoliciesRequestedTeasing(){await this.goTo("browser-extension","/app/administration/password-policies-teasing")}async onGoToAdministrationUserPassphrasePoliciesRequestedTeasing(){await this.goTo("browser-extension","/app/administration/user-passphrase-policies-teasing")}async onGoToAdministrationAccountRecoveryRequestedTeasing(){await this.goTo("browser-extension","/app/administration/account-recovery-teasing")}async onGoToAdministrationSsoRequestedTeasing(){await this.goTo("browser-extension","/app/administration/sso-teasing")}async onGoToAdministrationMfaPolicyRequestedTeasing(){await this.goTo("browser-extension","/app/administration/mfa-policy-teasing")}async onGoToAdministrationUsersDirectoryRequestedTeasing(){await this.goTo("browser-extension","/app/administration/users-directory-teasing")}async onGoToAdministrationScimRequestedTeasing(){await this.goTo("browser-extension","/app/administration/scim-teasing")}get isMfaEnabled(){const e=this.props.context.siteSettings;return e&&e.canIUse("multiFactorAuthentication")}get isUserDirectoryEnabled(){const e=this.props.context.siteSettings;return e&&e.canIUse("directorySync")}get isSmtpSettingsEnable(){const e=this.props.context.siteSettings;return e&&e.canIUse("smtpSettings")}get isSelfRegistrationEnable(){const e=this.props.context.siteSettings;return e&&e.canIUse("selfRegistration")}get isPasswordPoliciesEnable(){const e=this.props.context.siteSettings;return e&&e.canIUse("passwordPoliciesUpdate")}get isUserPassphrasePoliciesEnable(){const e=this.props.context.siteSettings;return e&&e.canIUse("userPassphrasePolicies")}get isPasswordExpiryEnable(){const e=this.props.context.siteSettings;return e&&e.canIUse("passwordExpiry")}async onGoToPasswordsRequested(){await this.goTo("browser-extension","/app/passwords")}async onGoToUsersRequested(){await this.goTo("browser-extension","/app/users")}async onGoToHelpRequested(){await this.onGoToNewTab("https://www.passbolt.com/docs/")}async onGoToTermsRequested(){await this.onGoToNewTab("https://www.passbolt.com/terms")}async onGoToUserSettingsProfileRequested(){await this.goTo("browser-extension","/app/settings/profile")}async onGoToUserSettingsPassphraseRequested(){await this.goTo("browser-extension","/app/settings/passphrase")}async onGoToUserSettingsSecurityTokenRequested(){await this.goTo("browser-extension","/app/settings/security-token")}async onGoToUserSettingsThemeRequested(){await this.goTo("browser-extension","/app/settings/theme")}async onGoToUserSettingsMfaRequested(){await this.goTo("browser-extension","/app/settings/mfa")}async onGoToUserSettingsDuoSetupRequested(){let e="api";window.chrome?.webview&&(e="browser-extension"),await this.goTo(e,"/app/settings/mfa")}async onGoToUserSettingsKeysRequested(){await this.goTo("browser-extension","/app/settings/keys")}async onGoToUserSettingsMobileRequested(){await this.goTo("browser-extension","/app/settings/mobile")}async onGoToUserSettingsDesktopRequested(){await this.goTo("browser-extension","/app/settings/desktop")}async onGoToUserSettingsAccountRecoveryRequested(){await this.goTo("browser-extension","/app/settings/account-recovery")}render(){return n.createElement(Ct.Provider,{value:this.state},this.props.children)}}function qt(){return qt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)({}).hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e},qt.apply(null,arguments)}Rt.displayName="NavigationContextProvider",Rt.propTypes={context:h().object,children:h().any,location:h().object,match:h().object,history:h().object},(0,xt.withRouter)(o(Rt));const Nt=n.createContext({counter:[],add:()=>{},remove:()=>{}});class kt extends n.Component{constructor(e){super(e),this.state=this.defaultState}get defaultState(){return{counter:0,add:()=>{this.setState(e=>({counter:e.counter+1}))},remove:()=>{this.setState(e=>({counter:Math.min(e.counter-1,0)}))}}}render(){return n.createElement(Nt.Provider,{value:this.state},this.props.children)}}kt.propTypes={children:h().any};class Ot{}class _t extends Ot{static execute(){return!0}}class It extends Ot{static execute(){return!1}}const Pt="Folders.use",Dt="Administration.viewWorkspace",Ut="GroupsAdd.addPost",Gt="AccountRecoveryRequestsView.view",Lt="AccountRecoveryRequestsIndex.index",Mt="AccountRecoveryResponsesCreate.post",Ft="Allow",$t="Deny",jt="AllowIfGroupManagerInOneGroup",Vt={[Ft]:_t,[$t]:It,[jt]:class extends Ot{static execute(e){return e.groups_users.some(e=>e.is_admin)}}},Kt={[Pt]:Vt[Ft]},Bt={[Dt]:Vt[$t],[Ut]:Vt[$t],[Gt]:Vt[$t],[Lt]:Vt[$t],[Mt]:Vt[$t]};class zt{static getByRbac(e){return Vt[e.controlFunction]||(console.warn(`Could not find control function for the given rbac entity (${e.id})`),It)}static getDefaultForAdminAndAction(e){return Kt[e]||_t}static getDefaultForUserAndAction(e){return Bt[e]||_t}}class Ht extends Error{constructor(e="Collection validation error."){super(e),this.name="CollectionValidationError",this.errors=[]}addItemValidationError(e,t){if(!Number.isInteger(e))throw new TypeError('CollectionValidationError::addEntityValidationError expects "position" to be an integer.');if(!(t instanceof Zt||t instanceof Ht))throw new TypeError('CollectionValidationError::addEntityValidationError expects "entityValidationError" to be an instance of EntityValidationError or CollectionValidationError.');this.errors[e]=t}addCollectionValidationError(e,t){if("string"!=typeof e)throw new TypeError('CollectionValidationError::addCollectionValidationError expects "rule" to be a string.');if("string"!=typeof t)throw new TypeError('CollectionValidationError::addCollectionValidationError expects "error" to be a string.');this.errors[e]=t}hasErrors(){return this.errors.some(e=>Object.keys(e.details).length>0)}get details(){const e={};for(const t in this.errors)this.errors[t]instanceof Zt||this.errors[t]instanceof Ht?e[t]=this.errors[t].details:e[t]=this.errors[t];return e}}const Wt=Ht;class Yt extends Error{constructor(e="Entity validation error."){super(e),this.name="EntityValidationError",this.details={}}addError(e,t,s){if("string"!=typeof e)throw new TypeError("EntityValidationError addError property should be a string.");if("string"!=typeof t)throw new TypeError("EntityValidationError addError rule should be a string.");if("string"!=typeof s)throw new TypeError("EntityValidationError addError message should be a string.");Object.prototype.hasOwnProperty.call(this.details,e)||(this.details[e]={}),this.details[e][t]=s}addAssociationError(e,t){if("string"!=typeof e)throw new TypeError("EntityValidationError addAssociationError associationName should be a string.");if(!(t instanceof Yt||t instanceof Wt))throw new TypeError("EntityValidationError addAssociationError errorDetails should be an object.");this.details[e]=t}getError(e,t){if(!this.hasError(e,t))return null;const s=this.details[e];return t?s[t]:s}hasError(e,t){if("string"!=typeof e)throw new TypeError("EntityValidationError hasError property should be a string.");const s=this.details&&Object.prototype.hasOwnProperty.call(this.details,e);if(!s)return!1;if(!t)return s;if("string"!=typeof t)throw new TypeError("EntityValidationError hasError rule should be a string.");return Object.prototype.hasOwnProperty.call(this.details[e],t)}hasErrors(){return Object.keys(this.details).length>0}getFirstRuleErrorByField(e){if(!this.hasError(e))return null;const t=this.details[e];return t[Object.keys(t)[0]]}}const Zt=Yt;var Xt=s(7761),Jt=s.n(Xt);class Qt{static validateSchema(e,t){if(!t)throw new TypeError(`Could not validate entity ${e}. No schema for entity ${e}.`);if(!t.type)throw new TypeError(`Could not validate entity ${e}. Type missing.`);if("array"!==t.type){if("object"===t.type){if(!t.required||!Array.isArray(t.required))throw new TypeError(`Could not validate entity ${e}. Schema error: no required properties.`);if(!t.properties||!Object.keys(t).length)throw new TypeError(`Could not validate entity ${e}. Schema error: no properties.`);const s=t.properties;for(const e in s){if(!Object.prototype.hasOwnProperty.call(s,e)||!s[e].type&&!s[e].anyOf)throw TypeError(`Invalid schema. Type missing for ${e}...`);if(s[e].anyOf&&(!Array.isArray(s[e].anyOf)||!s[e].anyOf.length))throw new TypeError(`Invalid schema, prop ${e} anyOf should be an array`)}}}else if(!t.items)throw new TypeError(`Could not validate entity ${e}. Schema error: missing item definition.`)}static validate(e,t,s){if(!e||!t||!s)throw new TypeError(`Could not validate entity ${e}. No data provided.`);switch(s.type){case"object":return Qt.validateObject(e,t,s);case"array":return Qt.validateArray(e,t,s);default:throw new TypeError(`Could not validate entity ${e}. Unsupported type.`)}}static validateArray(e,t,s){let n;const i=Qt.validateProp("items",t,s);if("number"==typeof s.minItems&&(Qt.isGreaterThanOrEqual(t.length,s.minItems)||(n=Qt.handleCollectionValidationError("minItems",`The items array should contain at least ${s.minItems} item(s).`,n))),"number"==typeof s.maxItems&&(Qt.isLessThanOrEqual(t.length,s.maxItems)||(n=Qt.handleCollectionValidationError("maxItems",`The items array should contain at maximum ${s.maxItems} item(s).`,n))),n)throw n;return i}static validateObject(e,t,s){const n=s.required,i=s.properties,r={};let a;for(const s in i)if(Object.prototype.hasOwnProperty.call(i,s))if(null!==t?.[s]||!0!==i[s]?.nullable){if(n.includes(s)){if(!Object.prototype.hasOwnProperty.call(t,s)){a=Qt.getOrInitEntityValidationError(e,a),a.addError(s,"required",`The ${s} is required.`);continue}}else if(!Object.prototype.hasOwnProperty.call(t,s))continue;try{r[s]=Qt.validateProp(s,t[s],i[s])}catch(t){if(!(t instanceof Zt))throw t;a=Qt.getOrInitEntityValidationError(e,a),a.details[s]=t.details[s]}}else r[s]=null;if(a)throw a;return r}static getOrInitEntityValidationError(e,t){return t||new Zt(`Could not validate entity ${e}.`)}static validateProp(e,t,s){if(s.anyOf)return Qt.validateAnyOf(e,t,s.anyOf),t;if(!0===s.nullable&&null===t)return t;if(Qt.validatePropType(e,t,s),s.enum)return Qt.validatePropEnum(e,t,s),t;switch(s.type){case"string":Qt.validatePropTypeString(e,t,s);break;case"integer":case"number":Qt.validatePropTypeNumber(e,t,s);break;case"array":Qt.validatePropTypeArray(e,t,s);break;case"object":case"boolean":case"blob":case"null":break;case"x-custom":Qt.validatePropCustom(e,t,s);break;default:throw new TypeError(`Could not validate property ${e}. Unsupported prop type ${s.type}`)}return t}static validatePropType(e,t,s){if(!Qt.isValidPropType(t,s.type))throw Qt.handlePropertyValidationError(e,"type",`The ${e} is not a valid ${s.type}.`)}static validatePropCustom(e,t,s){try{s.validationCallback(t)}catch(t){throw Qt.handlePropertyValidationError(e,"custom",`The ${e} is not valid: ${t.message}`)}}static validatePropTypeString(e,t,s){let n;if(s.format&&(Qt.isValidStringFormat(t,s.format)||(n=Qt.handlePropertyValidationError(e,"format",`The ${e} is not a valid ${s.format}.`,n))),s.length&&(Qt.isValidStringLength(t,s.length,s.length)||(n=Qt.handlePropertyValidationError(e,"length",`The ${e} should be ${s.length} character in length.`,n))),s.minLength&&(Qt.isValidStringLength(t,s.minLength)||(n=Qt.handlePropertyValidationError(e,"minLength",`The ${e} should be ${s.minLength} character in length minimum.`,n))),s.maxLength&&(Qt.isValidStringLength(t,0,s.maxLength)||(n=Qt.handlePropertyValidationError(e,"maxLength",`The ${e} should be ${s.maxLength} character in length maximum.`,n))),s.pattern&&(Jt().matches(t,s.pattern)||(n=Qt.handlePropertyValidationError(e,"pattern",`The ${e} is not valid.`,n))),s.custom&&(s.custom(t)||(n=Qt.handlePropertyValidationError(e,"custom",`The ${e} is not valid.`,n))),n)throw n}static handlePropertyValidationError(e,t,s,n=null){return(n=n||new Zt(`Could not validate property ${e}.`)).addError(e,t,s),n}static handleCollectionValidationError(e,t,s=null){return(s=s||new Wt("Could not validate collection.")).addCollectionValidationError(e,t),s}static validatePropTypeNumber(e,t,s){let n;if("number"==typeof s.minimum&&(Qt.isGreaterThanOrEqual(t,s.minimum)||(n=Qt.handlePropertyValidationError(e,"minimum",`The ${e} should be greater or equal to ${s.minimum}.`,n))),"number"==typeof s.maximum&&(Qt.isLesserThanOrEqual(t,s.maximum)||(n=Qt.handlePropertyValidationError(e,"maximum",`The ${e} should be lesser or equal to ${s.maximum}.`,n))),n)throw n}static validatePropTypeArray(e,t,s){let n;if(s?.items&&"object"==typeof s.items){for(let i=0;i<t.length;i++){const r=`${e}.${i}`;try{this.validateProp(r,t[i],s.items)}catch(t){if(!(t instanceof Zt))throw t;{n=Qt.getOrInitEntityValidationError(e,n);const s=t.details[r];n.details[e]={...n.details[e],[i]:s}}}}if(n)throw n}}static validatePropEnum(e,t,s){if(!Qt.isPropInEnum(t,s.enum)){const t=new Zt(`Could not validate property ${e}.`);throw t.addError(e,"enum",`The ${e} value is not included in the supported list.`),t}}static validateAnyOf(e,t,s){for(let n=0;n<s.length;n++)try{return void Qt.validateProp(e,t,s[n])}catch{}const n=new Zt(`Could not validate property ${e}.`);throw n.addError(e,"type",`The ${e} does not match any of the supported types.`),n}static isValidPropType(e,t){if(Array.isArray(t))throw new TypeError("EntitySchema isValidPropType multiple types are not supported.");if("string"!=typeof t)throw new TypeError("EntitySchema isValidPropType type is invalid.");switch(t){case"null":return null===e;case"boolean":return"boolean"==typeof e;case"string":return"string"==typeof e;case"integer":return Number.isInteger(e);case"number":return"number"==typeof e;case"object":return"object"==typeof e;case"array":return Array.isArray(e);case"blob":return e instanceof Blob;case"x-custom":return!0;default:throw new TypeError("EntitySchema validation type not supported.")}}static isValidStringFormat(e,t){if("string"!=typeof t)throw new TypeError("EntitySchema validPropFormat format is invalid.");switch(t){case"uuid":return Jt().isUUID(e);case"email":case"idn-email":return Jt().isEmail(e);case"date-time":return Jt().isISO8601(e);case"x-hex-color":return Jt().isHexColor(e);case"x-base64":return Jt().isBase64(e);default:throw new TypeError(`EntitySchema string validation format ${t} is not supported.`)}}static isValidStringLength(e,t,s){return t=t||0,Jt().isLength(e,t,s)}static isPropInEnum(e,t){if(!t||!Array.isArray(t)||!t.length)throw new TypeError("EntitySchema enum schema cannot be empty.");return t.includes(e)}static isGreaterThanOrEqual(e,t){return e>=t}static isLessThanOrEqual(e,t){return e<=t}static isLesserThanOrEqual(e,t){return e<=t}}const es=Qt;class ts{constructor(e,t={}){(t?.clone??!0)&&(e=JSON.parse(JSON.stringify(e))),this._props=e}toDto(){return JSON.parse(JSON.stringify(this))}toJSON(){return this._props}_hasProp(e){if(!e.includes(".")){const t=ts._normalizePropName(e);return Object.prototype.hasOwnProperty.call(this._props,t)}try{return this._getPropByPath(e),!0}catch(t){return console.error(`Failed to check if property "${e}" is set:`,t),!1}}_getPropByPath(e){return ts._normalizePropName(e).split(".").reduce((e,t)=>{if(Object.prototype.hasOwnProperty.call(e,t))return e[t];throw new Error},this._props)}static _normalizePropName(e){return e.replace(/([A-Z])/g,(e,t)=>`_${t.toLowerCase()}`).replace(/\._/,".").replace(/^_/,"").replace(/^\./,"")}}const ss=ts;var ns=s(5648);const is=e=>e?.replace(/_([a-z])/g,(e,t)=>t.toUpperCase());class rs extends Error{constructor(e,t,s){if(super(s=s||"Entity collection error."),"number"!=typeof e)throw new TypeError("EntityCollectionError requires a valid position");if(!t||"string"!=typeof t)throw new TypeError("EntityCollectionError requires a valid rule");if(!s||"string"!=typeof s)throw new TypeError("EntityCollectionError requires a valid message");this.position=e,this.rule=t}}const as=rs;class os{constructor(e=[],t={}){const s=t?.clone??!0;this._items=[],s&&(e=JSON.parse(JSON.stringify(e))),this._props=e}toDto(){return JSON.parse(JSON.stringify(this._items))}toJSON(){return this.toDto()}get items(){return this._items}get length(){return this._items.length}[Symbol.iterator](){let e=0;return{next:()=>e<this._items.length?{value:this._items[e++],done:!1}:{done:!0}}}getAll(e,t){if("string"!=typeof e)throw new TypeError("EntityCollection excludeAll expects propName to be string.");if("string"!=typeof t)throw new TypeError("EntityCollection excludeAll expects search to be string.");return this._items.filter(s=>Object.prototype.hasOwnProperty.call(s._props,e)&&s._props[e]===t)}getFirst(e,t){if("string"!=typeof e||"string"!=typeof t)throw new TypeError("EntityCollection getFirst by expect propName and search to be strings");const s=this.getAll(e,t);if(s&&s.length)return s[0]}extract(e){if("string"!=typeof e)throw new TypeError("EntityCollection extract expects propName to be a string.");return this._items.reduce((t,s)=>(void 0!==s._props[e]&&t.push(s._props[e]),t),[])}push(e){return this._items.push(e),this._items.length}unshift(e){return this._items.unshift(e),this._items.length}filterByPropertyValueIn(e,t,s=!0){if("string"!=typeof e)throw new TypeError("EntityCollection filterByPropertyValueIn expects propName to be a string.");if(!Array.isArray(t))throw new TypeError("EntityCollection filterByPropertyValueIn expects needles to be an array.");this.filterByCallback(n=>{const i=Object.prototype.hasOwnProperty.call(n._props,e);return!(s&&!i||i&&!t.includes(n._props[e]))})}filterByCallback(e){if("function"!=typeof e)throw new TypeError("EntityCollection filterByCallback expects callback to be a function.");for(let t=this._items.length-1;t>=0;t--)e(this._items[t])||this._items.splice(t,1)}assertUniqueByProperty(e,t){const s=`unique_${e}`,n=this.extract(e),i=new Set;t=t||`The collection should only contain items with unique values for the property: ${e}.`,n.forEach((e,n)=>{if(i.add(e),n!==i.size-1)throw new as(n,s,t)})}assertNotExist(e,t,s={}){if(void 0===t)return;let n=s?.haystackSet;if(!n){const t=this.extract(e);n=new Set(t)}if(n.has(t)){const t=new Zt,n=s?.message||`The collection already includes an element that has a property (${e}) with an identical value.`;throw t.addError(e,"unique",n),t}}}const ls=os,cs=["string","number","integer","boolean"];class hs extends ss{static _cachedSchema={};constructor(e={},t={}){const s=t?.validate??!0;super(e,t),this.marshall(),s&&this.validateSchema({schema:t?.schema,skipSchemaAssociationValidation:t?.skipSchemaAssociationValidation}),this.createAssociations(t),s&&this.validateBuildRules(t?.validateBuildRules)}marshall(){}validate(e={}){try{this.validateSchema({schema:e?.schema,skipSchemaAssociationValidation:e?.skipSchemaAssociationValidation}),this.validateBuildRules(e?.validateBuildRules),this.validateAssociations(e)}catch(e){if(!(e instanceof Zt))throw e;return e}return null}validateSchema(e=null){let t=e?.schema??this.cachedSchema;if(e?.skipSchemaAssociationValidation){t={...t};const e=Object.keys(this.constructor.associations),s=t.required.filter(t=>!e.includes(t));t.required=s}this._props=es.validate(this.constructor.name,this._props,t)}get cachedSchema(){return this.constructor._cachedSchema[this.constructor.name]||(this.constructor._cachedSchema[this.constructor.name]=this.constructor.getSchema()),this.constructor._cachedSchema[this.constructor.name]}static getSchema(){throw new Error("The entity class should declare its schema.")}validateBuildRules(e={}){}createAssociations(e={}){if(Object.keys(this.constructor.associations).length>0){const t=new Zt;for(const[s,n]of Object.entries(this.constructor.associations))try{this._props[s]&&(this[`_${is(s)}`]=new n(this._props[s],{...e,clone:!1}),delete this._props[s])}catch(e){if(!(e instanceof Zt))throw e;t.addAssociationError(s,e)}if(t.hasErrors())throw t}}static get associations(){return{}}get(e){(0,ns.A)(e);const t=this.constructor.getSchema().properties[e];if(!t)throw new Error(`The property "${e}" has no schema definition.`);if(!cs.includes(t?.type))throw new Error('The property "associated_entity" should reference scalar properties only.');return this._props[e]}set(e,t,s={}){(0,ns.A)(e);const n=s?.validate??!0;if(this.isAssociation(e))this.setAssociation(e,t,s);else{const i=e.split(".")[0],r=this.constructor.getSchema().properties[i];if(!r)throw new Error(`The property "${i}" has no schema definition.`);if("array"===r?.type)this.setArrayProp(e,t,s);else{if(r?.type&&!cs.includes(r?.type))throw new Error('The property "associated_entity" should reference scalar properties only.');if(r?.anyOf?.some(e=>!cs.includes(e.type)))throw new Error('The property "associated_entity" should reference scalar properties only.');n&&es.validateProp(i,t,r),this._props[i]=t}}}setArrayProp(e,t,s){(0,ns.A)(e);const n=e.split("."),i=n[0];let r=null;const a=this.constructor.getSchema().properties[i],o=s?.validate??!0;if(2!==n.length)throw new Error(`The property "${n[0]}" has no index passed.`);{const e=n[1].match(/^(\d+)$/);if(!e)throw new Error(`The property "${n[0]}" has an invalid index format. Expected format: digits.`);r=parseInt(e[1],10)}if(!cs.includes(a.items.type))throw new Error('The property "associated_entity" with array type should reference scalar properties only.');o&&es.validateProp(i,t,a.items),this._props[i]||(this._props[i]=[]),null!=t?this._props[i][r]=t:this._props[i].splice(r,1)}setCollection(e,t,s){(0,ns.A)(e);const n=e.split("."),i=n[0];let r=null;if(1===n.length)t instanceof this.constructor.associations[e]?this[`_${i}`]=t:this[`_${i}`]=new this.constructor.associations[e](t,s);else{if(!(n.length>1))throw new Error(`The property "${n[0]}" has no index passed.`);{const e=n[1].match(/^(\d+)$/);if(!e)throw new Error(`The property "${n[0]}" has an invalid index format. Expected format: digits.`);r=parseInt(e[1],10)}}if(!this[`_${i}`])throw new Error(`The collection "${n[0]}" has no item".`);if(null!=t)if(n.length>2){if(!this[`_${i}`]._items[r])throw new Error(`The collection "${n[0]}" has no item at the index "${n[1]}".`);const e=n.slice(2).join(".");this[`_${i}`]._items[r].set(e,t,s)}else this[`_${i}`].push(t,s,s);else this[`_${i}`].items.splice(r,1)}setAssociation(e,t,s={}){if((0,ns.A)(e),this.isAssociation(e)){const n=e.split("."),i=is(n[0]);if(n.length>1)if(this[`_${i}`]||(this[`_${i}`]=new this.constructor.associations[n[0]]({},{validate:!1})),this[`_${i}`]instanceof ls){const e=n.toSpliced(0,1,i).join(".");this.setCollection(e,t,s)}else{const e=n.slice(1).join(".");this[`_${i}`].set(e,t,s)}else t instanceof this.constructor.associations[e]?this[`_${i}`]=t:this[`_${i}`]=new this.constructor.associations[e](t,s)}}validateAssociations(e={}){const t=new Zt;if(Object.keys(this.constructor.associations).length>0&&Object.keys(this.constructor.associations).forEach(s=>{const n=is(s);if(this[`_${n}`]){const i=this[n].validate(e);i&&t.addAssociationError(s,i)}}),t.hasErrors())throw t}diffProps(e){if(!(e instanceof hs))throw new TypeError('The property "compareEntity" should be of "EntityV2" type.');const t={},s=this.constructor.getSchema(),n=Object.keys(s.properties).filter(e=>cs.includes(s.properties[e].type));for(const s of n){const n=this.get(s),i=e.get(s);n!==i&&(t[s]=i)}return t}hasDiffProps(e){const t=this.diffProps(e);return Object.keys(t).length>0}isAssociation(e){const t=e.split(".")[0];return Boolean(this.constructor.associations?.[t])}}const ds=hs;class ps extends ds{static getSchema(){return{type:"object",required:["name"],properties:{id:{type:"string",format:"uuid"},name:{type:"string",minLength:1,maxLength:50},description:{type:"string",maxLength:255,nullable:!0},created:{type:"string",format:"date-time"},modified:{type:"string",format:"date-time"}}}}validateBuildRules(){this.assertNoTrailingSpaces("name",this._props.name)}get id(){return this._props.id||null}get name(){return this._props.name}isAdmin(){return this.name.toLowerCase()===ps.ROLE_ADMIN}isUser(){return this.name.toLowerCase()===ps.ROLE_USER}isGuest(){return this.name.toLowerCase()===ps.ROLE_GUEST}isAReservedRole(){return this.isAdmin()||this.isUser()||this.isGuest()}verifyHealth(){let e=null;return 50===this.name.length&&(e=new Zt,e.addError("name","maxLength","name reached maximum length limit")),e}assertNoTrailingSpaces(e,t){if(t.trim()!==t){const t=new Zt;throw t.addError(e,"trailing-spaces",`The property (${e}) contains forbidden trailing spaces.`),t}}static get ENTITY_NAME(){return"Role"}static get ROLE_ADMIN(){return"admin"}static get ROLE_USER(){return"user"}static get ROLE_GUEST(){return"guest"}static get ROLE_NAME_MAX_LENGTH(){return 50}toUpdateDto(){return{name:this.name}}}class us{static canRoleUseAction(e,t,s){if(window.chrome?.webview){const n=t.findRbacByActionName(s);if(n)return zt.getByRbac(n).execute(e)}const n=new ps(e.role);if(n.isAdmin())return zt.getDefaultForAdminAndAction(s).execute();const i=t.findRbacByRoleAndActionName(n,s);return this.getByRbacOrDefault(i,s,e)}static getByRbacOrDefault(e,t,s){return e?zt.getByRbac(e).execute(s):zt.getDefaultForUserAndAction(t).execute()}}function ms(){return ms=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)({}).hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e},ms.apply(null,arguments)}const gs=n.createContext({canIUseAction:()=>{}});class Es extends n.Component{constructor(e){super(e),this.state=this.defaultState}get defaultState(){return{canIUseAction:this.canIUseAction.bind(this)}}canIUseAction(e){return us.canRoleUseAction(this.props.context.loggedInUser,this.props.context.rbacs,e)}render(){return n.createElement(gs.Provider,{value:this.state},this.props.children)}}function ys(){return ys=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)({}).hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e},ys.apply(null,arguments)}Es.propTypes={context:h().any,children:h().any},o(Es);const bs=n.createContext({selectedAdministration:null,can:{save:!1},must:{save:!1,editSubscriptionKey:!1,refreshSubscriptionKey:!1},administrationWorkspaceAction:null,setDisplayAdministrationWorkspaceAction:()=>{},resetDisplayAdministrationWorkspaceAction:()=>{},onUpdateSubscriptionKeyRequested:()=>{},onSaveEnabled:()=>{},onMustSaveSettings:()=>{},onMustEditSubscriptionKey:()=>{},onMustRefreshSubscriptionKey:()=>{},onResetActionsSettings:()=>{}});class fs extends n.Component{constructor(e){super(e),this.state=this.defaultState}get defaultState(){return{selectedAdministration:ws.NONE,can:{save:!1},must:{save:!1,editSubscriptionKey:!1,refreshSubscriptionKey:!1},administrationWorkspaceAction:()=>n.createElement(n.Fragment,null),setDisplayAdministrationWorkspaceAction:this.setDisplayAdministrationWorkspaceAction.bind(this),resetDisplayAdministrationWorkspaceAction:this.resetDisplayAdministrationWorkspaceAction.bind(this),onSaveEnabled:this.handleSaveEnabled.bind(this),onMustSaveSettings:this.handleMustSaveSettings.bind(this),onMustEditSubscriptionKey:this.handleMustEditSubscriptionKey.bind(this),onMustRefreshSubscriptionKey:this.handleMustRefreshSubscriptionKey.bind(this),onResetActionsSettings:this.handleResetActionsSettings.bind(this)}}componentDidMount(){this.handleAdministrationMenuRouteChange()}componentDidUpdate(e){this.handleRouteChange(e.location)}handleSaveEnabled(){this.setState({can:{...this.state.can,save:!0}})}handleMustSaveSettings(){this.setState({must:{...this.state.must,save:!0}})}handleMustEditSubscriptionKey(){this.setState({must:{...this.state.must,editSubscriptionKey:!0}})}handleMustRefreshSubscriptionKey(){this.setState({must:{...this.state.must,refreshSubscriptionKey:!0}})}handleResetActionsSettings(){this.setState({must:{save:!1,test:!1,synchronize:!1,editSubscriptionKey:!1,refreshSubscriptionKey:!1}})}handleRouteChange(e){this.props.location.key!==e.key&&this.handleAdministrationMenuRouteChange()}handleAdministrationMenuRouteChange(){const e={can:{save:!1,test:!1,synchronize:!1},must:{save:!1,test:!1,synchronize:!1,editSubscriptionKey:!1,refreshSubscriptionKey:!1}};if(!this.props.rbacContext.canIUseAction(Dt))return e.selectedAdministration=ws.HTTP_403_ACCESS_DENIED,void this.setState(e);const t=this.props.location.pathname,s=xs.homePage.test(t),n=xs.mfa.test(t),i=xs.mfaPolicy.test(t),r=xs.passwordPolicies.test(t),a=xs.usersDirectory.test(t),o=xs.emailNotification.test(t),l=xs.subscription.test(t),c=xs.internationalization.test(t),h=xs.accountRecovery.test(t),d=xs.smtpSettings.test(t),p=xs.selfRegistration.test(t),u=xs.sso.test(t),m=xs.rbac.test(t),g=xs.userPassphrasePolicies.test(t),E=xs.passwordExpirySettings.test(t),y=xs.healthcheck.test(t),b=xs.contentTypesEncryptedMetadata.test(t),f=xs.contentTypesMetadataKey.test(t),v=xs.migrateEncryptedMetadata.test(t),T=xs.allowContentTypes.test(t),w=xs.gettingStarted.test(t),S=xs.scim.test(t),x=xs.secretHistory.test(t),A=xs.ceDowngrade.test(t),C=xs.mfaPolicyTeasing.test(t),R=xs.passwordPoliciesTeasing.test(t),q=xs.usersDirectoryTeasing.test(t),N=xs.subscriptionTeasing.test(t),k=xs.accountRecoveryTeasing.test(t),O=xs.userPassphrasePoliciesTeasing.test(t),_=xs.ssoTeasing.test(t),I=xs.scimTeasing.test(t);let P;if(s?P=ws.HOME:i||C?P=ws.MFA_POLICY:r||R?P=ws.PASSWORD_POLICIES:n?P=ws.MFA:a||q?P=ws.USER_DIRECTORY:o?P=ws.EMAIL_NOTIFICATION:l||N?P=ws.SUBSCRIPTION:c?P=ws.INTERNATIONALIZATION:h||k?P=ws.ACCOUNT_RECOVERY:d?P=ws.SMTP_SETTINGS:p?P=ws.SELF_REGISTRATION:u||_?P=ws.SSO:m?P=ws.RBAC:g||O?P=ws.USER_PASSPHRASE_POLICIES:E?P=ws.PASSWORD_EXPIRY:y?P=ws.HEALTHCHECK:b?P=ws.CONTENT_TYPES_ENCRYPTED_METADATA:f?P=ws.CONTENT_TYPES_METADATA_KEY:v?P=ws.MIGRATE_METADATA:T?P=ws.ALLOW_CONTENT_TYPES:w?P=ws.METADATA_GETTING_STARTED:S||I?P=ws.SCIM:x?P=ws.SECRET_HISTORY:A&&(P=ws.CE_DOWNGRADE),!P)return e.selectedAdministration=ws.HTTP_404_NOT_FOUND,void this.setState(e);const D=Ss?.[P];e.selectedAdministration=D&&!(this.props.context.siteSettings.canIUse(D)||As.includes(P)&&this.props.context.siteSettings.isCommunityEdition)?ws.HTTP_404_NOT_FOUND:P,this.setState(e)}setDisplayAdministrationWorkspaceAction(e){this.setState({administrationWorkspaceAction:e})}resetDisplayAdministrationWorkspaceAction(){this.setState({administrationWorkspaceAction:()=>n.createElement(n.Fragment,null)})}render(){return n.createElement(bs.Provider,{value:this.state},this.props.children)}}var vs;function Ts(e){return class extends n.Component{render(){return n.createElement(bs.Consumer,null,t=>n.createElement(e,ys({administrationWorkspaceContext:t},this.props)))}}}fs.displayName="AdministrationWorkspaceContextProvider",fs.propTypes={context:h().object,children:h().any,location:h().object,match:h().object,history:h().object,loadingContext:h().object,rbacContext:h().object},(0,xt.withRouter)(o(function(e){return class extends n.Component{render(){return n.createElement(gs.Consumer,null,t=>n.createElement(e,ms({rbacContext:t},this.props)))}}}((vs=fs,class extends n.Component{render(){return n.createElement(Nt.Consumer,null,e=>n.createElement(vs,qt({loadingContext:e},this.props)))}}))));const ws={NONE:"NONE",HOME:"HOME",MFA:"MFA",MFA_POLICY:"MFA-POLICY",PASSWORD_POLICIES:"PASSWORD-POLICIES",USER_DIRECTORY:"USER-DIRECTORY",EMAIL_NOTIFICATION:"EMAIL-NOTIFICATION",SUBSCRIPTION:"SUBSCRIPTION",INTERNATIONALIZATION:"INTERNATIONALIZATION",ACCOUNT_RECOVERY:"ACCOUNT-RECOVERY",SMTP_SETTINGS:"SMTP-SETTINGS",SELF_REGISTRATION:"SELF-REGISTRATION",SSO:"SSO",RBAC:"RBAC",USER_PASSPHRASE_POLICIES:"USER-PASSPHRASE-POLICIES",PASSWORD_EXPIRY:"PASSWORD-EXPIRY",HTTP_403_ACCESS_DENIED:"403-ACCESS-DENIED",HTTP_404_NOT_FOUND:"404-NOT-FOUND",HEALTHCHECK:"HEALTHCHECK",CONTENT_TYPES_ENCRYPTED_METADATA:"CONTENT_TYPES_ENCRYPTED_METADATA",CONTENT_TYPES_METADATA_KEY:"CONTENT_TYPES_METADATA_KEY",MIGRATE_METADATA:"MIGRATE_METADATA",ALLOW_CONTENT_TYPES:"ALLOW_CONTENT_TYPES",METADATA_GETTING_STARTED:"METADATA_GETTING_STARTED",SCIM:"SCIM",SECRET_HISTORY:"SECRET_HISTORY",CE_DOWNGRADE:"DOWNGRADE-TO-CE"},Ss={[ws.MFA]:"multiFactorAuthentication",[ws.MFA_POLICY]:"mfaPolicies",[ws.PASSWORD_POLICIES]:"passwordPoliciesUpdate",[ws.USER_DIRECTORY]:"directorySync",[ws.SUBSCRIPTION]:"ee",[ws.INTERNATIONALIZATION]:"locale",[ws.ACCOUNT_RECOVERY]:"accountRecovery",[ws.SMTP_SETTINGS]:"smtpSettings",[ws.SELF_REGISTRATION]:"selfRegistration",[ws.SSO]:"sso",[ws.RBAC]:"rbacs",[ws.USER_PASSPHRASE_POLICIES]:"userPassphrasePolicies",[ws.PASSWORD_EXPIRY]:"passwordExpiry",[ws.HEALTHCHECK]:"healthcheckUi",[ws.CONTENT_TYPES_ENCRYPTED_METADATA]:"metadata",[ws.CONTENT_TYPES_METADATA_KEY]:"metadata",[ws.MIGRATE_METADATA]:"metadata",[ws.ALLOW_CONTENT_TYPES]:"metadata",[ws.METADATA_GETTING_STARTED]:"metadata",[ws.SCIM]:"scim",[ws.SECRET_HISTORY]:"secretRevisions",[ws.CE_DOWNGRADE]:"ee"},xs={homePage:/^\/app\/administration\/?$/,mfa:/^\/app\/administration\/mfa\/?$/,mfaPolicy:/^\/app\/administration\/mfa-policy\/?$/,mfaPolicyTeasing:/^\/app\/administration\/mfa-policy-teasing\/?$/,passwordPolicies:/^\/app\/administration\/password-policies\/?$/,passwordPoliciesTeasing:/^\/app\/administration\/password-policies-teasing\/?$/,usersDirectory:/^\/app\/administration\/users-directory\/?$/,usersDirectoryTeasing:/^\/app\/administration\/users-directory-teasing\/?$/,emailNotification:/^\/app\/administration\/email-notification\/?$/,subscription:/^\/app\/administration\/subscription\/?$/,subscriptionTeasing:/^\/app\/administration\/subscription-teasing\/?$/,internationalization:/^\/app\/administration\/internationalization\/?$/,accountRecovery:/^\/app\/administration\/account-recovery\/?$/,accountRecoveryTeasing:/^\/app\/administration\/account-recovery-teasing\/?$/,smtpSettings:/^\/app\/administration\/smtp-settings\/?$/,selfRegistration:/^\/app\/administration\/self-registration\/?$/,sso:/^\/app\/administration\/sso\/?$/,ssoTeasing:/^\/app\/administration\/sso-teasing\/?$/,rbac:/^\/app\/administration\/rbacs\/?$/,userPassphrasePolicies:/^\/app\/administration\/user-passphrase-policies\/?$/,userPassphrasePoliciesTeasing:/^\/app\/administration\/user-passphrase-policies-teasing\/?$/,passwordExpirySettings:/^\/app\/administration\/password-expiry\/?$/,healthcheck:/^\/app\/administration\/healthcheck\/?$/,contentTypesEncryptedMetadata:/^\/app\/administration\/content-types\/metadata\/?$/,contentTypesMetadataKey:/^\/app\/administration\/content-types\/metadata-key\/?$/,migrateEncryptedMetadata:/^\/app\/administration\/migrate-metadata\/?$/,allowContentTypes:/^\/app\/administration\/allow-content-types\/?$/,gettingStarted:/^\/app\/administration\/content-types\/metadata-getting-started\/?$/,scim:/^\/app\/administration\/user-provisionning\/scim\/?$/,scimTeasing:/^\/app\/administration\/scim-teasing\/?$/,secretHistory:/^\/app\/administration\/secret-history\/?$/,ceDowngrade:/^\/app\/administration\/ce-downgrade\/?$/},As=[ws.SUBSCRIPTION,ws.PASSWORD_POLICIES,ws.USER_PASSPHRASE_POLICIES,ws.ACCOUNT_RECOVERY,ws.SSO,ws.MFA_POLICY,ws.USER_DIRECTORY,ws.SCIM],Cs=class{constructor(e){this.customerId=e?.customer_id||"",this.subscriptionId=e?"subscription_id"in e?e.subscription_id:"N/A":"",this.users=e?.users||null,this.email=e?"email"in e?e.email:"N/A":"",this.expiry=e?.expiry||null,this.created=e?.created||null,this.data=e?.data||null}};function Rs(){return Rs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)({}).hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e},Rs.apply(null,arguments)}const qs=n.createContext({getSubscription:()=>{},findSubscriptionKey:()=>{},isProcessing:()=>{},setProcessing:()=>{},getActiveUsers:()=>{},clearContext:()=>{}});class Ns extends n.Component{constructor(e){super(e),this.state=this.defaultState}get defaultState(){return{subscription:new Cs,processing:!1,getSubscription:this.getSubscription.bind(this),findSubscriptionKey:this.findSubscriptionKey.bind(this),isProcessing:this.isProcessing.bind(this),setProcessing:this.setProcessing.bind(this),getActiveUsers:this.getActiveUsers.bind(this),clearContext:this.clearContext.bind(this)}}async findSubscriptionKey(){this.setProcessing(!0);let e=new Cs;try{const t=await this.props.context.onGetSubscriptionKeyRequested();e=new Cs(t.toDto())}catch(t){"PassboltSubscriptionError"===t.name&&(e=new Cs(t.subscription))}finally{this.setState({subscription:e}),this.setProcessing(!1)}}async getActiveUsers(){return(await this.props.context.port.request("passbolt.users.get-all")).filter(e=>e.active).length}getSubscription(){return this.state.subscription}isProcessing(){return this.state.processing}setProcessing(e){this.setState({processing:e})}clearContext(){const{subscription:e,processing:t}=this.defaultState;this.setState({subscription:e,processing:t})}render(){return n.createElement(qs.Provider,{value:this.state},this.props.children)}}function ks(e){return class extends n.Component{render(){return n.createElement(qs.Consumer,null,t=>n.createElement(e,Rs({adminSubscriptionContext:t},this.props)))}}}var Os;function _s(){return _s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)({}).hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e},_s.apply(null,arguments)}Ns.propTypes={context:h().any,children:h().any},o(Ns);const Is=function(e){return n.createElement("svg",_s({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),Os||(Os=n.createElement("path",{stroke:"var(--icon-color)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"m12 4-8 8M4 4l8 8"})))};class Ps extends n.Component{constructor(e){super(e),this.bindCallbacks()}bindCallbacks(){this.handleCloseClick=this.handleCloseClick.bind(this)}handleCloseClick(){this.props.onClose()}render(){return n.createElement("button",{type:"button",disabled:this.props.disabled,className:"dialog-close button button-transparent",onClick:this.handleCloseClick},n.createElement(Is,{className:"svg-icon close"}),n.createElement("span",{className:"visually-hidden"},n.createElement(P.x6,null,"Close")))}}Ps.propTypes={onClose:h().func,disabled:h().bool};const Ds=(0,P.CI)("common")(Ps);var Us;function Gs(){return Gs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)({}).hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e},Gs.apply(null,arguments)}const Ls=function(e){return n.createElement("svg",Gs({xmlns:"http://www.w3.org/2000/svg",width:17,height:18,fill:"none",viewBox:"0 0 17 18"},e),Us||(Us=n.createElement("path",{stroke:"var(--icon-color)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M8.5 16.5a7.5 7.5 0 1 0 0-15 7.5 7.5 0 0 0 0 15M8.5 12V9M8.5 6h.008"})))};class Ms extends n.Component{constructor(e){super(e),this.bindCallbacks()}bindCallbacks(){this.handleKeyDown=this.handleKeyDown.bind(this),this.handleClose=this.handleClose.bind(this)}handleKeyDown(e){27===e.keyCode&&this.handleClose()}handleClose(){this.props.disabled||this.props.onClose()}componentDidMount(){document.addEventListener("keydown",this.handleKeyDown,{capture:!1})}componentWillUnmount(){document.removeEventListener("keydown",this.handleKeyDown,{capture:!1})}render(){return n.createElement("div",{className:`${this.props.className} dialog-wrapper`},n.createElement("div",{className:"dialog"},n.createElement("div",{className:"dialog-header"},n.createElement("div",{className:"dialog-title-wrapper"},n.createElement("h2",null,n.createElement("span",{className:"dialog-header-title"},this.props.title),this.props.subtitle&&n.createElement("span",{className:"dialog-header-subtitle"},this.props.subtitle)),this.props.tooltip&&""!==this.props.tooltip&&n.createElement(yt,{message:this.props.tooltip},n.createElement(Ls,null))),n.createElement(Ds,{onClose:this.handleClose,disabled:this.props.disabled})),n.createElement("div",{className:"dialog-content"},this.props.children)))}}Ms.propTypes={children:h().node,className:h().string,title:h().oneOfType([h().arrayOf(h().node),h().node,h().string]),subtitle:h().string,tooltip:h().string,disabled:h().bool,onClose:h().func};const Fs=Ms;function $s(){return $s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)({}).hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e},$s.apply(null,arguments)}const js=n.createContext({feedbacks:[],displaySuccess:()=>{},displayWarning:()=>{},displayError:()=>{},remove:()=>{}});class Vs extends n.Component{constructor(e){super(e),this.state=this.defaultState}get defaultState(){return{feedbacks:[],displaySuccess:this.displaySuccess.bind(this),displayWarning:this.displayWarning.bind(this),displayError:this.displayError.bind(this),remove:this.remove.bind(this)}}displaySuccess(e){this.setState({feedbacks:[...this.state.feedbacks,{id:(0,ft.A)(),type:"success",message:e}]})}displayWarning(e){this.setState({feedbacks:[...this.state.feedbacks,{id:(0,ft.A)(),type:"warning",message:e}]})}displayError(e){this.setState({feedbacks:[...this.state.feedbacks,{id:(0,ft.A)(),type:"error",message:e}]})}remove(e){this.setState(t=>({feedbacks:t.feedbacks.filter(t=>e.id!==t.id)}))}render(){return n.createElement(js.Provider,{value:this.state},this.props.children)}}Vs.displayName="ActionFeedbackContextProvider",Vs.propTypes={children:h().any};class Ks extends n.Component{constructor(e){super(e),this.state=this.defaultState,this.bindCallbacks()}get defaultState(){return{showErrorDetails:!1}}bindCallbacks(){this.handleKeyDown=this.handleKeyDown.bind(this),this.handleErrorDetailsToggle=this.handleErrorDetailsToggle.bind(this)}componentDidMount(){document.addEventListener("keydown",this.handleKeyDown,{capture:!0})}componentWillUnmount(){document.removeEventListener("keydown",this.handleKeyDown,{capture:!0})}getTitle(){return this.props.title?this.props.title:this.props.t("There was an unexpected error...")}getMessage(){return this.props.error.message}handleKeyDown(e){27!==e.keyCode&&13!==e.keyCode||(e.stopPropagation(),this.props.onClose())}handleErrorDetailsToggle(){this.setState({showErrorDetails:!this.state.showErrorDetails})}get hasErrorDetails(){return Boolean(this.props.error.data?.body)||Boolean(this.props.error.details)}formatErrors(){const e=this.props.error?.details||this.props.error?.data;return JSON.stringify(e,null,4)}render(){return n.createElement(Fs,{className:"dialog-wrapper error-dialog",onClose:this.props.onClose,title:this.getTitle()},n.createElement("div",{className:"form-content"},n.createElement("p",null,this.getMessage()),this.hasErrorDetails&&n.createElement("div",{className:"accordion error-details"},n.createElement("div",{className:"accordion-header"},n.createElement("button",{type:"button",className:"link no-border",onClick:this.handleErrorDetailsToggle},n.createElement("span",null,n.createElement(P.x6,null,"Error details")),this.state.showErrorDetails?n.createElement(te,{className:"baseline svg-icon"}):n.createElement(ie,{className:"baseline svg-icon"}))),this.state.showErrorDetails&&n.createElement("div",{className:"accordion-content"},n.createElement("div",{className:"input text"},n.createElement("label",{htmlFor:"js_field_debug",className:"visuallyhidden"},n.createElement(P.x6,null,"Error details")),n.createElement("textarea",{id:"js_field_debug",defaultValue:this.formatErrors(),readOnly:!0}))))),n.createElement("div",{className:"submit-wrapper clearfix"},n.createElement("button",{type:"button",className:"button primary warning",onClick:this.props.onClose},"Ok")))}}Ks.propTypes={title:h().string,error:h().object.isRequired,onClose:h().func,t:h().func};const Bs=(0,P.CI)("common")(Ks);class zs extends n.Component{constructor(e){super(e),this.bindCallbacks()}bindCallbacks(){this.getClassName=this.getClassName.bind(this)}getClassName(){let e="button primary form";return this.props.warning?e+=" warning":this.props.attention&&(e+=" attention"),this.props.disabled&&(e+=" disabled"),this.props.processing&&(e+=" processing"),this.props.big&&(e+=" big"),this.props.medium&&(e+=" medium"),this.props.fullWidth&&(e+=" full-width"),e}render(){return n.createElement("button",{type:"submit",className:this.getClassName(),disabled:this.props.disabled},this.props.value||n.createElement(P.x6,null,"Save"),this.props.processing&&n.createElement(U,null))}}zs.defaultProps={warning:!1,attention:!1},zs.propTypes={processing:h().bool,disabled:h().bool,value:h().oneOfType([h().arrayOf(h().node),h().node,h().string]),warning:h().bool,attention:h().bool,big:h().bool,medium:h().bool,fullWidth:h().bool};const Hs=(0,P.CI)("common")(zs);class Ws extends n.Component{constructor(e){super(e),this.bindCallbacks()}bindCallbacks(){this.handleClick=this.handleClick.bind(this)}handleClick(){this.props.disabled||this.props.onClick()}render(){return n.createElement("button",{type:"button",disabled:this.props.disabled,className:"link cancel",onClick:this.handleClick},this.props.value)}}Ws.defaultProps={value:n.createElement(P.x6,null,"Cancel")},Ws.propTypes={disabled:h().bool,onClick:h().func,value:h().oneOfType([h().arrayOf(h().node),h().node,h().string])};const Ys=(0,P.CI)("common")(Ws),Zs=class extends ds{static getSchema(){return{type:"object",required:["subscription_id","users","expiry","created","data"],properties:{customer_id:{type:"string"},subscription_id:{type:"string"},users:{type:"integer"},email:{type:"string",format:"email"},created:{type:"string",format:"date-time"},expiry:{type:"string",format:"date-time"},data:{type:"string"}}}}get expiry(){return this._props.expiry}toDto(){return Object.assign({},this._props)}toJSON(){return this.toDto()}static get ENTITY_NAME(){return"Subscription"}},Xs=class{constructor(e){this.port=e}async createOrganizationSubscriptionKey(e){(0,ns.A)(e);const t=await this.port.request("passbolt.subscription.create",{data:e});return new Zs(t)}async findOrganizationSubscriptionKey(){const e=await this.port.request("passbolt.subscription.get");return new Zs(e)}async updateOrganizationSubscriptionKey(e){(0,ns.A)(e);const t=await this.port.request("passbolt.subscription.update",{data:e});return new Zs(t)}async deleteOrganizationSubscriptionKey(){await this.port.request("passbolt.subscription.downgrade")}};class Js extends n.Component{constructor(e){super(e),this.state=this.getDefaultState(),this.initEventHandlers(),this.createInputRef(),this.subscriptionKeyService=new Xs(e.context.port)}getDefaultState(){return{selectedFile:null,key:"",keyError:"",processing:!1,hasBeenValidated:!1}}initEventHandlers(){this.handleCloseClick=this.handleCloseClick.bind(this),this.handleFormSubmit=this.handleFormSubmit.bind(this),this.handleInputChange=this.handleInputChange.bind(this),this.handleKeyInputKeyUp=this.handleKeyInputKeyUp.bind(this),this.handleSelectSubscriptionKeyFile=this.handleSelectSubscriptionKeyFile.bind(this),this.handleSelectFile=this.handleSelectFile.bind(this)}createInputRef(){this.keyInputRef=n.createRef(),this.fileUploaderRef=n.createRef()}componentDidMount(){this.setState({key:this.props.context.editSubscriptionKey?.key||""})}async handleFormSubmit(e){e.preventDefault(),this.state.processing||await this.save()}handleInputChange(e){const t=e.target,s=t.value,n=t.name;this.setState({[n]:s})}handleKeyInputKeyUp(){if(this.state.hasAlreadyBeenValidated){const e=this.validateNameInput();this.setState(e)}}handleCloseClick(){this.props.context.setContext({editSubscriptionKey:null}),this.props.onClose()}handleSelectFile(){this.fileUploaderRef.current.click()}get selectedFilename(){return this.state.selectedFile?this.state.selectedFile.name:""}async handleSelectSubscriptionKeyFile(e){const[t]=e.target.files,s=await this.readSubscriptionKeyFile(t);this.setState({key:s,selectedFile:t}),this.state.hasBeenValidated&&await this.validate()}readSubscriptionKeyFile(e){const t=new FileReader;return new Promise((s,n)=>{t.onloadend=()=>{try{s(t.result)}catch(e){n(e)}},t.readAsText(e)})}async save(){if(!this.state.processing){if(this.setState({hasBeenValidated:!0,processing:!0}),!await this.validate())return this.handleValidateError(),void this.setState({processing:!1});try{this.props.onSave?await this.props.onSave(this.state.key):await this.subscriptionKeyService.updateOrganizationSubscriptionKey(this.state.key),await this.handleSaveSuccess(),await this.props.adminSubscriptionContext.findSubscriptionKey()}catch(e){this.setState({processing:!1}),this.handleSaveError(e),this.focusFieldError()}}}handleValidateError(){this.focusFieldError()}async handleSaveSuccess(){await this.props.actionFeedbackContext.displaySuccess(this.translate("The subscription key has been updated successfully.")),this.props.administrationWorkspaceContext.onMustRefreshSubscriptionKey(),this.props.context.setContext({editSubscriptionKey:null,refreshSubscriptionAnnouncement:!0}),this.props.onClose()}handleSaveError(e){if("PassboltSubscriptionError"===e.name)this.setState({keyError:e.message});else if("EntityValidationError"===e.name)this.setState({keyError:this.translate("The subscription key is invalid.")});else if("PassboltApiFetchError"===e.name&&e.data&&400===e.data.code)this.setState({keyError:e.message});else{console.error(e);const t={error:e};this.props.dialogContext.open(Bs,t)}}focusFieldError(){this.state.keyError&&this.keyInputRef.current.focus()}validateKeyInput(){const e=this.state.key.trim();let t="";return e.length||(t=this.translate("A subscription key is required.")),new Promise(e=>{this.setState({keyError:t},e)})}async validate(){return this.setState({keyError:""}),await this.validateKeyInput(),""===this.state.keyError}hasAllInputDisabled(){return this.state.processing}get translate(){return this.props.t}render(){return n.createElement(Fs,{title:this.props.title??this.translate("Edit subscription key"),onClose:this.handleCloseClick,disabled:this.state.processing,className:"edit-subscription-dialog"},n.createElement("form",{onSubmit:this.handleFormSubmit,noValidate:!0},n.createElement("div",{className:"form-content"},n.createElement("div",{className:`input textarea required ${this.state.keyError?"error":""} ${this.hasAllInputDisabled()?"disabled":""}`},n.createElement("label",{htmlFor:"edit-tag-form-name"},n.createElement(P.x6,null,"Subscription key")),n.createElement("textarea",{id:"edit-subscription-form-key",name:"key",value:this.state.key,onKeyUp:this.handleKeyInputKeyUp,onChange:this.handleInputChange,disabled:this.hasAllInputDisabled(),ref:this.keyInputRef,className:"required full_report",required:"required",autoComplete:"off",autoFocus:!0})),n.createElement("div",{className:"input file "+(this.hasAllInputDisabled()?"disabled":"")},n.createElement("input",{type:"file",ref:this.fileUploaderRef,disabled:this.hasAllInputDisabled(),onChange:this.handleSelectSubscriptionKeyFile}),n.createElement("div",{className:"input-file-inline"},n.createElement("input",{type:"text",disabled:!0,placeholder:this.translate("No key file selected"),value:this.selectedFilename}),n.createElement("button",{type:"button",className:"button primary",onClick:this.handleSelectFile,disabled:this.hasAllInputDisabled()},n.createElement("span",null,n.createElement(P.x6,null,"Choose a file")))),this.state.keyError&&n.createElement("div",{className:"key error-message"},this.state.keyError),this.props.warning&&n.createElement("p",null,this.props.warning))),n.createElement("div",{className:"submit-wrapper clearfix"},n.createElement(Ys,{disabled:this.hasAllInputDisabled(),onClick:this.handleCloseClick}),n.createElement(Hs,{disabled:this.hasAllInputDisabled(),processing:this.state.processing,value:this.translate("Save")}))))}}Js.propTypes={context:h().any,onClose:h().func,actionFeedbackContext:h().any,adminSubscriptionContext:h().object,dialogContext:h().any,administrationWorkspaceContext:h().any,title:h().string,warning:h().string,onSave:h().func,t:h().func};const Qs=o(ks(Ts(function(e){return class extends n.Component{render(){return n.createElement(js.Consumer,null,t=>n.createElement(e,$s({actionFeedbackContext:t},this.props)))}}}(St((0,P.CI)("common")(Js))))));class en{constructor(e){this.context=e.context,this.dialogContext=e.dialogContext,this.subscriptionContext=e.adminSubscriptionContext}static getInstance(e){return this.instance||(this.instance=new en(e)),this.instance}static killInstance(){this.instance=null}editSubscription(){const e={key:this.subscriptionContext.getSubscription().data};this.context.setContext({editSubscriptionKey:e}),this.dialogContext.open(Qs)}}const tn=en;var sn=s(961);var nn,rn;function an(){return an=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)({}).hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e},an.apply(null,arguments)}const on=function(e){return n.createElement("svg",an({xmlns:"http://www.w3.org/2000/svg",width:18,height:18,fill:"none",viewBox:"0 0 18 18"},e),nn||(nn=n.createElement("path",{stroke:"var(--icon-color)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M15 3H3a1.5 1.5 0 0 0-1.5 1.5v9A1.5 1.5 0 0 0 3 15h12a1.5 1.5 0 0 0 1.5-1.5v-9A1.5 1.5 0 0 0 15 3"})),rn||(rn=n.createElement("path",{stroke:"var(--icon-color)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M16.5 5.25 9.773 9.525a1.46 1.46 0 0 1-1.546 0L1.5 5.25"})))};var ln;function cn(){return cn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)({}).hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e},cn.apply(null,arguments)}const hn=function(e){return n.createElement("svg",cn({xmlns:"http://www.w3.org/2000/svg",width:18,height:18,fill:"none",viewBox:"0 0 18 18"},e),ln||(ln=n.createElement("path",{stroke:"var(--icon-color)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"m16.298 13.5-6-10.5a1.5 1.5 0 0 0-2.61 0l-6 10.5A1.5 1.5 0 0 0 3 15.75h12a1.5 1.5 0 0 0 1.297-2.25M9 6.75v3M9 12.75h.008"})))},dn="Pro Edition",pn="Community Edition";class un extends n.Component{constructor(e){super(e),this.state=this.defaultState,this.bindCallbacks(),this.subscriptionActionService=tn.getInstance(this.props),this.subscriptionKeyService=new Xs(this.props.context.port)}get defaultState(){return{activeUsers:null}}async componentDidMount(){this.props.context.siteSettings.isCommunityEdition&&this.hasEditionPlugin()||this.props.adminSubscriptionContext.findSubscriptionKey();const e=await this.props.adminSubscriptionContext.getActiveUsers();this.setState({activeUsers:e})}componentWillUnmount(){this.props.adminSubscriptionContext.clearContext(),tn.killInstance()}bindCallbacks(){this.handleRenewKey=this.handleRenewKey.bind(this),this.handleUpdateKey=this.handleUpdateKey.bind(this),this.handleDowngradeClick=this.handleDowngradeClick.bind(this),this.handleAddSubscriptionKey=this.handleAddSubscriptionKey.bind(this),this.handleSaveSubscriptionKey=this.handleSaveSubscriptionKey.bind(this)}handleSaveSubscriptionKey(e){return this.subscriptionKeyService.createOrganizationSubscriptionKey(e)}handleAddSubscriptionKey(){this.props.dialogContext.open(Qs,{title:this.props.t("New subscription key"),onSave:this.handleSaveSubscriptionKey,warning:this.translate("You and your team will be disconnected at the end of the process.")})}handleDowngradeClick(){this.props.navigationContext.onGoToAdministrationDowngradeToCeRequested()}handleRenewKey(){const e=this.props.adminSubscriptionContext.getSubscription();this.hasLimitUsersExceeded()?this.props.navigationContext.onGoToNewTab(`https://www.passbolt.com/subscription/ee/update/qty?subscription_id=${e.subscriptionId}&customer_id=${e.customerId}`):(this.hasSubscriptionKeyExpired()||this.hasSubscriptionKeyGoingToExpire())&&this.props.navigationContext.onGoToNewTab(`https://www.passbolt.com/subscription/ee/update/renew?subscription_id=${e.subscriptionId}&customer_id=${e.customerId}`)}handleUpdateKey(){this.subscriptionActionService.editSubscription()}hasEditionPlugin(){return this.props.context.siteSettings.canIUse("edition")}hasSubscriptionKeyExpired(){return bt.c9.fromISO(this.props.adminSubscriptionContext.getSubscription().expiry)<bt.c9.now()}hasSubscriptionKeyGoingToExpire(){return!this.hasSubscriptionKeyExpired()&&bt.c9.fromISO(this.props.adminSubscriptionContext.getSubscription().expiry)<bt.c9.now().plus({days:30})}shouldShowDowngradeSection(){return this.hasEditionPlugin()&&!this.props.context.siteSettings.isCommunityEdition&&(this.hasSubscriptionKeyExpired()||this.hasSubscriptionKeyGoingToExpire())}hasLimitUsersExceeded(){return this.props.adminSubscriptionContext.getSubscription().users<this.state.activeUsers}hasValidSubscription(){return!this.props.context.siteSettings.isCommunityEdition&&!this.hasLimitUsersExceeded()&&!this.hasSubscriptionKeyExpired()}hasInvalidSubscription(){return!this.props.context.siteSettings.isCommunityEdition&&!this.props.adminSubscriptionContext.getSubscription().data}formatDate(e){try{return bt.c9.fromISO(e).setLocale(this.props.context.locale).toLocaleString(bt.c9.DATE_SHORT)}catch(t){return console.error(`Failed to format date "${e}":`,t),""}}get translate(){return this.props.t}render(){const e=this.props.adminSubscriptionContext.getSubscription(),t=this.props.adminSubscriptionContext.isProcessing();return n.createElement("div",{className:"row"},!t&&n.createElement("div",{className:"subscription-key main-column"},n.createElement("div",{className:"main-content"},n.createElement("h1",null,n.createElement(P.x6,null,"Subscription")),n.createElement("h3",null,n.createElement(P.x6,null,"Details")),n.createElement("div",{className:"subscription-information"},n.createElement("div",{className:"information container"},n.createElement("div",{className:"information"},n.createElement("div",{className:"information-label"},n.createElement("span",{className:"edition label"},n.createElement(P.x6,null,"Edition:")),n.createElement("span",{className:"server-version label"},n.createElement(P.x6,null,"Server version:")),n.createElement("span",{className:"client-version label"},n.createElement(P.x6,null,"Client version:")),!this.props.context.siteSettings.isCommunityEdition&&n.createElement(n.Fragment,null,n.createElement("span",{className:"email label"},n.createElement(P.x6,null,"Email:")),n.createElement("span",{className:"users label"},n.createElement(P.x6,null,"Users limit:")))),n.createElement("div",{className:"information-value"},n.createElement("span",{className:"edition value"},!this.props.context.siteSettings.isCommunityEdition&&dn,this.props.context.siteSettings.isCommunityEdition&&n.createElement(n.Fragment,null,pn,n.createElement("span",{className:"subtitle"},n.createElement(P.x6,null,"(Free forever)")))),n.createElement("span",{className:"server-version value"},this.props.context.siteSettings.version),n.createElement("span",{className:"client-version value"},this.props.context.extensionVersion),!this.props.context.siteSettings.isCommunityEdition&&n.createElement(n.Fragment,null,n.createElement("span",{className:"email value"},e.email),n.createElement("span",{className:"users value "+(this.hasLimitUsersExceeded()?"error":"")},e.users," ",n.createElement("span",{className:"secondary-information"},"(",n.createElement(P.x6,null,"currently:")," ",this.state.activeUsers,")"))))),n.createElement("div",{className:"information"},n.createElement("div",{className:"information-label"},!this.props.context.siteSettings.isCommunityEdition&&n.createElement(n.Fragment,null,n.createElement("span",{className:"customer-id label"},n.createElement(P.x6,null,"Customer id:")),n.createElement("span",{className:"subscription-id label"},n.createElement(P.x6,null,"Subscription id:")),n.createElement("span",{className:"created label"},n.createElement(P.x6,null,"Valid from:")),n.createElement("span",{className:"expiry label"},n.createElement(P.x6,null,"Expires on:")))),n.createElement("div",{className:"information-value"},!this.props.context.siteSettings.isCommunityEdition&&n.createElement(n.Fragment,null,n.createElement("span",{className:"customer-id value"},e.customerId),n.createElement("span",{className:"subscription-id value"},e.subscriptionId),n.createElement("span",{className:"created value"},this.formatDate(e.created)),n.createElement("span",{className:`expiry value ${this.hasSubscriptionKeyExpired()?"error":""} ${this.hasSubscriptionKeyGoingToExpire()?"warning":""}`},this.formatDate(e.expiry)," ",n.createElement("span",{className:"secondary-information",title:e.expiry},"(",`${this.hasSubscriptionKeyExpired()?this.translate("expired "):""}${((e,t,s)=>{if(null===e)return"n/a";if("Infinity"===e)return t("Never");const n=bt.c9.fromISO(e),i=n.diffNow().toMillis();return i>-1e3&&i<0?t("Just now"):n.toRelative({locale:s})})(e.expiry,this.props.t,this.props.context.locale)}`,")"))))))),!this.props.context.siteSettings.isCommunityEdition&&n.createElement(n.Fragment,null,!this.props.context.siteSettings.isCommunityEdition&&n.createElement("div",{className:"subscription-actions"},this.hasSubscriptionKeyExpired()&&n.createElement("div",{className:"subscription-warning"},n.createElement(hn,null),n.createElement(P.x6,null,"Your subscription key is expired.")),this.hasLimitUsersExceeded()&&n.createElement("div",{className:"subscription-warning"},n.createElement(hn,null),n.createElement(P.x6,null,"Your users limit has been reached.")),this.hasInvalidSubscription()&&n.createElement("div",{className:"subscription-warning"},n.createElement(hn,null),n.createElement(P.x6,null,"Your subscription key is either missing or not valid.")))),n.createElement("div",{className:"subscription-actions"},!this.props.context.siteSettings.isCommunityEdition&&n.createElement(n.Fragment,null,(this.shouldShowDowngradeSection()||this.hasLimitUsersExceeded())&&n.createElement("button",{className:"button",type:"button",onClick:this.handleRenewKey},n.createElement(P.x6,null,"Renew subscription key")),n.createElement("button",{className:"button primary form",type:"button",onClick:this.handleUpdateKey},n.createElement(P.x6,null,"Update subscription key"))),this.props.context.siteSettings.isCommunityEdition&&this.hasEditionPlugin()&&n.createElement(n.Fragment,null,n.createElement("button",{className:"button primary form",type:"button",onClick:this.handleAddSubscriptionKey},n.createElement(P.x6,null,"Upload subscription key")))),n.createElement("h3",{className:"title"},n.createElement(P.x6,null,"Plans")),n.createElement("div",{className:"subscription-editions"},n.createElement("div",{className:"edition "+(this.props.context.siteSettings.isCommunityEdition?"current-edition":"")},n.createElement("div",{className:"content"},n.createElement("div",{className:"title"},n.createElement("div",{className:"community-title"},n.createElement("h3",null,pn),n.createElement("span",{className:"subtitle"},n.createElement(P.x6,null,"(Free forever)"))),this.props.context.siteSettings.isCommunityEdition&&n.createElement("div",{className:"current-edition-indicator-wrapper"},n.createElement("div",{className:"current-edition-indicator"},n.createElement(P.x6,null,"Current plan")))),n.createElement("div",{className:"features"},n.createElement("span",{className:"subtitle"},n.createElement(P.x6,null,"Features included:")),n.createElement("ul",null,n.createElement("li",null,n.createElement(P.x6,null,"Open source under AGPLV3 license")),n.createElement("li",null,n.createElement(P.x6,null,"Passwords management & sharing")),n.createElement("li",null,n.createElement(P.x6,null,"Private and shared folders")),n.createElement("li",null,n.createElement(P.x6,null,"Users and groups management")),n.createElement("li",null,n.createElement(P.x6,null,"Secret key authentication (2FA)")),n.createElement("li",null,n.createElement(P.x6,null,"Additional factor authentication (3-step verification)")),n.createElement("li",null,n.createElement(P.x6,null,"Open API")),n.createElement("li",null,n.createElement(P.x6,null,"Role Based Access Control")),n.createElement("li",null,n.createElement(P.x6,null,"Password expiry")),n.createElement("li",null,n.createElement(P.x6,null,"Secret history")),n.createElement("li",null,n.createElement(P.x6,null,"Community support"))))),this.shouldShowDowngradeSection()&&n.createElement("div",{className:"subscription-actions"},n.createElement("button",{className:"button",type:"button",onClick:this.handleDowngradeClick},n.createElement(P.x6,null,"Downgrade to ",{edition:"Community"})))),n.createElement("div",{className:"edition "+(this.props.context.siteSettings.isCommunityEdition?"":"current-edition")},n.createElement("div",{className:"content"},n.createElement("div",{className:"title"},n.createElement("h3",null,dn),!this.props.context.siteSettings.isCommunityEdition&&n.createElement("div",{className:"current-edition-indicator-wrapper"},n.createElement("div",{className:"current-edition-indicator"},n.createElement(P.x6,null,"Current plan")))),n.createElement("div",{className:"features"},n.createElement("span",{className:"subtitle"},n.createElement(P.x6,null,"Features include everything in Community, plus:")),n.createElement("ul",null,n.createElement("li",null,n.createElement(P.x6,null,"Account recovery (Escrow)")),n.createElement("li",null,n.createElement(P.x6,null,"Users provisioning (AD / OpenLDAP / SCIM)")),n.createElement("li",null,n.createElement(P.x6,null,"Single Sign On (SSO) with Microsoft, Google and more")),n.createElement("li",null,n.createElement(P.x6,null,"Activity log (audit changes)")),n.createElement("li",null,n.createElement(P.x6,null,"Additional policies")),n.createElement("li",null,n.createElement(P.x6,null,"Tags management")),n.createElement("li",null,n.createElement(P.x6,null,"VM appliance")),n.createElement("li",null,n.createElement(P.x6,null,"Next business day support"))),n.createElement("div",null,n.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:"https://www.passbolt.com/pricing/pro?utm_campaign=21060976-CE%20to%20Pro&utm_source=product"},n.createElement(P.x6,null,"See pricing page"))))),this.props.context.siteSettings.isCommunityEdition&&n.createElement("div",{className:"subscription-actions"},n.createElement("a",{className:"button primary",target:"_blank",rel:"noopener noreferrer",href:"https://www.passbolt.com/pricing/pro?utm_campaign=21060976-CE%20to%20Pro&utm_source=product"},n.createElement(P.x6,null,"Buy now")),n.createElement("a",{className:"button",target:"_blank",rel:"noopener noreferrer",href:"https://www.passbolt.com/contact/pro/free-trial?utm_campaign=21060976-CE%20to%20Pro&utm_source=product"},n.createElement(P.x6,null,"Start a free trial"))))))),(s=n.createElement("div",{className:"sidebar-help-section"},n.createElement("h3",null,n.createElement(P.x6,null,"Need help?")),n.createElement("p",null,n.createElement(P.x6,null,"For any change or question related to your passbolt subscription, kindly contact our sales team.")),n.createElement("a",{className:"button",target:"_blank",rel:"noopener noreferrer",href:"https://www.passbolt.com/contact"},n.createElement(on,null),n.createElement("span",null,n.createElement(P.x6,null,"Contact Sales")))),i=document.getElementById("administration-help-panel"),n.createElement(n.Fragment,null,i&&(0,sn.createPortal)(s,i,void 0))));var s,i}}o(function(e){return class extends n.Component{render(){return n.createElement(Ct.Consumer,null,t=>n.createElement(e,At({navigationContext:t},this.props)))}}}(ks(Ts(St((0,P.CI)("common")(un))))));class mn extends n.Component{get privacyUrl(){return this.props.context.siteSettings.privacyLink}get creditsUrl(){return"https://www.passbolt.com/terms"}get unsafeUrl(){return"https://www.passbolt.com/docs/hosting/faq/why-I-see-unsafe-mode-banner/"}get termsUrl(){return this.props.context.siteSettings.termsLink}get versions(){const e=this.props.context.extensionVersion,t=this.props.context.siteSettings.version;return n.createElement("div",null,e&&n.createElement("div",null,this.props.t("Client")," ",e),t&&n.createElement(n.Fragment,null,e&&n.createElement("hr",null),n.createElement("div",null,this.props.t("Server")," ",t)))}get isUnsafeMode(){if(!this.props.context.siteSettings)return!1;const e=this.props.context.siteSettings.debug,t=this.props.context.siteSettings.url.startsWith("http://");return e||t}get isCloud(){const e=new URL(this.props.context.siteSettings.url);return"https:"===e.protocol&&Boolean(e.hostname.match(/cloud.passbolt.com$/))}render(){return n.createElement("footer",{className:"footer"},n.createElement("ul",{className:"footer-links"},this.isUnsafeMode&&n.createElement("li",{className:"error-message"},n.createElement("a",{href:this.unsafeUrl,target:"_blank",rel:"noopener noreferrer"},n.createElement(P.x6,null,"Unsafe mode"))),!this.isCloud&&n.createElement(n.Fragment,null,this.props.context.siteSettings.isCommunityEdition&&n.createElement("li",null,pn,n.createElement("span",{className:"edition-suffix"},n.createElement(P.x6,null," (free)"))),!this.props.context.siteSettings.isCommunityEdition&&n.createElement("li",null,dn)),this.isCloud&&n.createElement("li",null,"Cloud"),n.createElement("li",null,this.versions&&n.createElement(yt,{message:this.versions,direction:"top-left"},n.createElement("a",{className:"button button-transparent inline",href:this.creditsUrl,target:"_blank",rel:"noopener noreferrer"},n.createElement(gt,null))),!this.versions&&n.createElement("a",{className:"button button-transparent inline",href:this.creditsUrl,target:"_blank",rel:"noopener noreferrer"},n.createElement(gt,null)))))}}mn.propTypes={context:h().any,t:h().func};const gn=o((0,P.CI)("common")(mn)),En=(e,t)=>t.split(".").reduce((e,t)=>e?.[t],e);s.dn(En);const yn=(e,t)=>{if(void 0===e||"string"!=typeof e||!e.length)return!1;if((t=t||{}).whitelistedProtocols&&!Array.isArray(t.whitelistedProtocols))throw new TypeError("The whitelistedProtocols should be an array of string.");if(t.defaultProtocol&&"string"!=typeof t.defaultProtocol)throw new TypeError("The defaultProtocol should be a string.");const s=t.whitelistedProtocols||[bn.HTTP,bn.HTTPS],n=[bn.JAVASCRIPT],i=t.defaultProtocol||"";!/^(?:(?!:\/\/).)*:\/\//.test(e)&&i&&(e=`${i}//${e}`);try{const t=new URL(e);return!n.includes(t.protocol)&&!!s.includes(t.protocol)&&t.href}catch(e){return console.error("Failed to sanitize URL:",e),!1}};s.dn(yn);const bn={FTP:"http:",FTPS:"https:",HTTP:"http:",HTTPS:"https:",JAVASCRIPT:"javascript:",SSH:"ssh:"},fn="enabled",vn="disabled",Tn="not found";class wn extends ds{static getSchema(){return{type:"object",required:[],properties:{status:{type:"string",enum:[fn,vn,Tn]},app:{type:"object"},passbolt:{type:"object"},serverTimeDiff:{type:"integer",nullable:!0}}}}marshall(){void 0===this._props.status&&(this._props.status=fn),wn.sanitizeEmailValidateRegex(this._props)}static sanitizeEmailValidateRegex(e){const t=e?.passbolt?.email?.validate?.regex;t&&"string"==typeof t&&t.trim().length&&(e.passbolt.email.validate.regex=t.trim().replace(/^\/+/,"").replace(/\/+$/,""))}static get disabledSiteSettings(){return{status:vn}}toDto(){return{...this._props}}toJSON(){return this.toDto()}canIUse(e){const t=this._props?.passbolt?.plugins?.[e];return!(!t||"object"!=typeof t)&&!1!==t.enabled}isPluginEnabled(e){return this.canIUse(e)}isFeatureBeta(e){return(0,ns.A)(e),En(this._props,`passbolt.plugins.${e}.isInBeta`)||!1}getPluginSettings(e){return En(this._props,`passbolt.plugins.${e}`)}getRememberMeOptions(){return(this.getPluginSettings("rememberMe")||{}).options||{}}get hasRememberMeUntilILogoutOption(){return void 0!==(this.getRememberMeOptions()||{})[-1]}get generatorConfiguration(){return En(this._props,"passbolt.plugins.generator.configuration")}get locale(){return En(this._props,"app.locale")||wn.DEFAULT_LOCALE.locale}async setLocale(e){this._props.app||(this._props.app={}),this._props.app.locale=e}get supportedLocales(){return En(this._props,"passbolt.plugins.locale.options")||wn.DEFAULT_SUPPORTED_LOCALES}getServerTimezone(){return En(this._props,"passbolt.app.server_timezone")}get termsLink(){const e=En(this._props,"passbolt.legal.terms.url");return!!e&&yn(e)}get privacyLink(){const e=En(this._props,"passbolt.legal.privacy_policy.url");return!!e&&yn(e)}get registrationPublic(){return!0===En(this._props,"passbolt.registration.public")}get debug(){return!0===En(this._props,"app.debug")}get url(){return En(this._props,"app.url")||""}get version(){return En(this._props,"app.version.number")}get isCommunityEdition(){return"ce"===En(this._props,"passbolt.edition")}get emailValidateRegex(){return En(this._props,"passbolt.email.validate.regex")||null}isServerInPast(){return(this._props.serverTimeDiff||0)<0}get serverTime(){const e=this._props.serverTimeDiff||0;return(new Date).getTime()+e}static get ENTITY_NAME(){return"SiteSettings"}static get ORGANIZATION_ENABLED(){return fn}static get ORGANIZATION_DISABLED(){return vn}static get ORGANIZATION_NOT_FOUND(){return Tn}static get DEFAULT_LOCALE(){return{locale:"en-UK",label:"English"}}static get DEFAULT_SUPPORTED_LOCALES(){return[wn.DEFAULT_LOCALE]}}const Sn=wn;var xn=s(2635),An=s(2107);class Cn extends n.Component{constructor(e){super(e),this.state=this.defaultState}get defaultState(){return{ready:!1}}async componentDidMount(){await(0,xn.Yx)(P.r9).use(An.A).init({lng:this.locale,load:"currentOnly",interpolation:{escapeValue:!1},react:{useSuspense:!1},backend:{loadPath:(e,t)=>this.getTranslationPath(e,t)},supportedLngs:this.supportedLocales,fallbackLng:!1,ns:["common"],defaultNS:"common",keySeparator:!1,nsSeparator:!1,debug:!1}),this.setState({ready:!0})}getTranslationPath(e,t){const s=e[0],n=t[0],i="en-GB"===s?"en-UK":s;return(this.props.loadingPath||"/locales/{{lng}}/{{ns}}.json").replace("{{lng}}",i).replace("{{ns}}",n)}get supportedLocales(){let e=[];return this.props.context.siteSettings?.supportedLocales?e=this.props.context.siteSettings?.supportedLocales.map(e=>e.locale):e.push(this.locale),e.includes("en-UK")&&e.push("en-GB"),e}get locale(){return this.props.context.locale}async componentDidUpdate(e){await this.handleLocaleChange(e.context.locale)}async handleLocaleChange(e){this.locale!==e&&await(0,xn.v2)(this.locale)}get isReady(){return this.state.ready}render(){return n.createElement(n.Fragment,null,this.isReady&&this.props.children)}}Cn.propTypes={context:h().any,loadingPath:h().any,children:h().any};const Rn=o(Cn),qn=new class{allPropTypes=(...e)=>(...t)=>{const s=e.map(e=>e(...t)).filter(Boolean);if(0===s.length)return;const n=s.map(e=>e.message).join("\n");return new Error(n)}};var Nn;function kn(){return kn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)({}).hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e},kn.apply(null,arguments)}const On=function(e){return n.createElement("svg",kn({width:25,height:24,fill:"none",viewBox:"0 0 25 24"},e),Nn||(Nn=n.createElement("path",{stroke:"var(--icon-color)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M11.597 19a8 8 0 1 0 0-16 8 8 0 0 0 0 16M21.597 21l-4.35-4.35"})))};class _n extends n.Component{constructor(e){super(e),this.state=this.getDefaultState(e),this.bindCallback(),this.createRefs()}getDefaultState(e){return{selectedValue:e.value,search:"",open:!1,style:void 0}}get listItemsFiltered(){const e=this.props.items.filter(e=>e.value!==this.state.selectedValue);return this.props.search&&""!==this.state.search?this.getItemsMatch(e,this.state.search):e}get selectedItemLabel(){const e=this.props.items&&this.props.items.find(e=>e.value===this.state.selectedValue);return e&&e.label||n.createElement(n.Fragment,null," ")}static getDerivedStateFromProps(e,t){return void 0!==e.value&&e.value!==t.selectedValue?{selectedValue:e.value}:null}bindCallback(){this.handleDocumentClickEvent=this.handleDocumentClickEvent.bind(this),this.handleDocumentContextualMenuEvent=this.handleDocumentContextualMenuEvent.bind(this),this.handleDocumentDragStartEvent=this.handleDocumentDragStartEvent.bind(this),this.handleDocumentScrollEvent=this.handleDocumentScrollEvent.bind(this),this.handleSelectClick=this.handleSelectClick.bind(this),this.handleInputChange=this.handleInputChange.bind(this),this.handleItemClick=this.handleItemClick.bind(this),this.handleSelectKeyDown=this.handleSelectKeyDown.bind(this),this.handleItemKeyDown=this.handleItemKeyDown.bind(this),this.handleBlur=this.handleBlur.bind(this)}createRefs(){this.selectedItemRef=n.createRef(),this.selectItemsRef=n.createRef(),this.itemsRef=n.createRef()}componentDidMount(){document.addEventListener("click",this.handleDocumentClickEvent,{capture:!0}),document.addEventListener("contextmenu",this.handleDocumentContextualMenuEvent,{capture:!0}),document.addEventListener("dragstart",this.handleDocumentDragStartEvent,{capture:!0}),document.addEventListener("scroll",this.handleDocumentScrollEvent,{capture:!0})}componentWillUnmount(){document.removeEventListener("click",this.handleDocumentClickEvent,{capture:!0}),document.removeEventListener("contextmenu",this.handleDocumentContextualMenuEvent,{capture:!0}),document.removeEventListener("dragstart",this.handleDocumentDragStartEvent,{capture:!0}),document.removeEventListener("scroll",this.handleDocumentScrollEvent,{capture:!0})}handleDocumentClickEvent(e){this.selectedItemRef.current.contains(e.target)||this.selectItemsRef.current.contains(e.target)||this.closeSelect()}handleDocumentContextualMenuEvent(e){this.selectedItemRef.current.contains(e.target)||this.selectItemsRef.current.contains(e.target)||this.closeSelect()}handleDocumentDragStartEvent(){this.closeSelect()}handleDocumentScrollEvent(e){this.itemsRef.current.contains(e.target)||this.selectItemsRef.current.contains(e.target)||this.closeSelect()}handleSelectClick(){if(this.props.disabled)this.closeSelect();else{const e=!this.state.open;e?this.forceVisibilitySelect():this.resetStyleSelect(),this.setState({open:e})}}getFirstParentWithTransform(){let e=this.selectedItemRef.current.parentElement;for(;null!==e&&""===e.style.getPropertyValue("transform");)e=e.parentElement;return e}forceVisibilitySelect(){const e=this.selectedItemRef.current.getBoundingClientRect(),{width:t,height:s}=e;let{top:n,left:i}=e;const r=this.getFirstParentWithTransform();if(r){const e=r.getBoundingClientRect();n-=e.top,i-=e.left}const a={position:"fixed",zIndex:1,width:t,height:s,top:n,left:i};this.setState({style:a})}handleBlur(e){e.currentTarget.contains(e.relatedTarget)||this.closeSelect()}closeSelect(){this.resetStyleSelect(),this.setState({open:!1})}resetStyleSelect(){this.setState({style:void 0})}handleInputChange(e){const t=e.target,s=t.value,n=t.name;this.setState({[n]:s})}handleItemClick(e){if(this.setState({selectedValue:e.value,open:!1}),"function"==typeof this.props.onChange){const t={target:{value:e.value,name:this.props.name}};this.props.onChange(t)}this.closeSelect()}getItemsMatch(e,t){const s=t&&t.split(/\s+/)||[""];return e.filter(e=>s.every(t=>((e,t)=>(e=>new RegExp((e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))(e),"i"))(e).test(t))(t,e.label)))}handleSelectKeyDown(e){switch(e.keyCode){case 13:return e.stopPropagation(),void this.handleSelectClick();case 40:return e.preventDefault(),e.stopPropagation(),void(this.state.open?this.focusItem(0):this.handleSelectClick());case 38:return e.preventDefault(),e.stopPropagation(),void(this.state.open?this.focusItem(this.listItemsFiltered.length-1):this.handleSelectClick());case 27:return e.stopPropagation(),void this.closeSelect();default:return}}focusItem(e){this.itemsRef.current.childNodes[e]?.focus()}handleItemKeyDown(e,t){switch(e.keyCode){case 13:return e.stopPropagation(),void this.handleItemClick(t);case 40:return e.stopPropagation(),e.preventDefault(),void(e.target.nextSibling?e.target.nextSibling.focus():this.focusItem(0));case 38:return e.stopPropagation(),e.preventDefault(),void(e.target.previousSibling?e.target.previousSibling.focus():this.focusItem(this.listItemsFiltered.length-1));default:return}}hasFilteredItems(){return this.listItemsFiltered.length>0}render(){return n.createElement("div",{className:`select-container ${this.props.className}`,style:{width:this.state.style?.width,height:this.state.style?.height}},n.createElement("div",{onKeyDown:this.handleSelectKeyDown,onBlur:this.handleBlur,id:this.props.id,className:`select ${this.props.direction} ${this.state.open?"open":""}`,style:this.state.style},n.createElement("div",{ref:this.selectedItemRef,className:"selected-value "+(this.props.disabled?"disabled":""),tabIndex:this.props.disabled?-1:0,onClick:this.handleSelectClick},n.createElement("span",{className:"value"},this.selectedItemLabel),n.createElement(te,null)),n.createElement("div",{ref:this.selectItemsRef,className:"select-items "+(this.state.open?"visible":"")},this.props.search&&n.createElement(n.Fragment,null,n.createElement("input",{className:"search-input",name:"search",value:this.state.search,onChange:this.handleInputChange,type:"text"}),n.createElement(On,{className:"search"})),n.createElement("ul",{ref:this.itemsRef,className:"items"},this.hasFilteredItems()&&this.listItemsFiltered.map(e=>n.createElement("li",{tabIndex:e.disabled?-1:0,key:e.value,title:e.title,className:`option ${e.value}`,onKeyDown:t=>this.handleItemKeyDown(t,e),onClick:()=>this.handleItemClick(e)},e.label)),!this.hasFilteredItems()&&this.props.search&&n.createElement("li",{className:"option no-results"},n.createElement(P.x6,null,"No results match")," ",n.createElement("span",null,this.state.search))))))}}_n.defaultProps={id:"",name:"select",className:"",direction:"bottom"},_n.propTypes={id:h().string,name:h().string,className:h().string,direction:h().oneOf(Object.values({top:"top",bottom:"bottom",left:"left",right:"right"})),search:h().bool,items:h().array,value:qn.allPropTypes(h().oneOfType([h().string,h().number,h().bool]),(e,t,s)=>{const n=e[t],i=e.items;if(null!==n&&i.length>0&&i.every(e=>e.value!==n))return new Error(`Invalid prop ${t} passed to ${s}. Expected the value ${n} in items.`)}),disabled:h().bool,onChange:h().func};const In=(0,P.CI)("common")(_n);class Pn extends n.Component{constructor(e){super(e),this.state=this.defaultState,this.bindHandlers()}componentDidMount(){this.initLocale()}componentDidUpdate(e){this.handleLocaleChange(e.context.locale)}handleLocaleChange(e){this.props.context.locale!==e&&this.setState({locale:this.props.context.locale})}get defaultState(){return{loading:!0,locale:null,processing:!1}}get areActionsAllowed(){return!this.state.processing}bindHandlers(){this.handleLocaleInputChange=this.handleLocaleInputChange.bind(this)}async handleLocaleInputChange(e){const t=e.target.value;this.updateLocale(t)}async updateLocale(e){this.setState({processing:!0}),await this.props.context.onUpdateLocaleRequested(e),this.setState({processing:!1})}initLocale(){this.setState({locale:this.props.context.locale,loading:!1})}isLoading(){return this.state.loading}get supportedLocales(){return this.props.context.siteSettings.supportedLocales?this.props.context.siteSettings.supportedLocales.map(e=>({value:e.locale,label:e.label})):[]}render(){return n.createElement(n.Fragment,null,!this.isLoading()&&n.createElement("div",{className:"select-wrapper input"},n.createElement(In,{id:"user-locale-input",className:"setup-extension",name:"locale",value:this.state.locale,disabled:!this.areActionsAllowed,items:this.supportedLocales,onChange:this.handleLocaleInputChange})))}}Pn.propTypes={context:h().any};const Dn=o(Pn);class Un extends n.Component{get statesToHideLocaleSwitch(){return[O.INITIAL_STATE]}get mustDisplayLocaleSwitch(){return!this.statesToHideLocaleSwitch.includes(this.props.apiRecoverContext.state)}render(){return n.createElement(n.Fragment,null,this.mustDisplayLocaleSwitch&&n.createElement(Dn,null))}}Un.propTypes={apiRecoverContext:h().any};const Gn=k(Un);var Ln,Mn,Fn,$n,jn;function Vn(){return Vn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)({}).hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e},Vn.apply(null,arguments)}const Kn=function(e){return n.createElement("svg",Vn({xmlns:"http://www.w3.org/2000/svg",width:151,height:27,fill:"none","aria-labelledby":"logo-title logo-description",viewBox:"0 0 151 27"},e),Ln||(Ln=n.createElement("title",{id:"logo-title"},"Passbolt logo")),Mn||(Mn=n.createElement("desc",{id:"logo-description"},"This is the logo of passbolt.")),Fn||(Fn=n.createElement("path",{fill:"var(--icon-color)",d:"M4.648 9.234v8.607h2.48c1.646 0 2.786-.349 3.47-1.012.685-.664 1.013-1.823 1.013-3.395 0-1.52-.305-2.595-.938-3.218-.633-.673-1.695-.972-3.24-.972zM.597 5.963h7.797c2.357 0 4.178.676 5.496 2.048q1.976 2.058 1.974 5.689a8.6 8.6 0 0 1-.406 2.749 7.1 7.1 0 0 1-1.24 2.278 5.9 5.9 0 0 1-2.38 1.773c-.937.349-2.152.524-3.697.524H4.648V26.5H.597zM24.016 18.016h5.064v-3.119h-4.76c-.937 0-1.594.124-1.95.375-.357.25-.517.698-.517 1.321 0 .524.15.899.429 1.122.28.223.848.301 1.734.301M18.649 5.963h8.268c2.103 0 3.672.476 4.736 1.423 1.065.947 1.594 2.347 1.594 4.217v9.456H22.37c-1.52 0-2.708-.375-3.52-1.121-.81-.747-1.2-1.823-1.2-3.22 0-1.722.454-2.945 1.392-3.692s2.483-1.134 4.697-1.134h5.315v-.365c0-.898-.276-1.518-.809-1.896-.532-.377-1.47-.55-2.86-.55H18.65zM36.55 17.915h8.525c.76 0 1.318-.124 1.646-.35.183-.122.328-.29.423-.486.094-.197.134-.414.115-.63a1.2 1.2 0 0 0-.112-.632 1.24 1.24 0 0 0-.42-.492c-.355-.253-.91-.374-1.646-.374h-3.494c-2.067 0-3.467-.325-4.203-.947-.737-.623-1.088-1.747-1.088-3.32 0-1.62.431-2.82 1.318-3.592.886-.772 2.255-1.152 4.064-1.152h8.684v3.142h-7.134q-1.75 0-2.279.301c-.354.198-.532.547-.532 1.071-.017.193.016.387.096.564s.204.332.361.449c.302.223.809.324 1.468.324h3.676c1.672 0 2.961.397 3.824 1.172s1.315 1.871 1.315 3.32c0 1.397-.405 2.53-1.188 3.417-.37.427-.833.768-1.354.996-.522.23-1.09.34-1.661.325H36.549zM53.822 17.915h8.526c.76 0 1.318-.124 1.646-.35a1.23 1.23 0 0 0 .42-.487c.093-.196.132-.413.112-.629a1.2 1.2 0 0 0-.111-.632 1.24 1.24 0 0 0-.421-.492c-.354-.253-.91-.374-1.646-.374h-3.493c-2.067 0-3.467-.325-4.204-.947-.736-.623-1.088-1.752-1.088-3.324 0-1.62.432-2.82 1.318-3.593.886-.772 2.253-1.147 4.075-1.147h8.686v3.142h-7.141q-1.747 0-2.28.301c-.353.198-.531.547-.531 1.071-.017.193.016.387.096.564s.204.332.361.449c.302.223.809.324 1.468.324h3.671c1.672 0 2.963.397 3.824 1.172s1.315 1.871 1.315 3.32c0 1.397-.403 2.53-1.188 3.417-.37.427-.832.767-1.354.996a3.9 3.9 0 0 1-1.66.325H53.769v-3.106zM75.387.5v5.463h3.47c1.55 0 2.759.175 3.694.55.946.362 1.77.976 2.38 1.772a7.2 7.2 0 0 1 1.243 2.296c.281.888.417 1.814.403 2.744q0 3.63-1.974 5.689c-1.315 1.372-3.14 2.046-5.493 2.046h-7.8V.5zm2.462 8.734h-2.483v8.608h2.785c1.55 0 2.633-.324 3.243-.95s.935-1.721.935-3.268-.354-2.694-1.033-3.367c-.68-.673-1.832-1.023-3.447-1.023M92.3 13.525c0 1.445.328 2.532 1.013 3.367s1.62 1.198 2.86 1.198 2.152-.398 2.863-1.198 1.033-1.921 1.033-3.367-.356-2.547-1.033-3.344c-.677-.798-1.62-1.198-2.863-1.198a3.64 3.64 0 0 0-1.57.279 3.6 3.6 0 0 0-1.29.919c-.685.797-1.013 1.921-1.013 3.344m12.002 0q0 3.544-2.202 5.689c-1.47 1.397-3.42 2.121-5.901 2.121s-4.457-.699-5.924-2.121-2.202-3.292-2.202-5.664q0-3.558 2.202-5.69c1.467-1.424 3.444-2.145 5.919-2.145s4.431.724 5.901 2.144 2.207 3.294 2.207 5.666M110.935 21.06h-4.202V.5h4.202zM112.884 5.963h2.86V.5h4.052v5.463h4.278v3.02h-4.278v6.09c0 1.12.204 1.895.581 2.343.377.449 1.064.649 2.026.649h1.671v3.02h-3.72c-1.494 0-2.636-.4-3.444-1.223-.809-.823-1.189-1.995-1.189-3.519v-7.36h-2.863v-3.02z"})),$n||($n=n.createElement("path",{fill:"#D40101",d:"m149.951 10.68-9.059-8.36a2.12 2.12 0 0 0-1.421-.543c-.526 0-1.033.194-1.421.544l-5.684 5.268c.745.271 1.414.71 1.952 1.282.539.572.933 1.26 1.149 2.01h7.673a.73.73 0 0 1 .504.204.69.69 0 0 1 .207.494v1.147a.68.68 0 0 1-.207.494.72.72 0 0 1-.504.204h-.886v1.623a.68.68 0 0 1-.205.494.72.72 0 0 1-.503.205h-1.945a.73.73 0 0 1-.503-.205.69.69 0 0 1-.205-.494v-1.623h-3.426a4.84 4.84 0 0 1-1.135 2.033 5 5 0 0 1-1.966 1.287l5.71 5.276c.388.349.895.543 1.421.543a2.12 2.12 0 0 0 1.421-.543l9.043-8.355a2.03 2.03 0 0 0-.01-2.985"})),jn||(jn=n.createElement("path",{fill:"#D40101",d:"M130.683 9.867a2.6 2.6 0 0 0-1.064.253c-.371.18-.686.455-.913.794a2.242 2.242 0 0 0-.113 2.305 2.3 2.3 0 0 0 .831.877 2.36 2.36 0 0 0 2.355.059c.362-.197.664-.484.875-.833a2.24 2.24 0 0 0 .324-1.153 2.21 2.21 0 0 0-.653-1.625 2.3 2.3 0 0 0-.751-.5 2.3 2.3 0 0 0-.891-.177"})))};class Bn extends n.Component{constructor(e){super(e),this.state=this.defaultState,this.userId=null,this.token=null,this.initializeProperties()}get defaultState(){return{siteSettings:null,trustedDomain:this.baseUrl,getApiClientOptions:this.getApiClientOptions.bind(this),locale:null,onUpdateLocaleRequested:this.onUpdateLocaleRequested.bind(this)}}async componentDidMount(){const e=await this.getSiteSettings();this.initLocale(e)}initializeProperties(){const e="[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[0-5][a-fA-F0-9]{3}-[089aAbB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}",t=new RegExp(`(setup/recover|setup/recover/start)/(${e})/(${e})$`),s=window.location.pathname.match(t);s?(this.userId=s[2],this.token=s[3]):console.error("Unable to retrieve the user id and token from the url")}get baseUrl(){const e=document.getElementsByTagName("base")&&document.getElementsByTagName("base")[0];return e?e.attributes.href.value.replace(/\/*$/g,""):(console.error("Unable to retrieve the page base tag"),"")}getApiClientOptions(){return(new pt).setBaseUrl(this.state.trustedDomain)}async getSiteSettings(){const e=this.getApiClientOptions().setResourceName("settings"),t=new b(e),{body:s}=await t.findAll(),n=new Sn(s);return this.setState({siteSettings:n}),n}initLocale(e){const t=this.getUrlLocale(e)||this.getBrowserLocale(e)||this.getBrowserSimilarLocale(e)||e.locale;this.setState({locale:t})}getUrlLocale(e){const t=new URL(window.location.href).searchParams.get("locale");if(t){const s=e.supportedLocales.find(e=>t===e.locale);if(s)return s.locale}}getBrowserLocale(e){const t=e.supportedLocales.find(e=>navigator.language===e.locale);if(t)return t.locale}getBrowserSimilarLocale(e){const t=navigator.language.split("-")[0],s=e.supportedLocales.find(e=>t===e.locale.split("-")[0]);if(s)return s.locale}onUpdateLocaleRequested(e){this.setState({locale:e}),this.setUrlLocale(e)}setUrlLocale(e){const t=new URL(window.location.href);t.searchParams.set("locale",e),window.history.replaceState(null,null,t)}isReady(){return null!==this.state.siteSettings&&null!==this.state.locale}render(){return n.createElement(l.Provider,{value:this.state},this.isReady()&&n.createElement(Rn,{loadingPath:`${this.state.trustedDomain}/locales/{{lng}}/{{ns}}.json`},n.createElement(N,{value:{userId:this.userId,token:this.token}},n.createElement("div",{id:"container",className:"container page login"},n.createElement("div",{className:"content"},n.createElement("div",{className:"header"},n.createElement("div",{className:"logo-svg"},n.createElement(Kn,{role:"img",width:"20rem",height:"3.5rem"}))),n.createElement("div",{className:"login-form"},n.createElement(dt,null)),n.createElement(Gn,null)),n.createElement(gn,null)))))}}const zn=Bn,Hn=document.createElement("div");document.body.appendChild(Hn),(0,i.H)(Hn).render(n.createElement(zn,null))}},s={};function n(e){var i=s[e];if(void 0!==i)return i.exports;var r=s[e]={exports:{}};return t[e].call(r.exports,r,r.exports,n),r.exports}n.m=t,e=[],n.O=(t,s,i,r)=>{if(!s){var a=1/0;for(h=0;h<e.length;h++){for(var[s,i,r]=e[h],o=!0,l=0;l<s.length;l++)(!1&r||a>=r)&&Object.keys(n.O).every(e=>n.O[e](s[l]))?s.splice(l--,1):(o=!1,r<a&&(a=r));if(o){e.splice(h--,1);var c=i();void 0!==c&&(t=c)}}return t}r=r||0;for(var h=e.length;h>0&&e[h-1][2]>r;h--)e[h]=e[h-1];e[h]=[s,i,r]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var s in t)n.o(t,s)&&!n.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.j=478,n.dn=e=>{(Object.getOwnPropertyDescriptor(e,"name")||{}).writable||Object.defineProperty(e,"name",{value:"default",configurable:!0})},(()=>{var e={478:0};n.O.j=t=>0===e[t];var t=(t,s)=>{var i,r,[a,o,l]=s,c=0;if(a.some(t=>0!==e[t])){for(i in o)n.o(o,i)&&(n.m[i]=o[i]);if(l)var h=l(n)}for(t&&t(s);c<a.length;c++)r=a[c],n.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return n.O(h)},s=self.webpackChunkpassbolt_styleguide=self.webpackChunkpassbolt_styleguide||[];s.forEach(t.bind(null,0)),s.push=t.bind(null,s.push.bind(s))})();var i=n.O(void 0,[847],()=>n(3062));i=n.O(i)})();
|