1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`dba9f07f8e2fed71d38f1f113b2db58a9662d92c`},e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:indy-client":!0});var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`ba4a8b4c-905f-4722-b2a7-a7a4cda44ebb`,e._sentryDebugIdIdentifier=`sentry-dbid-ba4a8b4c-905f-4722-b2a7-a7a4cda44ebb`)}catch{}})();import{a as e,t}from"./rolldown-runtime-CyWjlWnJ.js";import{St as n,k as r}from"./dist-BPTuY21I.js";import{a as i,r as a}from"./vendor-date-CpTTLpbH.js";import"./dist-CmA1JBXq.js";import{It as o,Wt as s}from"./dist-D-vwYQ-p.js";import{t as c}from"./_baseAssignValue-DK3YHBYO.js";import{t as l}from"./_baseForOwn-_kl3omlS.js";import{t as u}from"./_baseIteratee-CgDjIYe-.js";import{t as d}from"./mapValues-BlMbOAMw.js";import{t as f}from"./omit-ZzJhb8ej.js";import{n as p}from"./utils-TiKUH0Vf.js";import{a as m,i as ee,n as te}from"./storage-CilIen1P.js";import{r as ne}from"./client.models-D84AlaZp.js";import{t as re}from"./isEqual-D0gyZw4R.js";import{t as ie}from"./trim-BFz5TxyA.js";var h={REGISTERED_AT_INDY:`REGISTERED_AT_INDY`,REGISTERED_AT_INDY_NOT_IN_FRENCH_DIRECTORY:`REGISTERED_AT_INDY_NOT_IN_FRENCH_DIRECTORY`,REGISTERED_AT_INDY_PENDING_FRENCH_DIRECTORY_REGISTRATION:`REGISTERED_AT_INDY_PENDING_FRENCH_DIRECTORY_REGISTRATION`,REGISTERED_AT_INDY_TECHNICAL_ERROR:`REGISTERED_AT_INDY_TECHNICAL_ERROR`,REGISTERED_AT_INDY_WITH_CONFLICT:`REGISTERED_AT_INDY_WITH_CONFLICT`,PENDING_REGISTRATION:`PENDING_REGISTRATION`,NOT_REGISTERED:`NOT_REGISTERED`,REGISTERED_AT_OTHER_ELECTRONIC_INVOICING_PLATFORM:`REGISTERED_AT_OTHER_ELECTRONIC_INVOICING_PLATFORM`,UNREGISTERED_FROM_INDY:`UNREGISTERED_FROM_INDY`,UNREGISTERING_FROM_INDY_WITH_PORTABILITY:`UNREGISTERING_FROM_INDY_WITH_PORTABILITY`},g={NO:`NO`,MAYBE:`MAYBE`,YES:`YES`},_=e(f(),1),v=e(re(),1),y={INVOICE:{value:`facturation.invoices`,title:`Factures de ventes`,label:`Factures de ventes`,to:{name:`facturation.invoices`}},QUOTATION:{value:`facturation.quotations`,title:`Devis`,label:`Devis`,to:{name:`facturation.quotations`}},CLIENT:{value:`facturation.clients`,title:`Clients`,label:`Clients`,to:{name:`facturation.clients`}},PRODUCT:{value:`facturation.products`,title:`Produits et services`,label:`Produits et services`,to:{name:`facturation.products`}},RECURRING_INVOICES:{value:`facturation.recurringInvoices`,title:`Factures récurrentes`,label:`Factures récurrentes`,to:{name:`facturation.recurringInvoices`},class:`facturation-recurring-invoices-nav`},MONTHLY_RETAIL_REPORT:{value:`facturation.monthlyRetailReport`,title:`Bilans mensuels`,label:`Bilans mensuels`,to:{name:`facturation.monthlyRetailReport`}}},b={ELECTRONIC_INVOICING_SUBSCRIPTION:{value:`facturation.electronicInvoicingSubscription`,title:`Factures électroniques`,label:`Factures électroniques`,to:{name:`facturation.electronicInvoicingSubscription`}},ELECTRONIC_INVOICE:{value:`facturation.electronicInvoices`,title:`Factures d'achats`,label:`Factures d'achats`,to:{name:`facturation.electronicInvoices`},badge:({inboundInvoicesUnseenCount:e})=>e>0}},x={...y,...b},S=Object.keys(y),C=Object.keys(b),w=[{key:`emission`,title:`Ãmission`,itemValues:Object.values(y).map(({value:e})=>e)},{key:`reception`,title:`Réception`,itemValues:Object.values(b).map(({value:e})=>e)}],T=[...Object.values(b).map(({to:e})=>e.name),`facturation.inboundElectronicInvoice`,`facturation.inboundElectronicInvoiceWithoutGroup`,`facturation.firstInboundElectronicInvoice`],E=e(ie(),1),D={EMAIL:{number:0},BUSINESS:{number:1,title:`Votre entreprise`},IDENTITY:{number:2,title:`Votre identité`},INSCRIPTION:{number:3,title:`Inscription`}},O=[`application/pdf`,`image/jpeg`,`image/png`],k=`sumsubKycReturn`,A=`indy-sumsub-kyc-return`,j=[`application/pdf`],M=[`application/pdf`],N=[`application/pdf`],P=[`application/pdf`],F={YOUSIGN:`yousign`,SUMSUB:`sumsub`};function I({isUserReregistering:e,reRegisteringStep:t,isOrganisationEmailVerified:n,isBusinessVerificationBlocked:r,isBusinessVerified:i,isIdentityVerified:a}){return n?e?t:r||!i?D.BUSINESS.number:a?D.INSCRIPTION.number:D.IDENTITY.number:D.EMAIL.number}function L({currentStep:e}){return Math.min(e+1,D.INSCRIPTION.number)}function R({lastDocumentSentAt:e}){if(e)return i.Instant.from(e)}function z({lastDocumentSentAt:e,now:t,cooldownSeconds:n}){if(!e)return 0;let r=(t.epochMilliseconds-e.epochMilliseconds)/1e3;return r>=n?0:Math.ceil(n-r)}var B=`fidal`,V=`FIDAL`;function H({utmSource:e,promocodeNames:t=[]}){return(e==null?void 0:e.toLowerCase())===B||t.some(e=>(e==null?void 0:e.toUpperCase().startsWith(V))===!0)}function ae({electronicInvoicingRegisteringStatus:e}){return e===h.REGISTERED_AT_INDY||e===h.REGISTERED_AT_INDY_NOT_IN_FRENCH_DIRECTORY||e===h.REGISTERED_AT_INDY_PENDING_FRENCH_DIRECTORY_REGISTRATION||e===h.REGISTERED_AT_INDY_TECHNICAL_ERROR||e===h.REGISTERED_AT_INDY_WITH_CONFLICT}function U({isOrganisationRegisteredAtIndyPlatform:e,hasReceivedInboundElectronicInvoices:t}){return e||t}function W({isOrganisationRegisteredAtIndyPlatform:e,hasReceivedInboundElectronicInvoices:t}){return!e&&t}function G({isOrganisationRegisteredAtIndyPlatform:e,isBannerEnabledForOrganisation:t}){return e&&t}function K({siret:e,companyInformation:t}){return e?t?t.isDiffusable?!t.firstname&&!t.name?{isCompanyEligibleForVerification:!1,reason:`no name for the legal representative`}:t.raisonSociale?{isCompanyEligibleForVerification:!0}
1:{isCompanyEligibleForVerification:!1,reason:`no company name`}:{isCompanyEligibleForVerification:!1,reason:`company information is not diffusable`}:{isCompanyEligibleForVerification:!1,reason:`no company information found`}:{isCompanyEligibleForVerification:!1,reason:`no siret`}}function q({companyInformation:e}){let{effectifMin:t}=e??{};return t!==void 0&&t>19}function J(e){let t=/^[(|)']$/u,n=/^[\p{L}\p{M}+]$/u,r=/^[-\p{L}\p{M}+.' ]$/u,i=[],a=0;t.test(e[0])&&(a=1);for(let t=a;t<e.length;t++){let o=e[t];t===a&&(n.test(o)||i.push(o)),r.test(o)||i.push(o)}return[...new Set(i)]}function Y(e){return e?r.test(e)?null:`invalid`:`empty`}function oe({firstName:e,birthName:t}){let n=(0,E.default)(e??``),r=(0,E.default)(t??``),i=Y(n),a=Y(r);return[i,a].filter(Boolean).length>=2?i===`empty`&&a===`empty`?`Plusieurs champs sont à remplir.`:`Plusieurs champs comportent une erreur.`:i===`empty`?`Le prénom est à remplir.`:a===`empty`?`Le nom de naissance est à remplir.`:i===`invalid`?`Le prénom comporte une erreur.`:a===`invalid`?`Le nom de naissance comporte une erreur.`:`Un ou plusieurs champs comportent une erreur.`}function se({legalRepresentatives:e,firstName:t,birthName:n}){return!t||!n?!1:(e??[]).some(e=>e.last_name.toLowerCase()===n.toLowerCase()&&e.first_name.toLowerCase()===t.toLowerCase())}function ce({isOrganisationInIndivision:e,businessVerifiedFrom:t}){return e&&t===s.INDIVISION_BYPASS}function le({sumsubRatio:e,normalizedHash:t,hasMultipleOrganisations:n,isInMobileWebView:r,shouldBypassSumsubKyc:i}){return n||r||i?F.YOUSIGN:t<e?F.SUMSUB:F.YOUSIGN}function ue(e,t){return new Promise(n=>{fetch(e).then(e=>{e.blob().then(e=>{n(new File([e],t,{type:e.type}))})})})}function de({file:e}){return new Promise((t,n)=>{let r=new FileReader;r.onerror=n,r.onload=()=>{let e=r.result,n=new Image;n.src=e,n.onload=function(){t(e)}},r.readAsDataURL(e)})}function fe({file:e,maxImageWidth:t,maxImageHeight:n}){return new Promise((r,i)=>{let a=new FileReader;a.onerror=i,a.onload=()=>{let e=a.result,o=new Image;o.src=e,o.onload=function(){let a=this.height,o=this.width;if(a>n||o>t){let e=Error(`Dimensions of the image are too large`);e.code=`DIMENSIONS_TOO_LARGE`,i(e)}r(e)}},a.readAsDataURL(e)})}function pe({invoice:e}){return e.origin===`INDY`?e.status===o.RECEIPTED?`Facture-${e.fullInvoiceNumber}-acquittee.pdf`:`Facture-${e.fullInvoiceNumber}.pdf`:e.origin===`IMPORTED`?`Facture-${e.fullInvoiceNumber}.pdf`:`Facture.pdf`}function X({organisationHasEnabledRetailFeature:e,organisationIsRegisteredOnIndyElectronicInvoicing:t,organisationHasAccessToEmission:n=!0,shouldShowReception:r=!0,inboundInvoicesUnseenCount:i=0,hasReceivedInboundElectronicInvoices:a=!1}){let o=[];return e||o.push(`MONTHLY_RETAIL_REPORT`),U({isOrganisationRegisteredAtIndyPlatform:t,hasReceivedInboundElectronicInvoices:a})?o.push(`ELECTRONIC_INVOICING_SUBSCRIPTION`):o.push(`ELECTRONIC_INVOICE`),n||o.push(...S),r||o.push(...C),Object.values((0,_.default)(x,...o)).map(({badge:e,...t})=>({...t,badge:(e==null?void 0:e({inboundInvoicesUnseenCount:i}))??!1}))}function me({organisationHasAccessToReception:e,organisationIsRegisteredOnIndyElectronicInvoicing:t,isReceptionPanelDismissed:n,hasReceivedInboundElectronicInvoices:r=!1}){return e&&(U({isOrganisationRegisteredAtIndyPlatform:t,hasReceivedInboundElectronicInvoices:r})||!n)}function he({organisationHasEnabledRetailFeature:e,organisationIsRegisteredOnIndyElectronicInvoicing:t,organisationHasAccessToEmission:n=!0,shouldShowReception:r=!0,inboundInvoicesUnseenCount:i=0,hasReceivedInboundElectronicInvoices:a=!1}){let o=X({organisationHasEnabledRetailFeature:e,organisationIsRegisteredOnIndyElectronicInvoicing:t,organisationHasAccessToEmission:n,shouldShowReception:r,inboundInvoicesUnseenCount:i,hasReceivedInboundElectronicInvoices:a});return w.map(({key:e,title:t,itemValues:n})=>({key:e,title:t,items:o.filter(e=>n.includes(e.value))})).filter(e=>e.items.length>0)}function Z({client:e,dates:t,search:n}){let{start:r,end:i}=t??{};return{...e&&{clientId:ne({client:e})},...r&&i&&{dates:`${a(r).format(`DD MMMM YYYY`)} ~ ${a(i).format(`DD MMMM YYYY`)}`},...n&&{search:n}}}function ge(e,t){return!(0,v.default)(t,e)}function _e({organisation:e}){var t;let n=e==null||(t=e.electronic_invoicing)==null?void 0:t.registering_statuses;return!!(n!=null&&n.find(e=>
1e.status===`COMPLETED`||e.status===`REGISTERED`))}function ve({organisation:e}){var t;return!!(e!=null&&(t=e.electronic_invoicing)!=null&&t.subscription_started_at)}var ye=e(t(((e,t)=>{var n=c(),r=l(),i=u();function a(e,t){var a={};return t=i(t,3),r(e,function(e,r,i){n(a,t(e,r,i),e)}),a}t.exports=a}))(),1),be=e(d(),1);function xe({organisation:e,bucketTests:t}){if(!t)return;let n=(0,ye.default)(t,e=>`ab_${e.key}_version`);return(0,be.default)(n,t=>$({currentOrganisation:e,bucketTest:t}))}function Se({currentOrganisation:e}){return{bucketTestingDiscriminant:(e==null?void 0:e.bucket_testing_discriminant)??(e==null?void 0:e._id)??Q(),forceBucketTestVersions:e==null?void 0:e.force_bucket_test_versions}}function Q(){let e=te(`indy_bucket_testing_discriminant`);if(e)return e;let t=p();return m(`indy_bucket_testing_discriminant`,t),t}function $({currentOrganisation:e,bucketTest:t}){try{return n({organisationBucketTestingConfig:Se({currentOrganisation:e}),bucketTest:t})}catch(e){console.error(e);return}}function Ce(){ee(`indy_bucket_testing_discriminant`)}export{G as A,k as B,q as C,K as D,ce as E,O as F,x as H,P as I,j as L,F as M,M as N,ae as O,D as P,N as R,J as S,se as T,g as U,T as V,h as W,le as _,ue as a,L as b,pe as c,ve as d,ge as f,U as g,fe as h,Ce as i,W as j,R as k,X as l,me as m,$ as n,de as o,_e as p,Q as r,Z as s,xe as t,he as u,z as v,H as w,I as x,oe as y,A as z}; 2//# sourceMappingURL=bucketTests-CcUKp0Kc.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.