@hublo/mstaff-client-sdk 0.2.7 → 0.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/main.cjs +1 -1
  2. package/dist/main.js +102 -101
  3. package/package.json +1 -1
package/dist/main.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";var ie=Object.defineProperty;var oe=(e,t,r)=>t in e?ie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var v=(e,t,r)=>(oe(e,typeof t!="symbol"?t+"":t,r),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("vue"),se=require("axios"),ae=require("pinia"),ce=require("@vueuse/core");var U={expireTimes:"1d",path:"; path=/",domain:"",secure:!1,sameSite:"; SameSite=Lax"},ue=function(){function e(){this.current_default_config=U}return e.prototype.config=function(t){for(var r in this.current_default_config)this.current_default_config[r]=t[r]?t[r]:U[r]},e.prototype.get=function(t){var r=decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(t).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null;if(r&&r.substring(0,1)==="{"&&r.substring(r.length-1,r.length)==="}")try{r=JSON.parse(r)}catch{return r}return r},e.prototype.set=function(t,r,n,i,c,d,p){if(t){if(/^(?:expires|max-age|path|domain|secure|SameSite)$/i.test(t))throw new Error('Cookie name illegality. Cannot be set to ["expires","max-age","path","domain","secure","SameSite"] current key name: '+t)}else throw new Error("Cookie name is not found in the first argument.");r&&r.constructor===Object&&(r=JSON.stringify(r));var u="";if(n==null&&(n=this.current_default_config.expireTimes?this.current_default_config.expireTimes:""),n&&n!=0)switch(n.constructor){case Number:n===1/0||n===-1?u="; expires=Fri, 31 Dec 9999 23:59:59 GMT":u="; max-age="+n;break;case String:if(/^(?:\d+(y|m|d|h|min|s))$/i.test(n)){var o=n.replace(/^(\d+)(?:y|m|d|h|min|s)$/i,"$1");switch(n.replace(/^(?:\d+)(y|m|d|h|min|s)$/i,"$1").toLowerCase()){case"m":u="; max-age="+ +o*2592e3;break;case"d":u="; max-age="+ +o*86400;break;case"h":u="; max-age="+ +o*3600;break;case"min":u="; max-age="+ +o*60;break;case"s":u="; max-age="+o;break;case"y":u="; max-age="+ +o*31104e3;break}}else u="; expires="+n;break;case Date:u="; expires="+n.toUTCString();break}return document.cookie=encodeURIComponent(t)+"="+encodeURIComponent(r)+u+(c?"; domain="+c:this.current_default_config.domain?this.current_default_config.domain:"")+(i?"; path="+i:this.current_default_config.path?this.current_default_config.path:"; path=/")+(d==null?this.current_default_config.secure?"; Secure":"":d?"; Secure":"")+(p==null?this.current_default_config.sameSite?"; SameSute="+this.current_default_config.sameSite:"":p?"; SameSite="+p:""),this},e.prototype.remove=function(t,r,n){return!t||!this.isKey(t)?!1:(document.cookie=encodeURIComponent(t)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT"+(n?"; domain="+n:this.current_default_config.domain?this.current_default_config.domain:"")+(r?"; path="+r:this.current_default_config.path?this.current_default_config.path:"; path=/")+"; SameSite=Lax",!0)},e.prototype.isKey=function(t){return new RegExp("(?:^|;\\s*)"+encodeURIComponent(t).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(document.cookie)},e.prototype.keys=function(){if(!document.cookie)return[];for(var t=document.cookie.replace(/((?:^|\s*;)[^\=]+)(?=;|$)|^\s*|\s*(?:\=[^;]*)?(?:\1|$)/g,"").split(/\s*(?:\=[^;]*)?;\s*/),r=0;r<t.length;r++)t[r]=decodeURIComponent(t[r]);return t},e}(),j=null;function le(){j==null&&(j=new ue);var e=T.reactive(j);return{cookies:e}}function de(){const{cookies:e}=le();function t(c){return e.get(c)}function r(c,d){return e.set(c,d)}function n(c){return e.remove(c)}function i(){e.keys().forEach(c=>n(c))}return{getItem:t,setItem:r,removeItem:n,clear:i}}let O=null;function M(e={auth:"token",refresh:"refresh_token",expiration:"token_expiration_date"},t=de()){if(O)return O;function r(){return t.getItem(e.auth)}function n(){return t.getItem(e.refresh)}function i(){return t.getItem(e.expiration)}function c(m,f){const h=s(m);if(!h.exp)throw new Error("Invalid JWT token.");t.setItem(e.auth,m),t.setItem(e.refresh,f),t.setItem(e.expiration,((h.exp-60)*1e3).toString())}function d(){t.removeItem(e.auth),t.removeItem(e.refresh),t.removeItem(e.expiration)}function p(){return u()&&!o()}function u(){return!!r()}function o(){const m=i();return m?new Date(m)<new Date:!0}function s(m){return JSON.parse(atob(m.split(".")[1]))}function l(){return t}return O={keys:e,getAuthToken:r,getRefreshToken:n,getExpiration:i,authenticate:c,clear:d,isAuthenticated:p,hasAuth:u,isExpired:o,getStorage:l},O}function me(e){let t={"Content-Type":"application/json"};e&&r(e);function r(h,b=!1){return t=b?h:{...t,...h},this}function n(){return t}function i(h,b){return t[h]=b,this}function c(h){return t[h]}function d(h){return t[h]&&delete t[h],this}function p(h){return i("Authorization","Bearer "+h),this}function u(){return d("Authorization"),this}function o(){return!!c("Authorization")}function s(){return i("Content-Type","multipart/form-data"),this}function l(){return i("Content-Type","application/json"),this}function m(){return c("Content-Type")==="multipart/form-data"}function f(){return c("Content-Type")==="application/json"}return{setHeaders:r,getHeaders:n,setHeader:i,getHeader:c,removeHeader:d,setAuthorization:p,removeAuthorization:u,hasAuthorization:o,setFormData:s,setJson:l,isFormData:m,isJson:f}}function fe(e){let t=null;e&&r(e);function r(i){if(i=i.toLowerCase(),!["get","post","put","patch","delete"].includes(i))throw new Error("Invalid method.");return t=i,this}function n(){return t}return{setMethod:r,getMethod:n}}function pe(e,t,r){let n=null;r&&i(r);function i(o){if(!["post","put","patch"].includes(e.getMethod()))throw new Error("Payload can only be set for POST, PUT and PATCH requests.");return o instanceof FormData?t.setFormData():d(o)&&(o=p(o),t.setFormData()),t.isFormData()&&e.getMethod()==="put"&&(e.setMethod("post"),o.append("_method","PUT")),n=o,this}function c(){return n}function d(o){for(const s in o){const l=o[s];if(u(l))return!0;if(typeof l=="object"&&d(l))return!0}return!1}function p(o,s=null,l=0){const m=!s;m&&(s=new FormData);for(const f in o){const h=o[f];u(h)?(o[f]="<<FileIndex:"+l+">>",s.append(l,h,h.name),l++):typeof h=="object"&&(o[f]=p(o[f],s,l))}return m?(s.append("payload",JSON.stringify(o)),s):o}function u(o){return typeof File<"u"&&o instanceof File||typeof Blob<"u"&&o instanceof Blob}return{setPayload:i,getPayload:c}}const P=class P{constructor(t={}){v(this,"level",3);v(this,"logger");v(this,"prefix");this.logger=t.logger||console,this.prefix=t.prefix||""}setLevel(t){this.level=t}debug(...t){this.level<=P.LEVEL_DEBUG&&D(this.logger.debug,this.prefix,t)}info(...t){this.level<=P.LEVEL_INFO&&D(this.logger.info,this.prefix,t)}warn(...t){this.level<=P.LEVEL_WARN&&D(this.logger.warn,this.prefix,t)}error(...t){this.level<=P.LEVEL_ERROR&&D(this.logger.error,this.prefix,t)}};v(P,"LEVEL_DEBUG",0),v(P,"LEVEL_INFO",1),v(P,"LEVEL_WARN",2),v(P,"LEVEL_ERROR",3),v(P,"LEVEL_OFF",4);let x=P;const D=(e,t,r)=>{t?e(t,...r):e(...r)},$=new x({prefix:"[SDK]"});let G=null,K=null,J=null,W="/",Z=null;const he=()=>G,ye=e=>{if($.info("[Config] Environment:",e),!e)throw new Error("Invalid environment.");G=e},ge=()=>K,be=e=>{if($.info("[Config] API Host:",e),!e)throw new Error("Invalid API host.");K=e},we=()=>Z,Re=e=>{Z=e},Ae=()=>J,Pe=e=>{if($.info("[Config] Main App Host:",e),!e)throw new Error("Invalid main app host.");J=e},Ie=e=>{$.info("[Config] Base Assets Urls:",e),W=e},ve=()=>W,k={getEnvironment:he,getApiHost:ge,getErrorHandler:we,setEnvironment:ye,setApiHost:be,setErrorHandler:Re,getMainAppHost:Ae,setMainAppHost:Pe,setBaseAssetsUrl:Ie,getBaseAssetsUrl:ve};function Ee(e){const t=k.getApiHost().replace(/\/$/g,"");let r=null,n={},i={};e&&p(e);function c(){return t+u()+f()}function d(){return u(!0,!0)}function p(a){return r="/"+a.replace(/^\//g,""),this}function u(a=!0,R=!1){return a?r.replace(/:(\w+)/g,(A,E)=>R?"*":i[E]||":"+E):r}function o(a){return n=a,this}function s(a,R){return n[a]=R,this}function l(a){return n[a]&&delete n[a],this}function m(){return Object.keys(n).length>0}function f(a=!0){if(!m())return"";let R="";for(const A in n)if(Array.isArray(n[A]))for(const E of n[A])R+=(R.length?"&":"")+`${A}[]=`+E;else R+=(R.length?"&":"")+A+"="+n[A];return(a?"?":"")+R}function h(a){return i=a,this}function b(a,R){return i[a]=R,this}function C(a){return i[a]&&delete i[a],this}return{setPath:p,getPath:u,getUri:c,getMockUri:d,setQueryParams:o,setQueryParam:s,removeQueryParam:l,hasQuery:m,getQueryString:f,setRouteParams:h,setRouteParam:b,removeRouteParam:C}}function Se(e){let t=[];function r(){return t=o(arguments),d(),this}function n(){return t.length>0}function i(s){return t.includes(s.trim())?this:(t.push(s.trim()),d(),this)}function c(s){const l=t.indexOf(s.trim());return l===-1?this:(t.splice(l,1),d(),this)}function d(){t.length?e.setQueryParam("groups",u(t)):e.removeQueryParam("groups")}function p(s){return s.split(",").map(l=>l.trim())}function u(s){return s.join(",")}function o(s){let l=[];return s.length===1?typeof s[0]=="string"?l=p(s[0]):Array.isArray(s[0])&&(l=s[0]):l=Array.from(s),l}return{setGroups:r,hasGroups:n,addGroup:i,removeGroup:c}}function Ce(e){let t=!1,r=!1,n=1,i=10;function c(){return t=!0,d(),this}function d(){r=!0;const f=m(arguments);return o(f.page||1,!1),s(f.perPage||i,!1),l(),this}function p(){return r=!1,l(),this}function u(){return r}function o(f,h=!0){return t=!0,r=!0,n=f,h&&l(),this}function s(f,h=!0){return t=!0,r=!0,i=f,h&&l(),this}function l(){t?u()?(e.removeQueryParam("pagination"),e.setQueryParam("page",n),e.setQueryParam("nbResultPerPage",i)):(e.removeQueryParam("page"),e.removeQueryParam("nbResultPerPage"),e.setQueryParam("pagination","false")):(e.removeQueryParam("page"),e.removeQueryParam("nbResultPerPage"),e.removeQueryParam("pagination"))}function m(f){if(f.length===1&&typeof f[0]=="object")return f[0];const h={};return f.length>=1&&(h.page=f[0]),f.length>=2&&(h.perPage=f[1]),h}return{isList:c,paginate:d,disablePagination:p,hasPagination:u,setPage:o,setPerPage:s}}function ke(e){let t=!1,r="id",n="ASC";function i(){t=!0;const s=o(arguments);return s.orderBy&&d(s.orderBy,!1),s.orderDir&&p(s.orderDir,!1),u(),this}function c(){return t}function d(s,l=!0){return t=!0,r=s,l&&u(),this}function p(s,l=!0){if(s=s.toUpperCase(),["ASC","DESC"].indexOf(s)===-1)throw new Error("Invalid order direction");return t=!0,n=s,l&&u(),this}function u(){c()&&(e.setQueryParam("orderBy",r),e.setQueryParam("orderDirection",n))}function o(s){if(s.length===1&&typeof s[0]=="object")return s[0];const l={};return s.length>=1&&(l.orderBy=s[0]),s.length>=2&&(l.orderDir=s[1]),l}return{setOrder:i,hasOrder:c,setOrderBy:d,setOrderDir:p}}function $e(){let e=!1;function t(){return e=!0,this}function r(){return e}return{setSilent:t,isSilent:r}}function Le(){let e="json";function t(n="json"){if(["arraybuffer","document","json","text","stream","blob"].indexOf(n)===-1)throw new Error("Invalid response type");return e=n,this}function r(){return e}return{setResponseType:t,getResponseType:r}}function Me(e){function t(){return e}function r(){return e.data}function n(){return e.data}return{getResponse:t,getData:r,getPayload:n}}function Oe(e,t=!1){let r=!1,n=!1;return e.response?(r=!0,n=!0):e.request&&(r=!0),!t&&k.getErrorHandler()&&k.getErrorHandler()(e),{sent:r,responded:n,error:e}}function De(e){function t(){return e}function r(){return e.data}function n(){return e.data}function i(){return e.data["@type"]==="hydra:Collection"}function c(){return i()?e.data["hydra:member"]:null}function d(){return i()?e.data["hydra:totalItems"]:null}function p(){return i()?e.data["hydra:view"]&&e.data["hydra:view"]["hydra:last"]:!1}function u(){return!i()||!p()?null:parseInt(e.data["hydra:view"]["@id"].match(/page=(\d+)/)[1])}function o(){return!i()||!p()?null:parseInt(e.data["hydra:view"]["hydra:last"].match(/page=(\d+)/)[1])}return{getResponse:t,getData:r,getPayload:n,isCollection:i,getCollection:c,getTotal:d,hasPagination:p,getPage:u,getPages:o}}function _e(e,t,r,n,i,c){async function d(){const u=r.getMethod(),o=t.getUri(),s=e.getHeaders(),l=n.getPayload(),m=[o];["post","put","patch"].includes(u)&&m.push(l||{}),m.push({headers:s,responseType:c.getResponseType()}),$.info("[Request] Sending request:",`[${u.toUpperCase()}]`,o);try{const f=await se[u](...m);return p(f)}catch(f){throw Oe(f,i.isSilent())}}function p(u){if(u.headers){const o=Object.keys(u.headers),s=o.map(l=>l.toLowerCase()).indexOf("content-type");if(s!==-1&&u.headers[o[s]].includes("application/ld+json"))return De(u)}return Me(u)}return{send:d}}function w(e,t="get",r=null){const n=me(),i=Ee(e),c=fe(t),d=pe(c,n,r),p=Se(i),u=Ce(i),o=ke(i),s=$e(),l=Le(),m=_e(n,i,c,d,s,l);return{...n,...i,...c,...d,...p,...u,...o,...s,...l,...m}}function y(e,t="get",r=null){const n=w(e,t,r),i=M();i.isAuthenticated()&&n.setAuthorization(i.getAuthToken());const c=n.send;return n.send=async function(){if(!n.hasAuthorization())throw new Error("::SDK Request:: Request cannot be sent, missing authorization header.");return c()},n}const Te=(e,t)=>y("/v2/activity/candidate/:candidateId/establishment/:establishmentId").setRouteParams({candidateId:e,establishmentId:t}),xe=()=>({listByCandidateAndEstablishment:Te}),je=(e,t,r)=>y("/candidate/:candidateId/share/establishment/:establishmentId").setMethod("post").setRouteParams({candidateId:e,establishmentId:t}).setPayload(r),Ne=(e,t)=>y("/candidate/:candidateId/archive/establishment/:establishmentId").setRouteParams({candidateId:e,establishmentId:t}),ze=(e,t)=>y("/candidate/:candidateId/archive/establishment/:establishmentId").setMethod("post").setRouteParams({candidateId:e,establishmentId:t}),Fe=(e,t)=>y("/candidate/:candidateId/archive/establishment/:establishmentId").setMethod("delete").setRouteParams({candidateId:e,establishmentId:t}),qe=()=>({share:je,isArchived:Ne,archive:ze,unarchive:Fe}),Be=(e,t)=>y("/comment/establishment/:establishmentId/candidate/:userId").setRouteParams({establishmentId:e,userId:t}),Ue=(e,t,r)=>y("/comment/establishment/:establishmentId/candidate/:userId").setRouteParams({establishmentId:e,userId:t}).setMethod("post").setPayload(r),He=(e,t)=>y("/comment/:commentId").setRouteParams({commentId:e}).setMethod("put").setPayload(t),Ve=e=>y("/comment/:commentId").setRouteParams({commentId:e}).setMethod("delete"),Qe=()=>({getForEstablishmentCandidate:Be,postForEstablishmentCandidate:Ue,update:He,remove:Ve}),Ge=()=>w("contractType").isList().addGroup("Term:id").addGroup("Term:name"),Ke=()=>({list:Ge}),Je=e=>y("/v2/talents").isList().setQueryParam("establishment-id",e),We=()=>({list:Je}),Ze=(e,t,r)=>y("/cvtheque/establishment/:establishmentId/candidate/:candidateId/label/synchronize").setRouteParams({establishmentId:e,candidateId:t}).setMethod("post").setPayload(r),Xe=()=>({syncCandidateLabels:Ze}),Ye=()=>w("diploma").isList().addGroup("Term:id").addGroup("Term:name"),et=()=>({list:Ye}),tt=e=>y("document/candidate/:candidateId").setRouteParams({candidateId:e}).isList().disablePagination(),nt=(e,t)=>y("document/candidate/:candidateId/establishment/:establishmentId/recruiter").setRouteParams({candidateId:e,establishmentId:t}).isList().disablePagination(),rt=(e,t)=>y("document/candidate/:candidateId/establishment/:establishmentId/candidate").setRouteParams({candidateId:e,establishmentId:t}).isList().disablePagination(),it=e=>y("document/recruiter").setMethod("post").setPayload(e),ot=e=>y("document/:documentId").setRouteParams({documentId:e}).setMethod("delete"),st=()=>({listByCandidate:tt,listByCandidateAndEstablishmentFromRecruiter:nt,listByCandidateAndEstablishmentFromCandidate:rt,addFromRecruiter:it,remove:ot}),at=(e,t)=>y("/v2/establishments/:establishmentId/email-history").setRouteParams({establishmentId:t}).setQueryParam("receiverId",e).isList().disablePagination(),ct=()=>({listByCandidateAndEstablishment:at}),ut=(e,t)=>y("/email/candidate/:candidateId").setMethod("post").setRouteParams({candidateId:e}).setPayload(t),lt=(e,t)=>y("/v2/emails/send").setMethod("post").setFormData().setPayload({recipientIds:e,...t}),dt=()=>({sendToCandidate:ut,sendToRecipients:lt}),mt=(e,t=!0)=>{const r=y("/v2/establishments/:establishmentId/email-templates").setRouteParams({establishmentId:e}).isList().disablePagination();return t&&r.setQueryParam("global",!0),r},ft=()=>y("/v2/self/email-templates").isList().disablePagination(),pt=()=>({listByEstablishment:mt,listSelf:ft}),ht=(e,t)=>y("establishment-career/:establishmentId/:versionId").setRouteParams({establishmentId:e,versionId:t}),yt=(e,t="published")=>y("establishment-career/:establishmentId/state/:state").setRouteParams({establishmentId:e,state:t}),gt=(e,t,r=null)=>{const n=r!==null?y("establishment-career/:establishmentId/:versionId").setRouteParams({establishmentId:e,versionId:r}):y("establishment-career/:establishmentId").setRouteParams({establishmentId:e});return n.setMethod("post").setPayload(t),n},bt=(e,t)=>y("establishment-career/:establishmentId/logo-banner").setMethod("post").setRouteParams({establishmentId:e}).setPayload(t),wt=(e,t,r)=>y("establishment-career/:establishmentId/publish/:versionId").setMethod("post").setRouteParams({establishmentId:e,versionId:t}).setPayload(r),Rt=()=>({readById:ht,readByState:yt,upsert:gt,uploadLogoAndBanner:bt,publish:wt}),At=e=>w("establishment/:establishmentId").setRouteParams({establishmentId:e}),Pt=e=>y("establishment/:establishmentId/authorizations").setRouteParams({establishmentId:e}),F=()=>({read:At,authorizations:Pt}),It=e=>w("feature-flag/maintenance").setMethod("post").setPayload(e),vt=(e,t)=>w("feature-flag/establishment").setMethod("post").setPayload({establishment:e,flagName:t}),Et=()=>({maintenanceModeEnabled:It,forEstablishment:vt}),St=()=>w("job").isList().addGroup("Term:id").addGroup("Term:name"),Ct=()=>({list:St}),kt=e=>y("/label/establishment/:establishmentId").isList().setRouteParams({establishmentId:e}),$t=(e,t)=>y("/label/establishment/:establishmentId").setMethod("post").setRouteParams({establishmentId:e}).setPayload(t),Lt=(e,t)=>y("/label/:labelId").setMethod("put").setRouteParams({labelId:e}).setPayload(t),Mt=e=>y("/label/:labelId").setMethod("delete").setRouteParams({labelId:e}),Ot=(e,t,r)=>y("/label/establishment/:establishmentId/candidate/:candidateId/synchronize").setMethod("post").setPayload(r).setRouteParams({establishmentId:e,candidateId:t}),Dt=()=>({listByEstablishment:kt,addToEstablishment:$t,update:Lt,remove:Mt,syncForCandidate:Ot}),_t=e=>w("offer/:offerId").setRouteParams({offerId:e}),Tt=()=>({read:_t}),xt=(e,t=!1)=>{const r=y("/recruiter/establishment/:establishmentId").isList().setRouteParams({establishmentId:e});return t&&r.setQueryParam("exclude-me",1),r},jt=()=>({listByEstablishment:xt}),Nt=e=>y("/recruitment/establishment/:establishmentId/mine").isList().setRouteParams({establishmentId:e}),zt=(e,t)=>y("/recruitment/mine/establishment/:establishmentId/has-not/candidate/:candidateId").isList().setRouteParams({establishmentId:e,candidateId:t}),Ft=(e,t)=>y("/recruitment/mine/establishment/:establishmentId/has/candidate/:candidateId").isList().setRouteParams({establishmentId:e,candidateId:t}),qt=(e,t)=>y("/recruitment/establishment/:establishmentId/has/candidate/:candidateId").isList().setRouteParams({establishmentId:e,candidateId:t}),Bt=(e,t)=>y("/recruitment/:recruitmentId/candidate").setMethod("put").setRouteParams({recruitmentId:e}).setPayload(t),Ut=(e,t)=>y("/recruitment/:recruitmentId/candidate/:candidateId").setMethod("delete").setRouteParams({recruitmentId:e,candidateId:t}),Ht=()=>({mineByEstablishment:Nt,mineWithoutCandidate:zt,mineWithCandidate:Ft,withCandidate:qt,addCandidates:Bt,removeCandidate:Ut}),Vt=(e,t,r,n=null)=>{const i=w("candidate/register/open").setMethod("post"),c={email:e};return t==="establishment"&&(c.establishmentId=r),t==="offer"&&(c.offerId=r),n&&(c.referer=n),i.setPayload(c),i},Qt=(e,t)=>w("candidate/register/update/:token").setMethod("post").setRouteParams({token:e}).setPayload(t),Gt=e=>w("candidate/register/read/:token").setRouteParams({token:e}),Kt=e=>w("candidate/register/close/:token").setMethod("post").setRouteParams({token:e}),Jt=()=>({open:Vt,update:Qt,read:Gt,close:Kt}),Wt=()=>w("speciality").isList().addGroup("Term:id").addGroup("Term:name"),Zt=()=>({list:Wt}),Xt=e=>y("/tag/public/establishment/:establishmentId").isList().setRouteParams({establishmentId:e}),Yt=()=>({listByEstablishment:Xt}),en=e=>w("user/email/isset/:email").setRouteParams({email:e}),tn=()=>y("user/self").addGroup("user:self"),nn=e=>y("/user/:uuid").setRouteParams({uuid:e}),rn=e=>w("/user/:uuid").setRouteParams({uuid:e}),q=()=>({emailExists:en,self:tn,byUuidPrivate:nn,byUuid:rn});let _;function X(){if(_)return _;const e={user:void 0,roles:[],establishments:{}},t=async()=>{if(!M().isAuthenticated())throw new Error("::SDK Authorization:: User not authenticated");const o=(await q().self().send()).getData();e.user={id:o.id,email:o.email,firstName:o.firstName,lastName:o.lastName,avatar:o.avatar},e.roles=o.roles},r=async o=>{if(!M().isAuthenticated())throw new Error("::SDK Authorization:: User not authenticated");e.establishments[o]=(await F().authorizations(o).send()).getData()},n=o=>{if(e.user===void 0)throw new Error("::SDK Authorization:: User not fetched");return e.roles.includes(o)};return _={fetchSelf:t,fetchPermission:r,hasRole:n,hasRoleRH:()=>n("ROLE_RH"),hasRoleCandidate:()=>n("ROLE_CANDIDATE"),hasRoleAdmin:()=>n("ROLE_ADMIN"),hasPermission:(o,...s)=>{const l=e.establishments[o];if(l===void 0)throw new Error(`::SDK Authorization:: Permissions not fetched for establishment ${o}`);return s.every(m=>l[m]===!0)},clear:()=>{e.user=void 0,e.roles=[],e.establishments={}}},_}async function on(e,...t){if(!M().isAuthenticated())throw"ERR_NOT_AUTHENTICATED";const n=X();await Promise.all([n.fetchSelf(),n.fetchPermission(e)]);for(let i=0;i<t.length;i++){const c=t[i];if(!n.hasPermission(e,c))throw"ERR_MISSING_PERMISSION"}}const sn=ae.defineStore("authorization",{state:()=>({user:void 0,establishments:{}}),getters:{roles:e=>e.user.roles??[],isRH(){return this.roles.includes("ROLE_RH")},isCandidate(){return this.roles.includes("ROLE_CANDIDATE")},isAdmin(){return this.roles.includes("ROLE_ADMIN")}},actions:{async fetchSelf(e){if(this.user===void 0||e){const t=await q().self().send();this.user=t.getData()}},async fetchPermission(e,t){if(!this.establishments[e]||t){const r=await F().authorizations(e).send();this.establishments[e]=r.getData()}},hasPermission(e,...t){const r=this.establishments[e];return r===void 0?!1:t.every(n=>r[n]===!0)}}}),S=(e,t,r)=>{const n=typeof t=="string"?t.split("."):[t];let i=e;for(const[c,d]of n.entries()){if(c===n.length-1)return i[d]!==void 0?i[d]:r;if(!(d in i)||typeof i[d]!="object")return r;i=i[d]}return r},N=(e,t,r)=>{const n=typeof t=="string"?t.split("."):[t],i=p=>typeof p=="number"||/^\d$/g.test(p),c=p=>parseInt(p,10);let d=e;return n.forEach((p,u)=>{if(u===n.length-1)d[p]=r;else{const o=i(n[u+1])?[]:{};p=i(p)?c(p):p,d[p]=d[p]??o,d=d[p]}}),e},Y=e=>{if(typeof e=="object"){if(Array.isArray(e))return[...e];if(Object(e)===e)return{...e}}return e},B=(e,t)=>{const r={...e};for(const[n,i]of Object.entries(t))n in r&&typeof r[n]=="object"&&typeof i=="object"?r[n]=B(r[n],i):r[n]=Y(i);return r};let L=null;function g(){if(L)return L;const e=k.getEnvironment(),t=(()=>e==="prod"||e==="production"?"pPROC7dPoJ7XdxHrwsTQNXCGX79MJjhp":e==="staging"?"823rqOTwVk1ZCWVyBAdLInZ77TcFF0CF":"TMZX6evFnu87JrBHV5qLwHsld5C6hilZ")(),r=!!t,n=e!=="prod"&&e!=="production";let i=null;function c(){return r}function d(){const m=window.analytics=window.analytics||[];if(!m.initialize)if(m.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{m.invoked=!0,m.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on","addSourceMiddleware","addIntegrationMiddleware","setAnonymousId","addDestinationMiddleware"],m.factory=function(f){return function(){if(window.analytics.initialized)return window.analytics[f].apply(window.analytics,arguments);const h=Array.prototype.slice.call(arguments);return h.unshift(f),m.push(h),m}};for(let f=0;f<m.methods.length;f++){const h=m.methods[f];m[h]=m.factory(h)}m.load=function(f,h){const b=document.createElement("script");b.id="analytics-script",b.type="text/javascript",b.async=!0,b.src="https://cdn.segment.com/analytics.js/v1/"+f+"/analytics.min.js",b.onerror=()=>window.dispatchEvent(new Event("analytics-error"));const C=document.getElementsByTagName("script")[0];C.parentNode.insertBefore(b,C),m._loadOptions=h},m._writeKey=t,m.SNIPPET_VERSION="4.16.1",m.load(t),m.page(),m.ready(()=>window.dispatchEvent(new Event("analytics-ready")))}}async function p(){return i!==null||(i=new Promise((m,f)=>{if(!c())return l("Analytics is disabled."),m();if(window.addEventListener("analytics-ready",()=>{l("Analytics script loaded successfully."),m()}),window.addEventListener("analytics-error",()=>{l("Analytics script failed to load. Consider disabling your AdBlocker.",null,"error"),f()}),l("Loading Analytics script."),window.analytics)return m();d()})),i}async function u(m,f){try{if(await this.analyticsScriptReady(),l("[identify]",[m,f]),c())return window.analytics.identify(m,f)}catch{l("[identify]",[m,f],"error")}}async function o(m,f,h){typeof h!="object"&&(h={});try{if(await this.analyticsScriptReady(),l("[page]",[m,f,h]),c())return window.analytics.page(m,{category:f,...h})}catch{l("[page]",[m,f,h],"error")}}async function s(m,f,h){typeof h!="object"&&(h={});try{if(await this.analyticsScriptReady(),l("[track]",[m,f,h]),c())return window.analytics.track(m,{category:f,...h})}catch{l("[track]",[m,f,h],"error")}}function l(m,f=[],h="log"){f||(f=[]),n&&console[h](`%cⒶ%c ::SDK Analytics:: ${m}`,"color: green;","color: inherit;",...f)}return L={analyticsScriptReady:p,isEnabled:c,identify:u,page:o,track:s,consoleMessage:l},L}g.destroy=()=>L=null;function ee(){const e="Hubler Application";function t(o){var l;if(!o)throw new Error(`Missing arguments for domain "${e}"`);const s=!!o.offerId;if(s&&!o.recruitmentId)throw new Error(`Missing argument "recruitmentId" for domain "${e}"`);return{companyId:(l=o.establishmentId)==null?void 0:l.toString(),jobOfferId:s?o.offerId.toString():null,recruitmentId:s?o.recruitmentId.toString():null,selections:[s?"Application":"Spontaneous Application"]}}async function r(o){return g().page("Application Authentication Viewed",e,t(o))}async function n(o){return g().page("Application Magic Link Viewed",e,t(o))}async function i(o){return g().page("Application Job Viewed",e,t(o))}async function c(o){return g().page("Application Information Viewed",e,t(o))}async function d(o){return g().page("Application Document Viewed",e,t(o))}async function p(o){return g().page("Application Success Viewed",e,t(o))}async function u(o){if(!o.error)throw new Error(`Missing argument "error" for domain "${e}", event "Application Form Failed"`);return g().track("Application Form Failed",e,{...t(o),error:o.error})}return{applicationAuthenticationViewed:r,applicationMagicLinkViewed:n,applicationJobViewed:i,applicationInformationViewed:c,applicationDocumentViewed:d,applicationSuccessViewed:p,applicationFormFailed:u}}function te(){const e="Profile";function t(a,R){var E;if(!a)throw new Error(`Missing arguments for domain "${e}"`);const A={companyId:a.companyId?a.companyId.toString():null,hublerId:(E=a.hublerId)==null?void 0:E.toString()};return R&&(A.productId=a.companyId?a.companyId+"_2":null),a.recruitmentId&&(A.recruitmentId=a.recruitmentId.toString()),a.selections&&(A.selections=a.selections),a.institutionId&&(A.institutionId=a.institutionId.map(String)),A}async function r(a){return g().track(a.name,e,t(a.properties),!0)}async function n(a){return g().track(a.name,e,t(a.properties,!0))}async function i(a){return g().track(a.name,e,t(a.properties,!0))}async function c(a){return g().track(a.name,e,t(a.properties,!0))}async function d(a){return g().track(a.name,e,t(a.properties,!0))}async function p(a){return g().track(a.name,e,t(a.properties,!0))}async function u(a){return g().track(a.name,e,t(a.properties,!0))}async function o(a){return g().track(a.name,e,t(a.properties,!0))}async function s(a){return g().track(a.name,e,t(a.properties,!0))}async function l(a){return g().track(a.name,e,t(a.properties,!0))}async function m(a){return g().track(a.name,e,t(a.properties,!0))}async function f(a){return g().track(a.name,e,t(a.properties,!0))}async function h(a){return g().track(a.name,e,t(a.properties,!0))}async function b(a){return g().page(a.name,a.properties.category,t(a.properties,!1))}async function C(a){return g().track(a.name,e,t(a.properties,!1))}return{profileDocumentDeleted:r,profileLabelAdded:n,profileLabelRemoved:i,profileShared:c,profileArchived:d,profileCandidateAdded:p,profileCommentAdded:u,profileDocumentAdded:o,profileDocumentDownloaded:s,profileDocumentRequested:l,profileRecruitmentAdded:m,profileRecruitmentRemoved:f,profileTabSelected:h,profileViewed:b,profileEmailSent:C}}const H=Object.freeze(Object.defineProperty({__proto__:null,useAnalyticsHublerApplication:ee,useAnalyticsProfile:te},Symbol.toStringTag,{value:"Module"}));function an(){function e(r){return g().identify(r.id,{email:r.email,firstName:r.firstname,lastName:r.lastname,createdAt:r.createdAt,type:"Hubler",lang:"fr",medium:t()?"MOBILE_DEVICE":"WEB_BROWSER"})}function t(){let r=!1;return function(n){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(n)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(n.substr(0,4)))&&(r=!0)}(navigator.userAgent||navigator.vendor||window.opera),r}return{identifyCandidate:e}}const cn="AIzaSyDicyRD6rvVdnicp1tgV0ElazASNGbyyTs",ne=()=>new Promise(e=>{window.google&&window.google.maps?e():(window.addEventListener("gmap-ready",()=>e()),dn())}),un=(e,t)=>ne().then(()=>ln(e,t)),ln=(e,t)=>{const r=new window.google.maps.places.Autocomplete(e,{componentRestrictions:{country:["fr","re","yt","gp","mq"]}});window.google.maps.event.addListener(r,"place_changed",()=>{const n=r.getPlace();n.formatted_address&&t(n)})},dn=()=>{window.onGmapScriptReady=function(){};const e=document.createElement("script");e.src="https://maps.googleapis.com/maps/api/js?key="+cn+"&libraries=places&callback=onGmapScriptReady",e.async=!0,e.defer=!0,e.onload=()=>window.dispatchEvent(new Event("gmap-ready")),document.body.appendChild(e)},mn={scriptReady:ne,autocompleteInput:un},fn={common:{the:"le",from:"de"},timeAgo:{"just-now":"à l'instant",ago:"il y a {0}",in:"dans {0}","last-month":"le mois dernier","next-month":"le mois prochain",month:"mois | mois","last-year":"l'année dernière","next-year":"l'année prochaine",year:"an | ans",yesterday:"hier",tomorrow:"demain",day:"jour | jours","last-week":"la semaine dernière","next-week":"la semaine prochaine",week:"semaine | semaines",hour:"heure | heures",minute:"minute | minutes",second:"seconde | secondes"}},pn={fr:fn};let z=null;const re=()=>z,hn=(e={})=>{let t=e.locale||"fr";const r=u=>t=u,n=()=>t,i=B(pn,(e==null?void 0:e.messages)||{}),c=(u,o)=>{const s=S(i,`${t}.${u}`);return s?o?yn(s,o):s:u},d=(u,o)=>{const s=S(i,`${t}.${u}`);return s?gn(s,o):u};return z={t:c,tNode:d,setLocale:r,getLocale:n,install:u=>{u.config.globalProperties.$t=c,u.config.globalProperties.$tNode=d}},z},yn=(e,t)=>e?e.replace(/{{ ?([a-zA-Z_.]+) ?}}/g,(r,n)=>S(t,n)):null,gn=(e,t)=>{if(!e)return null;const r=e.split(/(\{[{%]+[^{}]*[%}]+})/g).filter(n=>n!=="").map(n=>{const i=n.startsWith("{%")&&n.endsWith("%}")?"slot":n.startsWith("{{")&&n.endsWith("}}")?"variable":"text";if(i==="text")return()=>V.text(n);n=n.replace(/[{}%]/g,"").trim();const c=n.match(/^[a-zA-Z_.]+/)[0];n=n.replace(c,"").trim();const d={};return n!==""&&([...n.matchAll(/([a-zA-Z_.]+)(=([a-zA-Z_.]+))?/g)].reduce((o,s)=>(s[3]===void 0?N(o,s[1],S(t,s[1])):N(o,s[1],S(t,s[3])),o),d),[...n.matchAll(/([a-zA-Z_.]+)="([^"]+)"/g)].reduce((o,s)=>{let l=s[2];return new RegExp(/^[0-9]*$/).exec(s[2])?l=parseInt(s[2]):new RegExp(/^(true|false)$/).exec(s[2])&&(l=s[2]==="true"),o[s[1]]=l,o},d)),p=>V[i](c,t,p,d)});return{setup:(n,{slots:i})=>()=>r.map(c=>c(i))}},V={slot:(e,t,r,n)=>T.h("span",{class:"node node--slot"},r[e.trim()](n)),variable:(e,t)=>T.h("span",{class:"node node--variable"},S(t,e.trim())),text:e=>T.h("span",{class:"node node--text"},e)};function bn(e){const{t}=re(),r={justNow:t("timeAgo.just-now"),past:n=>n.match(/\d/)?t("timeAgo.ago",[n]):n,future:n=>n.match(/\d/)?t("timeAgo.in",[n]):n,month:(n,i)=>n===1?t(i?"timeAgo.last-month":"timeAgo.next-month"):`${n} ${t("timeAgo.month",n)}`,year:(n,i)=>n===1?t(i?"timeAgo.last-year":"timeAgo.next-year"):`${n} ${t("timeAgo.year",n)}`,day:(n,i)=>n===1?t(i?"timeAgo.yesterday":"timeAgo.tomorrow"):`${n} ${t("timeAgo.day",n)}`,week:(n,i)=>n===1?t(i?"timeAgo.last-week":"timeAgo.next-week"):`${n} ${t("timeAgo.week",n)}`,hour:n=>`${n} ${t("timeAgo.hour",n)}`,minute:n=>`${n} ${t("timeAgo.minute",n)}`,second:n=>`${n} ${t("timeAgo.second",n)}`,invalid:""};return ce.useTimeAgo(e,{fullDateFormatter:n=>n.toLocaleDateString(),messages:r})}function wn(){let e=null;function t(){return e}function r(){return e.controller}function n(){return"use"+e.controller.charAt(0).toUpperCase()+e.controller.slice(1)+"QSController"}function i(){return e.action}function c(){return e.arguments}function d(){return!!(e&&e.controller&&e.action)}function p(){window.location.search.length!==0&&(e=window.location.search.substring(1).split("&").reduce((u,o)=>{const s=o.split("=");return s[0]==="controller"||s[0]==="action"?u[s[0]]=decodeURIComponent(s[1]):u.arguments[s[0]]=decodeURIComponent(s[1]),u},{controller:null,action:null,arguments:{}}))}return p(),{getParams:t,getController:r,getControllerComposableName:n,getAction:i,getArguments:c,hasAction:d}}function Rn(){async function e({domain:n,event:i,...c}){const d="useAnalytics"+n.charAt(0).toUpperCase()+n.slice(1);if(!t(d))throw new Error(`Domain ${n} is not defined`);const p=H[d]();if(!r(p,i))throw new Error(`Event ${i} is not defined in domain ${n}`);return p[i](c)}function t(n){return!!H[n]}function r(n,i){return!!n[i]}return{call:e}}const Q=Object.freeze(Object.defineProperty({__proto__:null,useAnalyticsQSController:Rn},Symbol.toStringTag,{value:"Module"}));function An(e){if(!e.hasAction())throw new Error("No action found in router");function t(){if(!r())throw new Error(`Controller ${e.getController()} not found`);const i=Q[e.getControllerComposableName()]();if(!n(i))throw new Error(`Action ${e.getAction()} not found in controller ${e.getController()}`);return i[e.getAction()](e.getArguments())}function r(){return e.getControllerComposableName()in Q}function n(i){return e.getAction()in i}return{dispatch:t}}function Pn(){let e=!1;function t(i,c,d){n(),d()}function r(i,c,d){if(!e)return e=!0,t(i,c,d);d()}function n(){const i=wn();if(!i.hasAction())return;An(i).dispatch()}return{vueRouterBeforeEach:t,vueRouterBeforeFirst:r,handle:n}}const I=()=>k.getMainAppHost(),In=()=>`${I()}/rh/establishments`,vn=e=>`${I()}/rh/establishment/${e}`,En=e=>e&&typeof e=="object"&&e.urls&&e.urls.display?e.urls.display:"",Sn=e=>`${I()}/rh/establishment/${e}/cvtheque/`,Cn=(e,t)=>`${I()}/rh/establishment/${e}/recruitment/${t}`,kn=(e,t)=>`${I()}/rh/establishment/${e}/recruitment/${t}/kanban`,$n=e=>`${I()}/rh/establishment/${e}/career-configuration`,Ln=(e,t=null)=>t?`${I()}/career-website/${e}/${t}`:`${I()}/career-website/${e}`,Mn=(e,t)=>`${I()}/career-website-preview/${e}/${t}`,On=(e,t=null)=>{const r=I().replace("://",`://${e}.`);return t?`${r}?_version=${t}`:`${r}`};function Dn(){return{root:I,establishments:In,establishment:vn,img:En,cvtheque:Sn,recruitment:Cn,recruitmentKanban:kn,career:$n,careerConfig:Ln,careerPreview:Mn,careerWebsite:On}}const _n="0.2.6";exports.BaseLogger=x;exports.Gmap=mn;exports.SDKConfig=k;exports.SDKLogger=$;exports.VERSION=_n;exports._clone=Y;exports._get=S;exports._merge=B;exports._set=N;exports.createI18n=hn;exports.useActivityRepository=xe;exports.useAnalyticsHublerApplication=ee;exports.useAnalyticsIdentify=an;exports.useAnalyticsProfile=te;exports.useAuthentication=M;exports.useAuthorization=X;exports.useAuthorizationStore=sn;exports.useCanAccessEstablishmentMiddleware=on;exports.useCandidateRepository=qe;exports.useCommentRepository=Qe;exports.useContractTypeRepository=Ke;exports.useCvbankRepository=We;exports.useCvthequeRepository=Xe;exports.useDiplomaRepository=et;exports.useDocumentRepository=st;exports.useDomainUrls=Dn;exports.useEmailHistoryRepository=ct;exports.useEmailRepository=dt;exports.useEmailTemplateRepository=pt;exports.useEstablishmentCareerRepository=Rt;exports.useEstablishmentRepository=F;exports.useFeatureFlagRepository=Et;exports.useI18n=re;exports.useJobRepository=Ct;exports.useLabelRepository=Dt;exports.useLocaleTimeAgo=bn;exports.useOfferRepository=Tt;exports.usePrivateRequest=y;exports.useQSAction=Pn;exports.useRecruiterRepository=jt;exports.useRecruitmentRepository=Ht;exports.useRegisterRepository=Jt;exports.useRequest=w;exports.useSpecialityRepository=Zt;exports.useTagRepository=Yt;exports.useUserRepository=q;
1
+ "use strict";var ie=Object.defineProperty;var se=(e,t,r)=>t in e?ie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var v=(e,t,r)=>(se(e,typeof t!="symbol"?t+"":t,r),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("vue"),oe=require("axios"),ae=require("pinia"),ce=require("@vueuse/core");var U={expireTimes:"1d",path:"; path=/",domain:"",secure:!1,sameSite:"; SameSite=Lax"},ue=function(){function e(){this.current_default_config=U}return e.prototype.config=function(t){for(var r in this.current_default_config)this.current_default_config[r]=t[r]?t[r]:U[r]},e.prototype.get=function(t){var r=decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(t).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null;if(r&&r.substring(0,1)==="{"&&r.substring(r.length-1,r.length)==="}")try{r=JSON.parse(r)}catch{return r}return r},e.prototype.set=function(t,r,n,i,c,d,p){if(t){if(/^(?:expires|max-age|path|domain|secure|SameSite)$/i.test(t))throw new Error('Cookie name illegality. Cannot be set to ["expires","max-age","path","domain","secure","SameSite"] current key name: '+t)}else throw new Error("Cookie name is not found in the first argument.");r&&r.constructor===Object&&(r=JSON.stringify(r));var u="";if(n==null&&(n=this.current_default_config.expireTimes?this.current_default_config.expireTimes:""),n&&n!=0)switch(n.constructor){case Number:n===1/0||n===-1?u="; expires=Fri, 31 Dec 9999 23:59:59 GMT":u="; max-age="+n;break;case String:if(/^(?:\d+(y|m|d|h|min|s))$/i.test(n)){var s=n.replace(/^(\d+)(?:y|m|d|h|min|s)$/i,"$1");switch(n.replace(/^(?:\d+)(y|m|d|h|min|s)$/i,"$1").toLowerCase()){case"m":u="; max-age="+ +s*2592e3;break;case"d":u="; max-age="+ +s*86400;break;case"h":u="; max-age="+ +s*3600;break;case"min":u="; max-age="+ +s*60;break;case"s":u="; max-age="+s;break;case"y":u="; max-age="+ +s*31104e3;break}}else u="; expires="+n;break;case Date:u="; expires="+n.toUTCString();break}return document.cookie=encodeURIComponent(t)+"="+encodeURIComponent(r)+u+(c?"; domain="+c:this.current_default_config.domain?this.current_default_config.domain:"")+(i?"; path="+i:this.current_default_config.path?this.current_default_config.path:"; path=/")+(d==null?this.current_default_config.secure?"; Secure":"":d?"; Secure":"")+(p==null?this.current_default_config.sameSite?"; SameSute="+this.current_default_config.sameSite:"":p?"; SameSite="+p:""),this},e.prototype.remove=function(t,r,n){return!t||!this.isKey(t)?!1:(document.cookie=encodeURIComponent(t)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT"+(n?"; domain="+n:this.current_default_config.domain?this.current_default_config.domain:"")+(r?"; path="+r:this.current_default_config.path?this.current_default_config.path:"; path=/")+"; SameSite=Lax",!0)},e.prototype.isKey=function(t){return new RegExp("(?:^|;\\s*)"+encodeURIComponent(t).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(document.cookie)},e.prototype.keys=function(){if(!document.cookie)return[];for(var t=document.cookie.replace(/((?:^|\s*;)[^\=]+)(?=;|$)|^\s*|\s*(?:\=[^;]*)?(?:\1|$)/g,"").split(/\s*(?:\=[^;]*)?;\s*/),r=0;r<t.length;r++)t[r]=decodeURIComponent(t[r]);return t},e}(),j=null;function le(){j==null&&(j=new ue);var e=T.reactive(j);return{cookies:e}}function de(){const{cookies:e}=le();function t(c){return e.get(c)}function r(c,d){return e.set(c,d)}function n(c){return e.remove(c)}function i(){e.keys().forEach(c=>n(c))}return{getItem:t,setItem:r,removeItem:n,clear:i}}let O=null;function M(e={auth:"token",refresh:"refresh_token",expiration:"token_expiration_date"},t=de()){if(O)return O;function r(){return t.getItem(e.auth)}function n(){return t.getItem(e.refresh)}function i(){return t.getItem(e.expiration)}function c(m,f){const h=o(m);if(!h.exp)throw new Error("Invalid JWT token.");t.setItem(e.auth,m),t.setItem(e.refresh,f),t.setItem(e.expiration,((h.exp-60)*1e3).toString())}function d(){t.removeItem(e.auth),t.removeItem(e.refresh),t.removeItem(e.expiration)}function p(){return u()&&!s()}function u(){return!!r()}function s(){const m=i();return m?new Date(m)<new Date:!0}function o(m){return JSON.parse(atob(m.split(".")[1]))}function l(){return t}return O={keys:e,getAuthToken:r,getRefreshToken:n,getExpiration:i,authenticate:c,clear:d,isAuthenticated:p,hasAuth:u,isExpired:s,getStorage:l},O}function me(e){let t={"Content-Type":"application/json"};e&&r(e);function r(h,b=!1){return t=b?h:{...t,...h},this}function n(){return t}function i(h,b){return t[h]=b,this}function c(h){return t[h]}function d(h){return t[h]&&delete t[h],this}function p(h){return i("Authorization","Bearer "+h),this}function u(){return d("Authorization"),this}function s(){return!!c("Authorization")}function o(){return i("Content-Type","multipart/form-data"),this}function l(){return i("Content-Type","application/json"),this}function m(){return c("Content-Type")==="multipart/form-data"}function f(){return c("Content-Type")==="application/json"}return{setHeaders:r,getHeaders:n,setHeader:i,getHeader:c,removeHeader:d,setAuthorization:p,removeAuthorization:u,hasAuthorization:s,setFormData:o,setJson:l,isFormData:m,isJson:f}}function fe(e){let t=null;e&&r(e);function r(i){if(i=i.toLowerCase(),!["get","post","put","patch","delete"].includes(i))throw new Error("Invalid method.");return t=i,this}function n(){return t}return{setMethod:r,getMethod:n}}function pe(e,t,r){let n=null;r&&i(r);function i(s){if(!["post","put","patch"].includes(e.getMethod()))throw new Error("Payload can only be set for POST, PUT and PATCH requests.");return s instanceof FormData?t.setFormData():d(s)&&(s=p(s),t.setFormData()),t.isFormData()&&e.getMethod()==="put"&&(e.setMethod("post"),s.append("_method","PUT")),n=s,this}function c(){return n}function d(s){for(const o in s){const l=s[o];if(u(l))return!0;if(typeof l=="object"&&d(l))return!0}return!1}function p(s,o=null,l=0){const m=!o;m&&(o=new FormData);for(const f in s){const h=s[f];u(h)?(s[f]="<<FileIndex:"+l+">>",o.append(l,h,h.name),l++):typeof h=="object"&&(s[f]=p(s[f],o,l))}return m?(o.append("payload",JSON.stringify(s)),o):s}function u(s){return typeof File<"u"&&s instanceof File||typeof Blob<"u"&&s instanceof Blob}return{setPayload:i,getPayload:c}}const P=class P{constructor(t={}){v(this,"level",3);v(this,"logger");v(this,"prefix");this.logger=t.logger||console,this.prefix=t.prefix||""}setLevel(t){this.level=t}debug(...t){this.level<=P.LEVEL_DEBUG&&D(this.logger.debug,this.prefix,t)}info(...t){this.level<=P.LEVEL_INFO&&D(this.logger.info,this.prefix,t)}warn(...t){this.level<=P.LEVEL_WARN&&D(this.logger.warn,this.prefix,t)}error(...t){this.level<=P.LEVEL_ERROR&&D(this.logger.error,this.prefix,t)}};v(P,"LEVEL_DEBUG",0),v(P,"LEVEL_INFO",1),v(P,"LEVEL_WARN",2),v(P,"LEVEL_ERROR",3),v(P,"LEVEL_OFF",4);let x=P;const D=(e,t,r)=>{t?e(t,...r):e(...r)},$=new x({prefix:"[SDK]"});let G=null,K=null,J=null,W="/",Z=null;const he=()=>G,ye=e=>{if($.info("[Config] Environment:",e),!e)throw new Error("Invalid environment.");G=e},ge=()=>K,be=e=>{if($.info("[Config] API Host:",e),!e)throw new Error("Invalid API host.");K=e},we=()=>Z,Re=e=>{Z=e},Ae=()=>J,Pe=e=>{if($.info("[Config] Main App Host:",e),!e)throw new Error("Invalid main app host.");J=e},Ie=e=>{$.info("[Config] Base Assets Urls:",e),W=e},ve=()=>W,S={getEnvironment:he,getApiHost:ge,getErrorHandler:we,setEnvironment:ye,setApiHost:be,setErrorHandler:Re,getMainAppHost:Ae,setMainAppHost:Pe,setBaseAssetsUrl:Ie,getBaseAssetsUrl:ve};function Ee(e){const t=S.getApiHost().replace(/\/$/g,"");let r=null,n={},i={};e&&p(e);function c(){return t+u()+f()}function d(){return u(!0,!0)}function p(a){return r="/"+a.replace(/^\//g,""),this}function u(a=!0,R=!1){return a?r.replace(/:(\w+)/g,(A,E)=>R?"*":i[E]||":"+E):r}function s(a){return n=a,this}function o(a,R){return n[a]=R,this}function l(a){return n[a]&&delete n[a],this}function m(){return Object.keys(n).length>0}function f(a=!0){if(!m())return"";let R="";for(const A in n)if(Array.isArray(n[A]))for(const E of n[A])R+=(R.length?"&":"")+`${A}[]=`+E;else R+=(R.length?"&":"")+A+"="+n[A];return(a?"?":"")+R}function h(a){return i=a,this}function b(a,R){return i[a]=R,this}function k(a){return i[a]&&delete i[a],this}return{setPath:p,getPath:u,getUri:c,getMockUri:d,setQueryParams:s,setQueryParam:o,removeQueryParam:l,hasQuery:m,getQueryString:f,setRouteParams:h,setRouteParam:b,removeRouteParam:k}}function Se(e){let t=[];function r(){return t=s(arguments),d(),this}function n(){return t.length>0}function i(o){return t.includes(o.trim())?this:(t.push(o.trim()),d(),this)}function c(o){const l=t.indexOf(o.trim());return l===-1?this:(t.splice(l,1),d(),this)}function d(){t.length?e.setQueryParam("groups",u(t)):e.removeQueryParam("groups")}function p(o){return o.split(",").map(l=>l.trim())}function u(o){return o.join(",")}function s(o){let l=[];return o.length===1?typeof o[0]=="string"?l=p(o[0]):Array.isArray(o[0])&&(l=o[0]):l=Array.from(o),l}return{setGroups:r,hasGroups:n,addGroup:i,removeGroup:c}}function Ce(e){let t=!1,r=!1,n=1,i=10;function c(){return t=!0,d(),this}function d(){r=!0;const f=m(arguments);return s(f.page||1,!1),o(f.perPage||i,!1),l(),this}function p(){return r=!1,l(),this}function u(){return r}function s(f,h=!0){return t=!0,r=!0,n=f,h&&l(),this}function o(f,h=!0){return t=!0,r=!0,i=f,h&&l(),this}function l(){t?u()?(e.removeQueryParam("pagination"),e.setQueryParam("page",n),e.setQueryParam("nbResultPerPage",i)):(e.removeQueryParam("page"),e.removeQueryParam("nbResultPerPage"),e.setQueryParam("pagination","false")):(e.removeQueryParam("page"),e.removeQueryParam("nbResultPerPage"),e.removeQueryParam("pagination"))}function m(f){if(f.length===1&&typeof f[0]=="object")return f[0];const h={};return f.length>=1&&(h.page=f[0]),f.length>=2&&(h.perPage=f[1]),h}return{isList:c,paginate:d,disablePagination:p,hasPagination:u,setPage:s,setPerPage:o}}function ke(e){let t=!1,r="id",n="ASC";function i(){t=!0;const o=s(arguments);return o.orderBy&&d(o.orderBy,!1),o.orderDir&&p(o.orderDir,!1),u(),this}function c(){return t}function d(o,l=!0){return t=!0,r=o,l&&u(),this}function p(o,l=!0){if(o=o.toUpperCase(),["ASC","DESC"].indexOf(o)===-1)throw new Error("Invalid order direction");return t=!0,n=o,l&&u(),this}function u(){c()&&(e.setQueryParam("orderBy",r),e.setQueryParam("orderDirection",n))}function s(o){if(o.length===1&&typeof o[0]=="object")return o[0];const l={};return o.length>=1&&(l.orderBy=o[0]),o.length>=2&&(l.orderDir=o[1]),l}return{setOrder:i,hasOrder:c,setOrderBy:d,setOrderDir:p}}function $e(){let e=!1;function t(){return e=!0,this}function r(){return e}return{setSilent:t,isSilent:r}}function Le(){let e="json";function t(n="json"){if(["arraybuffer","document","json","text","stream","blob"].indexOf(n)===-1)throw new Error("Invalid response type");return e=n,this}function r(){return e}return{setResponseType:t,getResponseType:r}}function Me(e){function t(){return e}function r(){return e.data}function n(){return e.data}return{getResponse:t,getData:r,getPayload:n}}function Oe(e,t=!1){let r=!1,n=!1;return e.response?(r=!0,n=!0):e.request&&(r=!0),!t&&S.getErrorHandler()&&S.getErrorHandler()(e),{sent:r,responded:n,error:e}}function De(e){function t(){return e}function r(){return e.data}function n(){return e.data}function i(){return e.data["@type"]==="hydra:Collection"}function c(){return i()?e.data["hydra:member"]:null}function d(){return i()?e.data["hydra:totalItems"]:null}function p(){return i()?e.data["hydra:view"]&&e.data["hydra:view"]["hydra:last"]:!1}function u(){return!i()||!p()?null:parseInt(e.data["hydra:view"]["@id"].match(/page=(\d+)/)[1])}function s(){return!i()||!p()?null:parseInt(e.data["hydra:view"]["hydra:last"].match(/page=(\d+)/)[1])}return{getResponse:t,getData:r,getPayload:n,isCollection:i,getCollection:c,getTotal:d,hasPagination:p,getPage:u,getPages:s}}function _e(e,t,r,n,i,c){async function d(){const u=r.getMethod(),s=t.getUri(),o=e.getHeaders(),l=n.getPayload(),m=[s];["post","put","patch"].includes(u)&&m.push(l||{}),m.push({headers:o,responseType:c.getResponseType()}),$.info("[Request] Sending request:",`[${u.toUpperCase()}]`,s);try{const f=await oe[u](...m);return p(f)}catch(f){throw Oe(f,i.isSilent())}}function p(u){if(u.headers){const s=Object.keys(u.headers),o=s.map(l=>l.toLowerCase()).indexOf("content-type");if(o!==-1&&u.headers[s[o]].includes("application/ld+json"))return De(u)}return Me(u)}return{send:d}}function w(e,t="get",r=null){const n=me(),i=Ee(e),c=fe(t),d=pe(c,n,r),p=Se(i),u=Ce(i),s=ke(i),o=$e(),l=Le(),m=_e(n,i,c,d,o,l);return{...n,...i,...c,...d,...p,...u,...s,...o,...l,...m}}function y(e,t="get",r=null){const n=w(e,t,r),i=M();i.isAuthenticated()&&n.setAuthorization(i.getAuthToken());const c=n.send;return n.send=async function(){if(!n.hasAuthorization())throw new Error("::SDK Request:: Request cannot be sent, missing authorization header.");return c()},n}const Te=(e,t)=>y("/v2/activity/candidate/:candidateId/establishment/:establishmentId").setRouteParams({candidateId:e,establishmentId:t}),xe=()=>({listByCandidateAndEstablishment:Te}),je=(e,t,r)=>y("/candidate/:candidateId/share/establishment/:establishmentId").setMethod("post").setRouteParams({candidateId:e,establishmentId:t}).setPayload(r),Ne=(e,t)=>y("/candidate/:candidateId/archive/establishment/:establishmentId").setRouteParams({candidateId:e,establishmentId:t}),ze=(e,t)=>y("/candidate/:candidateId/archive/establishment/:establishmentId").setMethod("post").setRouteParams({candidateId:e,establishmentId:t}),Fe=(e,t)=>y("/candidate/:candidateId/archive/establishment/:establishmentId").setMethod("delete").setRouteParams({candidateId:e,establishmentId:t}),qe=()=>({share:je,isArchived:Ne,archive:ze,unarchive:Fe}),Be=(e,t)=>y("/comment/establishment/:establishmentId/candidate/:userId").setRouteParams({establishmentId:e,userId:t}),Ue=(e,t,r)=>y("/comment/establishment/:establishmentId/candidate/:userId").setRouteParams({establishmentId:e,userId:t}).setMethod("post").setPayload(r),He=(e,t)=>y("/comment/:commentId").setRouteParams({commentId:e}).setMethod("put").setPayload(t),Ve=e=>y("/comment/:commentId").setRouteParams({commentId:e}).setMethod("delete"),Qe=()=>({getForEstablishmentCandidate:Be,postForEstablishmentCandidate:Ue,update:He,remove:Ve}),Ge=()=>w("contractType").isList().addGroup("Term:id").addGroup("Term:name"),Ke=()=>({list:Ge}),Je=e=>y("/v2/talents").isList().setQueryParam("establishment-id",e),We=()=>({list:Je}),Ze=(e,t,r)=>y("/cvtheque/establishment/:establishmentId/candidate/:candidateId/label/synchronize").setRouteParams({establishmentId:e,candidateId:t}).setMethod("post").setPayload(r),Xe=()=>({syncCandidateLabels:Ze}),Ye=()=>w("diploma").isList().addGroup("Term:id").addGroup("Term:name"),et=()=>({list:Ye}),tt=e=>y("document/candidate/:candidateId").setRouteParams({candidateId:e}).isList().disablePagination(),nt=(e,t)=>y("document/candidate/:candidateId/establishment/:establishmentId/recruiter").setRouteParams({candidateId:e,establishmentId:t}).isList().disablePagination(),rt=(e,t)=>y("document/candidate/:candidateId/establishment/:establishmentId/candidate").setRouteParams({candidateId:e,establishmentId:t}).isList().disablePagination(),it=e=>y("document/recruiter").setMethod("post").setPayload(e),st=e=>y("document/:documentId").setRouteParams({documentId:e}).setMethod("delete"),ot=()=>({listByCandidate:tt,listByCandidateAndEstablishmentFromRecruiter:nt,listByCandidateAndEstablishmentFromCandidate:rt,addFromRecruiter:it,remove:st}),at=(e,t)=>y("/v2/establishments/:establishmentId/email-history").setRouteParams({establishmentId:t}).setQueryParam("receiverId",e).isList().disablePagination(),ct=()=>({listByCandidateAndEstablishment:at}),ut=(e,t)=>y("/email/candidate/:candidateId").setMethod("post").setRouteParams({candidateId:e}).setPayload(t),lt=(e,t)=>y("/v2/emails/send").setMethod("post").setFormData().setPayload({recipientIds:e,...t}),dt=()=>({sendToCandidate:ut,sendToRecipients:lt}),mt=(e,t=!0)=>{const r=y("/v2/establishments/:establishmentId/email-templates").setRouteParams({establishmentId:e}).isList().disablePagination();return t&&r.setQueryParam("global",!0),r},ft=()=>y("/v2/self/email-templates").isList().disablePagination(),pt=()=>({listByEstablishment:mt,listSelf:ft}),ht=(e,t)=>y("establishment-career/:establishmentId/:versionId").setRouteParams({establishmentId:e,versionId:t}),yt=(e,t="published")=>y("establishment-career/:establishmentId/state/:state").setRouteParams({establishmentId:e,state:t}),gt=(e,t,r=null)=>{const n=r!==null?y("establishment-career/:establishmentId/:versionId").setRouteParams({establishmentId:e,versionId:r}):y("establishment-career/:establishmentId").setRouteParams({establishmentId:e});return n.setMethod("post").setPayload(t),n},bt=(e,t)=>y("establishment-career/:establishmentId/logo-banner").setMethod("post").setRouteParams({establishmentId:e}).setPayload(t),wt=(e,t,r)=>y("establishment-career/:establishmentId/publish/:versionId").setMethod("post").setRouteParams({establishmentId:e,versionId:t}).setPayload(r),Rt=()=>({readById:ht,readByState:yt,upsert:gt,uploadLogoAndBanner:bt,publish:wt}),At=e=>w("establishment/:establishmentId").setRouteParams({establishmentId:e}),Pt=e=>y("establishment/:establishmentId/authorizations").setRouteParams({establishmentId:e}),F=()=>({read:At,authorizations:Pt}),It=e=>w("feature-flag/maintenance").setMethod("post").setPayload(e),vt=(e,t)=>w("feature-flag/establishment").setMethod("post").setPayload({establishment:e,flagName:t}),Et=()=>({maintenanceModeEnabled:It,forEstablishment:vt}),St=()=>w("job").isList().addGroup("Term:id").addGroup("Term:name"),Ct=()=>({list:St}),kt=e=>y("/label/establishment/:establishmentId").isList().setRouteParams({establishmentId:e}),$t=(e,t)=>y("/label/establishment/:establishmentId").setMethod("post").setRouteParams({establishmentId:e}).setPayload(t),Lt=(e,t)=>y("/label/:labelId").setMethod("put").setRouteParams({labelId:e}).setPayload(t),Mt=e=>y("/label/:labelId").setMethod("delete").setRouteParams({labelId:e}),Ot=(e,t,r)=>y("/label/establishment/:establishmentId/candidate/:candidateId/synchronize").setMethod("post").setPayload(r).setRouteParams({establishmentId:e,candidateId:t}),Dt=()=>({listByEstablishment:kt,addToEstablishment:$t,update:Lt,remove:Mt,syncForCandidate:Ot}),_t=e=>w("offer/:offerId").setRouteParams({offerId:e}),Tt=()=>({read:_t}),xt=(e,t=!1)=>{const r=y("/recruiter/establishment/:establishmentId").isList().setRouteParams({establishmentId:e});return t&&r.setQueryParam("exclude-me",1),r},jt=()=>({listByEstablishment:xt}),Nt=e=>y("/recruitment/establishment/:establishmentId/mine").isList().setRouteParams({establishmentId:e}),zt=(e,t)=>y("/recruitment/mine/establishment/:establishmentId/has-not/candidate/:candidateId").isList().setRouteParams({establishmentId:e,candidateId:t}),Ft=(e,t)=>y("/recruitment/mine/establishment/:establishmentId/has/candidate/:candidateId").isList().setRouteParams({establishmentId:e,candidateId:t}),qt=(e,t)=>y("/recruitment/establishment/:establishmentId/has/candidate/:candidateId").isList().setRouteParams({establishmentId:e,candidateId:t}),Bt=(e,t)=>y("/recruitment/:recruitmentId/candidate").setMethod("put").setRouteParams({recruitmentId:e}).setPayload(t),Ut=(e,t)=>y("/recruitment/:recruitmentId/candidate/:candidateId").setMethod("delete").setRouteParams({recruitmentId:e,candidateId:t}),Ht=()=>({mineByEstablishment:Nt,mineWithoutCandidate:zt,mineWithCandidate:Ft,withCandidate:qt,addCandidates:Bt,removeCandidate:Ut}),Vt=(e,t,r,n=null)=>{const i=w("candidate/register/open").setMethod("post"),c={email:e};return t==="establishment"&&(c.establishmentId=r),t==="offer"&&(c.offerId=r),n&&(c.referer=n),i.setPayload(c),i},Qt=(e,t)=>w("candidate/register/update/:token").setMethod("post").setRouteParams({token:e}).setPayload(t),Gt=e=>w("candidate/register/read/:token").setRouteParams({token:e}),Kt=e=>w("candidate/register/close/:token").setMethod("post").setRouteParams({token:e}),Jt=()=>({open:Vt,update:Qt,read:Gt,close:Kt}),Wt=()=>w("speciality").isList().addGroup("Term:id").addGroup("Term:name"),Zt=()=>({list:Wt}),Xt=e=>y("/tag/public/establishment/:establishmentId").isList().setRouteParams({establishmentId:e}),Yt=()=>({listByEstablishment:Xt}),en=e=>w("user/email/isset/:email").setRouteParams({email:e}),tn=()=>y("user/self").addGroup("user:self"),nn=e=>y("/user/:uuid").setRouteParams({uuid:e}),rn=e=>w("/user/:uuid").setRouteParams({uuid:e}),q=()=>({emailExists:en,self:tn,byUuidPrivate:nn,byUuid:rn});let _;function X(){if(_)return _;const e={user:void 0,roles:[],establishments:{}},t=async()=>{if(!M().isAuthenticated())throw new Error("::SDK Authorization:: User not authenticated");const s=(await q().self().send()).getData();e.user={id:s.id,email:s.email,firstName:s.firstName,lastName:s.lastName,avatar:s.avatar},e.roles=s.roles},r=async s=>{if(!M().isAuthenticated())throw new Error("::SDK Authorization:: User not authenticated");e.establishments[s]=(await F().authorizations(s).send()).getData()},n=s=>{if(e.user===void 0)throw new Error("::SDK Authorization:: User not fetched");return e.roles.includes(s)};return _={fetchSelf:t,fetchPermission:r,hasRole:n,hasRoleRH:()=>n("ROLE_RH"),hasRoleCandidate:()=>n("ROLE_CANDIDATE"),hasRoleAdmin:()=>n("ROLE_ADMIN"),hasPermission:(s,...o)=>{const l=e.establishments[s];if(l===void 0)throw new Error(`::SDK Authorization:: Permissions not fetched for establishment ${s}`);return o.every(m=>l[m]===!0)},clear:()=>{e.user=void 0,e.roles=[],e.establishments={}}},_}async function sn(e,...t){if(!M().isAuthenticated())throw"ERR_NOT_AUTHENTICATED";const n=X();await Promise.all([n.fetchSelf(),n.fetchPermission(e)]);for(let i=0;i<t.length;i++){const c=t[i];if(!n.hasPermission(e,c))throw"ERR_MISSING_PERMISSION"}}const on=ae.defineStore("authorization",{state:()=>({user:void 0,establishments:{}}),getters:{roles:e=>e.user.roles??[],isRH(){return this.roles.includes("ROLE_RH")},isCandidate(){return this.roles.includes("ROLE_CANDIDATE")},isAdmin(){return this.roles.includes("ROLE_ADMIN")}},actions:{async fetchSelf(e){if(this.user===void 0||e){const t=await q().self().send();this.user=t.getData()}},async fetchPermission(e,t){if(!this.establishments[e]||t){const r=await F().authorizations(e).send();this.establishments[e]=r.getData()}},hasPermission(e,...t){const r=this.establishments[e];return r===void 0?!1:t.every(n=>r[n]===!0)}}}),C=(e,t,r)=>{const n=typeof t=="string"?t.split("."):[t];let i=e;for(const[c,d]of n.entries()){if(c===n.length-1)return i[d]!==void 0?i[d]:r;if(!(d in i)||typeof i[d]!="object")return r;i=i[d]}return r},N=(e,t,r)=>{const n=typeof t=="string"?t.split("."):[t],i=p=>typeof p=="number"||/^\d$/g.test(p),c=p=>parseInt(p,10);let d=e;return n.forEach((p,u)=>{if(u===n.length-1)d[p]=r;else{const s=i(n[u+1])?[]:{};p=i(p)?c(p):p,d[p]=d[p]??s,d=d[p]}}),e},Y=e=>{if(typeof e=="object"){if(Array.isArray(e))return[...e];if(Object(e)===e)return{...e}}return e},B=(e,t)=>{const r={...e};for(const[n,i]of Object.entries(t))n in r&&typeof r[n]=="object"&&typeof i=="object"?r[n]=B(r[n],i):r[n]=Y(i);return r};let L=null;function g(){if(L)return L;const e=S.getEnvironment(),t=(()=>e==="prod"||e==="production"?"pPROC7dPoJ7XdxHrwsTQNXCGX79MJjhp":e==="staging"?"823rqOTwVk1ZCWVyBAdLInZ77TcFF0CF":"TMZX6evFnu87JrBHV5qLwHsld5C6hilZ")(),r=!!t,n=e!=="prod"&&e!=="production";let i=null;function c(){return r}function d(){const m=window.analytics=window.analytics||[];if(!m.initialize)if(m.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{m.invoked=!0,m.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on","addSourceMiddleware","addIntegrationMiddleware","setAnonymousId","addDestinationMiddleware"],m.factory=function(f){return function(){if(window.analytics.initialized)return window.analytics[f].apply(window.analytics,arguments);const h=Array.prototype.slice.call(arguments);return h.unshift(f),m.push(h),m}};for(let f=0;f<m.methods.length;f++){const h=m.methods[f];m[h]=m.factory(h)}m.load=function(f,h){const b=document.createElement("script");b.id="analytics-script",b.type="text/javascript",b.async=!0,b.src="https://cdn.segment.com/analytics.js/v1/"+f+"/analytics.min.js",b.onerror=()=>window.dispatchEvent(new Event("analytics-error"));const k=document.getElementsByTagName("script")[0];k.parentNode.insertBefore(b,k),m._loadOptions=h},m._writeKey=t,m.SNIPPET_VERSION="4.16.1",m.load(t),m.page(),m.ready(()=>window.dispatchEvent(new Event("analytics-ready")))}}async function p(){return i!==null||(i=new Promise((m,f)=>{if(!c())return l("Analytics is disabled."),m();if(window.addEventListener("analytics-ready",()=>{l("Analytics script loaded successfully."),m()}),window.addEventListener("analytics-error",()=>{l("Analytics script failed to load. Consider disabling your AdBlocker.",null,"error"),f()}),l("Loading Analytics script."),window.analytics)return m();d()})),i}async function u(m,f){try{if(await this.analyticsScriptReady(),l("[identify]",[m,f]),c())return window.analytics.identify(m,f)}catch{l("[identify]",[m,f],"error")}}async function s(m,f,h){typeof h!="object"&&(h={});try{if(await this.analyticsScriptReady(),l("[page]",[m,f,h]),c())return window.analytics.page(m,{category:f,...h})}catch{l("[page]",[m,f,h],"error")}}async function o(m,f,h){typeof h!="object"&&(h={});try{if(await this.analyticsScriptReady(),l("[track]",[m,f,h]),c())return window.analytics.track(m,{category:f,...h})}catch{l("[track]",[m,f,h],"error")}}function l(m,f=[],h="log"){f||(f=[]),n&&console[h](`%cⒶ%c ::SDK Analytics:: ${m}`,"color: green;","color: inherit;",...f)}return L={analyticsScriptReady:p,isEnabled:c,identify:u,page:s,track:o,consoleMessage:l},L}g.destroy=()=>L=null;function ee(){const e="Hubler Application";function t(s){var l;if(!s)throw new Error(`Missing arguments for domain "${e}"`);const o=!!s.offerId;if(o&&!s.recruitmentId)throw new Error(`Missing argument "recruitmentId" for domain "${e}"`);return{companyId:(l=s.establishmentId)==null?void 0:l.toString(),jobOfferId:o?s.offerId.toString():null,recruitmentId:o?s.recruitmentId.toString():null,selections:[o?"Application":"Spontaneous Application"]}}async function r(s){return g().page("Application Authentication Viewed",e,t(s))}async function n(s){return g().page("Application Magic Link Viewed",e,t(s))}async function i(s){return g().page("Application Job Viewed",e,t(s))}async function c(s){return g().page("Application Information Viewed",e,t(s))}async function d(s){return g().page("Application Document Viewed",e,t(s))}async function p(s){return g().page("Application Success Viewed",e,t(s))}async function u(s){if(!s.error)throw new Error(`Missing argument "error" for domain "${e}", event "Application Form Failed"`);return g().track("Application Form Failed",e,{...t(s),error:s.error})}return{applicationAuthenticationViewed:r,applicationMagicLinkViewed:n,applicationJobViewed:i,applicationInformationViewed:c,applicationDocumentViewed:d,applicationSuccessViewed:p,applicationFormFailed:u}}function te(){const e="Profile";function t(a,R){var E;if(!a)throw new Error(`Missing arguments for domain "${e}"`);const A={companyId:a.companyId?a.companyId.toString():null,hublerId:(E=a.hublerId)==null?void 0:E.toString()};return R&&(A.productId=a.companyId?a.companyId+"_2":null),a.recruitmentId&&(A.recruitmentId=a.recruitmentId.toString()),a.selections&&(A.selections=a.selections),a.institutionId&&(A.institutionId=a.institutionId.map(String)),A}async function r(a){return g().track(a.name,e,t(a.properties),!0)}async function n(a){return g().track(a.name,e,t(a.properties,!0))}async function i(a){return g().track(a.name,e,t(a.properties,!0))}async function c(a){return g().track(a.name,e,t(a.properties,!0))}async function d(a){return g().track(a.name,e,t(a.properties,!0))}async function p(a){return g().track(a.name,e,t(a.properties,!0))}async function u(a){return g().track(a.name,e,t(a.properties,!0))}async function s(a){return g().track(a.name,e,t(a.properties,!0))}async function o(a){return g().track(a.name,e,t(a.properties,!0))}async function l(a){return g().track(a.name,e,t(a.properties,!0))}async function m(a){return g().track(a.name,e,t(a.properties,!0))}async function f(a){return g().track(a.name,e,t(a.properties,!0))}async function h(a){return g().track(a.name,e,t(a.properties,!0))}async function b(a){return g().page(a.name,a.properties.category,t(a.properties,!1))}async function k(a){return g().track(a.name,e,t(a.properties,!1))}return{profileDocumentDeleted:r,profileLabelAdded:n,profileLabelRemoved:i,profileShared:c,profileArchived:d,profileCandidateAdded:p,profileCommentAdded:u,profileDocumentAdded:s,profileDocumentDownloaded:o,profileDocumentRequested:l,profileRecruitmentAdded:m,profileRecruitmentRemoved:f,profileTabSelected:h,profileViewed:b,profileEmailSent:k}}const H=Object.freeze(Object.defineProperty({__proto__:null,useAnalyticsHublerApplication:ee,useAnalyticsProfile:te},Symbol.toStringTag,{value:"Module"}));function an(){function e(r){return g().identify(r.id,{email:r.email,firstName:r.firstname,lastName:r.lastname,createdAt:r.createdAt,type:"Hubler",lang:"fr",medium:t()?"MOBILE_DEVICE":"WEB_BROWSER"})}function t(){let r=!1;return function(n){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(n)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(n.substr(0,4)))&&(r=!0)}(navigator.userAgent||navigator.vendor||window.opera),r}return{identifyCandidate:e}}const cn="AIzaSyDicyRD6rvVdnicp1tgV0ElazASNGbyyTs",ne=()=>new Promise(e=>{window.google&&window.google.maps?e():(window.addEventListener("gmap-ready",()=>e()),dn())}),un=(e,t)=>ne().then(()=>ln(e,t)),ln=(e,t)=>{const r=new window.google.maps.places.Autocomplete(e,{componentRestrictions:{country:["fr","re","yt","gp","mq"]}});window.google.maps.event.addListener(r,"place_changed",()=>{const n=r.getPlace();n.formatted_address&&t(n)})},dn=()=>{window.onGmapScriptReady=function(){};const e=document.createElement("script");e.src="https://maps.googleapis.com/maps/api/js?key="+cn+"&libraries=places&callback=onGmapScriptReady",e.async=!0,e.defer=!0,e.onload=()=>window.dispatchEvent(new Event("gmap-ready")),document.body.appendChild(e)},mn={scriptReady:ne,autocompleteInput:un},fn={common:{the:"le",from:"de"},timeAgo:{"just-now":"à l'instant",ago:"il y a {0}",in:"dans {0}","last-month":"le mois dernier","next-month":"le mois prochain",month:"mois | mois","last-year":"l'année dernière","next-year":"l'année prochaine",year:"an | ans",yesterday:"hier",tomorrow:"demain",day:"jour | jours","last-week":"la semaine dernière","next-week":"la semaine prochaine",week:"semaine | semaines",hour:"heure | heures",minute:"minute | minutes",second:"seconde | secondes"}},pn={fr:fn};let z=null;const re=()=>z,hn=(e={})=>{let t=e.locale||"fr";const r=u=>t=u,n=()=>t,i=B(pn,(e==null?void 0:e.messages)||{}),c=(u,s)=>{const o=C(i,`${t}.${u}`);return o?s?yn(o,s):o:u},d=(u,s)=>{const o=C(i,`${t}.${u}`);return o?gn(o,s):u};return z={t:c,tNode:d,setLocale:r,getLocale:n,install:u=>{u.config.globalProperties.$t=c,u.config.globalProperties.$tNode=d}},z},yn=(e,t)=>e?e.replace(/{{ ?([a-zA-Z_.]+) ?}}/g,(r,n)=>C(t,n)):null,gn=(e,t)=>{if(!e)return null;const r=e.split(/(\{[{%]+[^{}]*[%}]+})/g).filter(n=>n!=="").map(n=>{const i=n.startsWith("{%")&&n.endsWith("%}")?"slot":n.startsWith("{{")&&n.endsWith("}}")?"variable":"text";if(i==="text")return()=>V.text(n);n=n.replace(/[{}%]/g,"").trim();const c=n.match(/^[a-zA-Z_.]+/)[0];n=n.replace(c,"").trim();const d={};return n!==""&&([...n.matchAll(/([a-zA-Z_.]+)(=([a-zA-Z_.]+))?/g)].reduce((s,o)=>(o[3]===void 0?N(s,o[1],C(t,o[1])):N(s,o[1],C(t,o[3])),s),d),[...n.matchAll(/([a-zA-Z_.]+)="([^"]+)"/g)].reduce((s,o)=>{let l=o[2];return new RegExp(/^[0-9]*$/).exec(o[2])?l=parseInt(o[2]):new RegExp(/^(true|false)$/).exec(o[2])&&(l=o[2]==="true"),s[o[1]]=l,s},d)),p=>V[i](c,t,p,d)});return{setup:(n,{slots:i})=>()=>r.map(c=>c(i))}},V={slot:(e,t,r,n)=>T.h("span",{class:"node node--slot"},r[e.trim()](n)),variable:(e,t)=>T.h("span",{class:"node node--variable"},C(t,e.trim())),text:e=>T.h("span",{class:"node node--text"},e)};function bn(e){const{t}=re(),r={justNow:t("timeAgo.just-now"),past:n=>n.match(/\d/)?t("timeAgo.ago",[n]):n,future:n=>n.match(/\d/)?t("timeAgo.in",[n]):n,month:(n,i)=>n===1?t(i?"timeAgo.last-month":"timeAgo.next-month"):`${n} ${t("timeAgo.month",n)}`,year:(n,i)=>n===1?t(i?"timeAgo.last-year":"timeAgo.next-year"):`${n} ${t("timeAgo.year",n)}`,day:(n,i)=>n===1?t(i?"timeAgo.yesterday":"timeAgo.tomorrow"):`${n} ${t("timeAgo.day",n)}`,week:(n,i)=>n===1?t(i?"timeAgo.last-week":"timeAgo.next-week"):`${n} ${t("timeAgo.week",n)}`,hour:n=>`${n} ${t("timeAgo.hour",n)}`,minute:n=>`${n} ${t("timeAgo.minute",n)}`,second:n=>`${n} ${t("timeAgo.second",n)}`,invalid:""};return ce.useTimeAgo(e,{fullDateFormatter:n=>n.toLocaleDateString(),messages:r})}function wn(){let e=null;function t(){return e}function r(){return e.controller}function n(){return"use"+e.controller.charAt(0).toUpperCase()+e.controller.slice(1)+"QSController"}function i(){return e.action}function c(){return e.arguments}function d(){return!!(e&&e.controller&&e.action)}function p(){window.location.search.length!==0&&(e=window.location.search.substring(1).split("&").reduce((u,s)=>{const o=s.split("=");return o[0]==="controller"||o[0]==="action"?u[o[0]]=decodeURIComponent(o[1]):u.arguments[o[0]]=decodeURIComponent(o[1]),u},{controller:null,action:null,arguments:{}}))}return p(),{getParams:t,getController:r,getControllerComposableName:n,getAction:i,getArguments:c,hasAction:d}}function Rn(){async function e({domain:n,event:i,...c}){const d="useAnalytics"+n.charAt(0).toUpperCase()+n.slice(1);if(!t(d))throw new Error(`Domain ${n} is not defined`);const p=H[d]();if(!r(p,i))throw new Error(`Event ${i} is not defined in domain ${n}`);return p[i](c)}function t(n){return!!H[n]}function r(n,i){return!!n[i]}return{call:e}}const Q=Object.freeze(Object.defineProperty({__proto__:null,useAnalyticsQSController:Rn},Symbol.toStringTag,{value:"Module"}));function An(e){if(!e.hasAction())throw new Error("No action found in router");function t(){if(!r())throw new Error(`Controller ${e.getController()} not found`);const i=Q[e.getControllerComposableName()]();if(!n(i))throw new Error(`Action ${e.getAction()} not found in controller ${e.getController()}`);return i[e.getAction()](e.getArguments())}function r(){return e.getControllerComposableName()in Q}function n(i){return e.getAction()in i}return{dispatch:t}}function Pn(){let e=!1;function t(i,c,d){n(),d()}function r(i,c,d){if(!e)return e=!0,t(i,c,d);d()}function n(){const i=wn();if(!i.hasAction())return;An(i).dispatch()}return{vueRouterBeforeEach:t,vueRouterBeforeFirst:r,handle:n}}const In=()=>({getAssetUrl:t=>`${S.getBaseAssetUrl()}${t}`}),I=()=>S.getMainAppHost(),vn=()=>`${I()}/rh/establishments`,En=e=>`${I()}/rh/establishment/${e}`,Sn=e=>e&&typeof e=="object"&&e.urls&&e.urls.display?e.urls.display:"",Cn=e=>`${I()}/rh/establishment/${e}/cvtheque/`,kn=(e,t)=>`${I()}/rh/establishment/${e}/recruitment/${t}`,$n=(e,t)=>`${I()}/rh/establishment/${e}/recruitment/${t}/kanban`,Ln=e=>`${I()}/rh/establishment/${e}/career-configuration`,Mn=(e,t=null)=>t?`${I()}/career-website/${e}/${t}`:`${I()}/career-website/${e}`,On=(e,t)=>`${I()}/career-website-preview/${e}/${t}`,Dn=(e,t=null)=>{const r=I().replace("://",`://${e}.`);return t?`${r}?_version=${t}`:`${r}`};function _n(){return{root:I,establishments:vn,establishment:En,img:Sn,cvtheque:Cn,recruitment:kn,recruitmentKanban:$n,career:Ln,careerConfig:Mn,careerPreview:On,careerWebsite:Dn}}const Tn="0.2.7";exports.BaseLogger=x;exports.Gmap=mn;exports.SDKConfig=S;exports.SDKLogger=$;exports.VERSION=Tn;exports._clone=Y;exports._get=C;exports._merge=B;exports._set=N;exports.createI18n=hn;exports.useActivityRepository=xe;exports.useAnalyticsHublerApplication=ee;exports.useAnalyticsIdentify=an;exports.useAnalyticsProfile=te;exports.useAssetUrls=In;exports.useAuthentication=M;exports.useAuthorization=X;exports.useAuthorizationStore=on;exports.useCanAccessEstablishmentMiddleware=sn;exports.useCandidateRepository=qe;exports.useCommentRepository=Qe;exports.useContractTypeRepository=Ke;exports.useCvbankRepository=We;exports.useCvthequeRepository=Xe;exports.useDiplomaRepository=et;exports.useDocumentRepository=ot;exports.useDomainUrls=_n;exports.useEmailHistoryRepository=ct;exports.useEmailRepository=dt;exports.useEmailTemplateRepository=pt;exports.useEstablishmentCareerRepository=Rt;exports.useEstablishmentRepository=F;exports.useFeatureFlagRepository=Et;exports.useI18n=re;exports.useJobRepository=Ct;exports.useLabelRepository=Dt;exports.useLocaleTimeAgo=bn;exports.useOfferRepository=Tt;exports.usePrivateRequest=y;exports.useQSAction=Pn;exports.useRecruiterRepository=jt;exports.useRecruitmentRepository=Ht;exports.useRegisterRepository=Jt;exports.useRequest=w;exports.useSpecialityRepository=Zt;exports.useTagRepository=Yt;exports.useUserRepository=q;
package/dist/main.js CHANGED
@@ -331,28 +331,28 @@ const de = () => H, me = (e) => {
331
331
  if (L.info("[Config] API Host:", e), !e)
332
332
  throw new Error("Invalid API host.");
333
333
  V = e;
334
- }, he = () => K, ye = (e) => {
334
+ }, he = () => K, ge = (e) => {
335
335
  K = e;
336
- }, ge = () => Q, be = (e) => {
336
+ }, ye = () => Q, be = (e) => {
337
337
  if (L.info("[Config] Main App Host:", e), !e)
338
338
  throw new Error("Invalid main app host.");
339
339
  Q = e;
340
340
  }, we = (e) => {
341
341
  L.info("[Config] Base Assets Urls:", e), G = e;
342
- }, Re = () => G, $ = {
342
+ }, Ae = () => G, C = {
343
343
  getEnvironment: de,
344
344
  getApiHost: fe,
345
345
  getErrorHandler: he,
346
346
  setEnvironment: me,
347
347
  setApiHost: pe,
348
- setErrorHandler: ye,
349
- getMainAppHost: ge,
348
+ setErrorHandler: ge,
349
+ getMainAppHost: ye,
350
350
  setMainAppHost: be,
351
351
  setBaseAssetsUrl: we,
352
- getBaseAssetsUrl: Re
352
+ getBaseAssetsUrl: Ae
353
353
  };
354
- function Ae(e) {
355
- const t = $.getApiHost().replace(/\/$/g, "");
354
+ function Re(e) {
355
+ const t = C.getApiHost().replace(/\/$/g, "");
356
356
  let r = null, n = {}, i = {};
357
357
  e && p(e);
358
358
  function c() {
@@ -364,14 +364,14 @@ function Ae(e) {
364
364
  function p(a) {
365
365
  return r = "/" + a.replace(/^\//g, ""), this;
366
366
  }
367
- function u(a = !0, R = !1) {
368
- return a ? r.replace(/:(\w+)/g, (A, E) => R ? "*" : i[E] || ":" + E) : r;
367
+ function u(a = !0, A = !1) {
368
+ return a ? r.replace(/:(\w+)/g, (R, E) => A ? "*" : i[E] || ":" + E) : r;
369
369
  }
370
370
  function o(a) {
371
371
  return n = a, this;
372
372
  }
373
- function s(a, R) {
374
- return n[a] = R, this;
373
+ function s(a, A) {
374
+ return n[a] = A, this;
375
375
  }
376
376
  function l(a) {
377
377
  return n[a] && delete n[a], this;
@@ -382,20 +382,20 @@ function Ae(e) {
382
382
  function f(a = !0) {
383
383
  if (!m())
384
384
  return "";
385
- let R = "";
386
- for (const A in n)
387
- if (Array.isArray(n[A]))
388
- for (const E of n[A])
389
- R += (R.length ? "&" : "") + `${A}[]=` + E;
385
+ let A = "";
386
+ for (const R in n)
387
+ if (Array.isArray(n[R]))
388
+ for (const E of n[R])
389
+ A += (A.length ? "&" : "") + `${R}[]=` + E;
390
390
  else
391
- R += (R.length ? "&" : "") + A + "=" + n[A];
392
- return (a ? "?" : "") + R;
391
+ A += (A.length ? "&" : "") + R + "=" + n[R];
392
+ return (a ? "?" : "") + A;
393
393
  }
394
394
  function h(a) {
395
395
  return i = a, this;
396
396
  }
397
- function b(a, R) {
398
- return i[a] = R, this;
397
+ function b(a, A) {
398
+ return i[a] = A, this;
399
399
  }
400
400
  function S(a) {
401
401
  return i[a] && delete i[a], this;
@@ -570,7 +570,7 @@ function Ce(e) {
570
570
  }
571
571
  function ke(e, t = !1) {
572
572
  let r = !1, n = !1;
573
- return e.response ? (r = !0, n = !0) : e.request && (r = !0), !t && $.getErrorHandler() && $.getErrorHandler()(e), {
573
+ return e.response ? (r = !0, n = !0) : e.request && (r = !0), !t && C.getErrorHandler() && C.getErrorHandler()(e), {
574
574
  sent: r,
575
575
  responded: n,
576
576
  error: e
@@ -643,7 +643,7 @@ function Le(e, t, r, n, i, c) {
643
643
  };
644
644
  }
645
645
  function w(e, t = "get", r = null) {
646
- const n = ce(), i = Ae(e), c = ue(t), d = le(c, n, r), p = Pe(i), u = Ie(i), o = ve(i), s = Ee(), l = Se(), m = Le(n, i, c, d, s, l);
646
+ const n = ce(), i = Re(e), c = ue(t), d = le(c, n, r), p = Pe(i), u = Ie(i), o = ve(i), s = Ee(), l = Se(), m = Le(n, i, c, d, s, l);
647
647
  return {
648
648
  ...n,
649
649
  ...i,
@@ -657,7 +657,7 @@ function w(e, t = "get", r = null) {
657
657
  ...m
658
658
  };
659
659
  }
660
- function y(e, t = "get", r = null) {
660
+ function g(e, t = "get", r = null) {
661
661
  const n = w(e, t, r), i = _();
662
662
  i.isAuthenticated() && n.setAuthorization(i.getAuthToken());
663
663
  const c = n.send;
@@ -667,53 +667,53 @@ function y(e, t = "get", r = null) {
667
667
  return c();
668
668
  }, n;
669
669
  }
670
- const Me = (e, t) => y("/v2/activity/candidate/:candidateId/establishment/:establishmentId").setRouteParams({ candidateId: e, establishmentId: t }), dn = () => ({
670
+ const Me = (e, t) => g("/v2/activity/candidate/:candidateId/establishment/:establishmentId").setRouteParams({ candidateId: e, establishmentId: t }), dn = () => ({
671
671
  listByCandidateAndEstablishment: Me
672
- }), Oe = (e, t, r) => y("/candidate/:candidateId/share/establishment/:establishmentId").setMethod("post").setRouteParams({ candidateId: e, establishmentId: t }).setPayload(r), De = (e, t) => y("/candidate/:candidateId/archive/establishment/:establishmentId").setRouteParams({ candidateId: e, establishmentId: t }), _e = (e, t) => y("/candidate/:candidateId/archive/establishment/:establishmentId").setMethod("post").setRouteParams({ candidateId: e, establishmentId: t }), xe = (e, t) => y("/candidate/:candidateId/archive/establishment/:establishmentId").setMethod("delete").setRouteParams({ candidateId: e, establishmentId: t }), mn = () => ({
672
+ }), Oe = (e, t, r) => g("/candidate/:candidateId/share/establishment/:establishmentId").setMethod("post").setRouteParams({ candidateId: e, establishmentId: t }).setPayload(r), De = (e, t) => g("/candidate/:candidateId/archive/establishment/:establishmentId").setRouteParams({ candidateId: e, establishmentId: t }), _e = (e, t) => g("/candidate/:candidateId/archive/establishment/:establishmentId").setMethod("post").setRouteParams({ candidateId: e, establishmentId: t }), xe = (e, t) => g("/candidate/:candidateId/archive/establishment/:establishmentId").setMethod("delete").setRouteParams({ candidateId: e, establishmentId: t }), mn = () => ({
673
673
  share: Oe,
674
674
  isArchived: De,
675
675
  archive: _e,
676
676
  unarchive: xe
677
- }), Te = (e, t) => y("/comment/establishment/:establishmentId/candidate/:userId").setRouteParams({ establishmentId: e, userId: t }), je = (e, t, r) => y("/comment/establishment/:establishmentId/candidate/:userId").setRouteParams({ establishmentId: e, userId: t }).setMethod("post").setPayload(r), Ne = (e, t) => y("/comment/:commentId").setRouteParams({ commentId: e }).setMethod("put").setPayload(t), ze = (e) => y("/comment/:commentId").setRouteParams({ commentId: e }).setMethod("delete"), fn = () => ({
677
+ }), Te = (e, t) => g("/comment/establishment/:establishmentId/candidate/:userId").setRouteParams({ establishmentId: e, userId: t }), je = (e, t, r) => g("/comment/establishment/:establishmentId/candidate/:userId").setRouteParams({ establishmentId: e, userId: t }).setMethod("post").setPayload(r), Ne = (e, t) => g("/comment/:commentId").setRouteParams({ commentId: e }).setMethod("put").setPayload(t), ze = (e) => g("/comment/:commentId").setRouteParams({ commentId: e }).setMethod("delete"), fn = () => ({
678
678
  getForEstablishmentCandidate: Te,
679
679
  postForEstablishmentCandidate: je,
680
680
  update: Ne,
681
681
  remove: ze
682
682
  }), Fe = () => w("contractType").isList().addGroup("Term:id").addGroup("Term:name"), pn = () => ({
683
683
  list: Fe
684
- }), Be = (e) => y("/v2/talents").isList().setQueryParam("establishment-id", e), hn = () => ({
684
+ }), Be = (e) => g("/v2/talents").isList().setQueryParam("establishment-id", e), hn = () => ({
685
685
  list: Be
686
- }), qe = (e, t, r) => y("/cvtheque/establishment/:establishmentId/candidate/:candidateId/label/synchronize").setRouteParams({ establishmentId: e, candidateId: t }).setMethod("post").setPayload(r), yn = () => ({
686
+ }), qe = (e, t, r) => g("/cvtheque/establishment/:establishmentId/candidate/:candidateId/label/synchronize").setRouteParams({ establishmentId: e, candidateId: t }).setMethod("post").setPayload(r), gn = () => ({
687
687
  syncCandidateLabels: qe
688
- }), Ue = () => w("diploma").isList().addGroup("Term:id").addGroup("Term:name"), gn = () => ({
688
+ }), Ue = () => w("diploma").isList().addGroup("Term:id").addGroup("Term:name"), yn = () => ({
689
689
  list: Ue
690
- }), He = (e) => y("document/candidate/:candidateId").setRouteParams({ candidateId: e }).isList().disablePagination(), Ve = (e, t) => y("document/candidate/:candidateId/establishment/:establishmentId/recruiter").setRouteParams({ candidateId: e, establishmentId: t }).isList().disablePagination(), Qe = (e, t) => y("document/candidate/:candidateId/establishment/:establishmentId/candidate").setRouteParams({ candidateId: e, establishmentId: t }).isList().disablePagination(), Ge = (e) => y("document/recruiter").setMethod("post").setPayload(e), Ke = (e) => y("document/:documentId").setRouteParams({ documentId: e }).setMethod("delete"), bn = () => ({
690
+ }), He = (e) => g("document/candidate/:candidateId").setRouteParams({ candidateId: e }).isList().disablePagination(), Ve = (e, t) => g("document/candidate/:candidateId/establishment/:establishmentId/recruiter").setRouteParams({ candidateId: e, establishmentId: t }).isList().disablePagination(), Qe = (e, t) => g("document/candidate/:candidateId/establishment/:establishmentId/candidate").setRouteParams({ candidateId: e, establishmentId: t }).isList().disablePagination(), Ge = (e) => g("document/recruiter").setMethod("post").setPayload(e), Ke = (e) => g("document/:documentId").setRouteParams({ documentId: e }).setMethod("delete"), bn = () => ({
691
691
  listByCandidate: He,
692
692
  listByCandidateAndEstablishmentFromRecruiter: Ve,
693
693
  listByCandidateAndEstablishmentFromCandidate: Qe,
694
694
  addFromRecruiter: Ge,
695
695
  remove: Ke
696
- }), Je = (e, t) => y("/v2/establishments/:establishmentId/email-history").setRouteParams({ establishmentId: t }).setQueryParam("receiverId", e).isList().disablePagination(), wn = () => ({
696
+ }), Je = (e, t) => g("/v2/establishments/:establishmentId/email-history").setRouteParams({ establishmentId: t }).setQueryParam("receiverId", e).isList().disablePagination(), wn = () => ({
697
697
  listByCandidateAndEstablishment: Je
698
- }), We = (e, t) => y("/email/candidate/:candidateId").setMethod("post").setRouteParams({ candidateId: e }).setPayload(t), Ze = (e, t) => y("/v2/emails/send").setMethod("post").setFormData().setPayload({ recipientIds: e, ...t }), Rn = () => ({
698
+ }), We = (e, t) => g("/email/candidate/:candidateId").setMethod("post").setRouteParams({ candidateId: e }).setPayload(t), Ze = (e, t) => g("/v2/emails/send").setMethod("post").setFormData().setPayload({ recipientIds: e, ...t }), An = () => ({
699
699
  sendToCandidate: We,
700
700
  sendToRecipients: Ze
701
701
  }), Xe = (e, t = !0) => {
702
- const r = y("/v2/establishments/:establishmentId/email-templates").setRouteParams({ establishmentId: e }).isList().disablePagination();
702
+ const r = g("/v2/establishments/:establishmentId/email-templates").setRouteParams({ establishmentId: e }).isList().disablePagination();
703
703
  return t && r.setQueryParam("global", !0), r;
704
- }, Ye = () => y("/v2/self/email-templates").isList().disablePagination(), An = () => ({
704
+ }, Ye = () => g("/v2/self/email-templates").isList().disablePagination(), Rn = () => ({
705
705
  listByEstablishment: Xe,
706
706
  listSelf: Ye
707
- }), et = (e, t) => y("establishment-career/:establishmentId/:versionId").setRouteParams({ establishmentId: e, versionId: t }), tt = (e, t = "published") => y("establishment-career/:establishmentId/state/:state").setRouteParams({ establishmentId: e, state: t }), nt = (e, t, r = null) => {
708
- const n = r !== null ? y("establishment-career/:establishmentId/:versionId").setRouteParams({ establishmentId: e, versionId: r }) : y("establishment-career/:establishmentId").setRouteParams({ establishmentId: e });
707
+ }), et = (e, t) => g("establishment-career/:establishmentId/:versionId").setRouteParams({ establishmentId: e, versionId: t }), tt = (e, t = "published") => g("establishment-career/:establishmentId/state/:state").setRouteParams({ establishmentId: e, state: t }), nt = (e, t, r = null) => {
708
+ const n = r !== null ? g("establishment-career/:establishmentId/:versionId").setRouteParams({ establishmentId: e, versionId: r }) : g("establishment-career/:establishmentId").setRouteParams({ establishmentId: e });
709
709
  return n.setMethod("post").setPayload(t), n;
710
- }, rt = (e, t) => y("establishment-career/:establishmentId/logo-banner").setMethod("post").setRouteParams({ establishmentId: e }).setPayload(t), it = (e, t, r) => y("establishment-career/:establishmentId/publish/:versionId").setMethod("post").setRouteParams({ establishmentId: e, versionId: t }).setPayload(r), Pn = () => ({
710
+ }, rt = (e, t) => g("establishment-career/:establishmentId/logo-banner").setMethod("post").setRouteParams({ establishmentId: e }).setPayload(t), it = (e, t, r) => g("establishment-career/:establishmentId/publish/:versionId").setMethod("post").setRouteParams({ establishmentId: e, versionId: t }).setPayload(r), Pn = () => ({
711
711
  readById: et,
712
712
  readByState: tt,
713
713
  upsert: nt,
714
714
  uploadLogoAndBanner: rt,
715
715
  publish: it
716
- }), ot = (e) => w("establishment/:establishmentId").setRouteParams({ establishmentId: e }), st = (e) => y("establishment/:establishmentId/authorizations").setRouteParams({ establishmentId: e }), J = () => ({
716
+ }), ot = (e) => w("establishment/:establishmentId").setRouteParams({ establishmentId: e }), st = (e) => g("establishment/:establishmentId/authorizations").setRouteParams({ establishmentId: e }), J = () => ({
717
717
  read: ot,
718
718
  authorizations: st
719
719
  }), at = (e) => w("feature-flag/maintenance").setMethod("post").setPayload(e), ct = (e, t) => w("feature-flag/establishment").setMethod("post").setPayload({ establishment: e, flagName: t }), In = () => ({
@@ -721,7 +721,7 @@ const Me = (e, t) => y("/v2/activity/candidate/:candidateId/establishment/:estab
721
721
  forEstablishment: ct
722
722
  }), ut = () => w("job").isList().addGroup("Term:id").addGroup("Term:name"), vn = () => ({
723
723
  list: ut
724
- }), lt = (e) => y("/label/establishment/:establishmentId").isList().setRouteParams({ establishmentId: e }), dt = (e, t) => y("/label/establishment/:establishmentId").setMethod("post").setRouteParams({ establishmentId: e }).setPayload(t), mt = (e, t) => y("/label/:labelId").setMethod("put").setRouteParams({ labelId: e }).setPayload(t), ft = (e) => y("/label/:labelId").setMethod("delete").setRouteParams({ labelId: e }), pt = (e, t, r) => y("/label/establishment/:establishmentId/candidate/:candidateId/synchronize").setMethod("post").setPayload(r).setRouteParams({ establishmentId: e, candidateId: t }), En = () => ({
724
+ }), lt = (e) => g("/label/establishment/:establishmentId").isList().setRouteParams({ establishmentId: e }), dt = (e, t) => g("/label/establishment/:establishmentId").setMethod("post").setRouteParams({ establishmentId: e }).setPayload(t), mt = (e, t) => g("/label/:labelId").setMethod("put").setRouteParams({ labelId: e }).setPayload(t), ft = (e) => g("/label/:labelId").setMethod("delete").setRouteParams({ labelId: e }), pt = (e, t, r) => g("/label/establishment/:establishmentId/candidate/:candidateId/synchronize").setMethod("post").setPayload(r).setRouteParams({ establishmentId: e, candidateId: t }), En = () => ({
725
725
  listByEstablishment: lt,
726
726
  addToEstablishment: dt,
727
727
  update: mt,
@@ -729,17 +729,17 @@ const Me = (e, t) => y("/v2/activity/candidate/:candidateId/establishment/:estab
729
729
  syncForCandidate: pt
730
730
  }), ht = (e) => w("offer/:offerId").setRouteParams({ offerId: e }), Sn = () => ({
731
731
  read: ht
732
- }), yt = (e, t = !1) => {
733
- const r = y("/recruiter/establishment/:establishmentId").isList().setRouteParams({ establishmentId: e });
732
+ }), gt = (e, t = !1) => {
733
+ const r = g("/recruiter/establishment/:establishmentId").isList().setRouteParams({ establishmentId: e });
734
734
  return t && r.setQueryParam("exclude-me", 1), r;
735
735
  }, Cn = () => ({
736
- listByEstablishment: yt
737
- }), gt = (e) => y("/recruitment/establishment/:establishmentId/mine").isList().setRouteParams({ establishmentId: e }), bt = (e, t) => y("/recruitment/mine/establishment/:establishmentId/has-not/candidate/:candidateId").isList().setRouteParams({ establishmentId: e, candidateId: t }), wt = (e, t) => y("/recruitment/mine/establishment/:establishmentId/has/candidate/:candidateId").isList().setRouteParams({ establishmentId: e, candidateId: t }), Rt = (e, t) => y("/recruitment/establishment/:establishmentId/has/candidate/:candidateId").isList().setRouteParams({ establishmentId: e, candidateId: t }), At = (e, t) => y("/recruitment/:recruitmentId/candidate").setMethod("put").setRouteParams({ recruitmentId: e }).setPayload(t), Pt = (e, t) => y("/recruitment/:recruitmentId/candidate/:candidateId").setMethod("delete").setRouteParams({ recruitmentId: e, candidateId: t }), kn = () => ({
738
- mineByEstablishment: gt,
736
+ listByEstablishment: gt
737
+ }), yt = (e) => g("/recruitment/establishment/:establishmentId/mine").isList().setRouteParams({ establishmentId: e }), bt = (e, t) => g("/recruitment/mine/establishment/:establishmentId/has-not/candidate/:candidateId").isList().setRouteParams({ establishmentId: e, candidateId: t }), wt = (e, t) => g("/recruitment/mine/establishment/:establishmentId/has/candidate/:candidateId").isList().setRouteParams({ establishmentId: e, candidateId: t }), At = (e, t) => g("/recruitment/establishment/:establishmentId/has/candidate/:candidateId").isList().setRouteParams({ establishmentId: e, candidateId: t }), Rt = (e, t) => g("/recruitment/:recruitmentId/candidate").setMethod("put").setRouteParams({ recruitmentId: e }).setPayload(t), Pt = (e, t) => g("/recruitment/:recruitmentId/candidate/:candidateId").setMethod("delete").setRouteParams({ recruitmentId: e, candidateId: t }), kn = () => ({
738
+ mineByEstablishment: yt,
739
739
  mineWithoutCandidate: bt,
740
740
  mineWithCandidate: wt,
741
- withCandidate: Rt,
742
- addCandidates: At,
741
+ withCandidate: At,
742
+ addCandidates: Rt,
743
743
  removeCandidate: Pt
744
744
  }), It = (e, t, r, n = null) => {
745
745
  const i = w("candidate/register/open").setMethod("post"), c = { email: e };
@@ -751,9 +751,9 @@ const Me = (e, t) => y("/v2/activity/candidate/:candidateId/establishment/:estab
751
751
  close: St
752
752
  }), Ct = () => w("speciality").isList().addGroup("Term:id").addGroup("Term:name"), Ln = () => ({
753
753
  list: Ct
754
- }), kt = (e) => y("/tag/public/establishment/:establishmentId").isList().setRouteParams({ establishmentId: e }), Mn = () => ({
754
+ }), kt = (e) => g("/tag/public/establishment/:establishmentId").isList().setRouteParams({ establishmentId: e }), Mn = () => ({
755
755
  listByEstablishment: kt
756
- }), $t = (e) => w("user/email/isset/:email").setRouteParams({ email: e }), Lt = () => y("user/self").addGroup("user:self"), Mt = (e) => y("/user/:uuid").setRouteParams({ uuid: e }), Ot = (e) => w("/user/:uuid").setRouteParams({ uuid: e }), W = () => ({
756
+ }), $t = (e) => w("user/email/isset/:email").setRouteParams({ email: e }), Lt = () => g("user/self").addGroup("user:self"), Mt = (e) => g("/user/:uuid").setRouteParams({ uuid: e }), Ot = (e) => w("/user/:uuid").setRouteParams({ uuid: e }), W = () => ({
757
757
  emailExists: $t,
758
758
  self: Lt,
759
759
  byUuidPrivate: Mt,
@@ -854,7 +854,7 @@ const Dn = re("authorization", {
854
854
  return r === void 0 ? !1 : t.every((n) => r[n] === !0);
855
855
  }
856
856
  }
857
- }), C = (e, t, r) => {
857
+ }), k = (e, t, r) => {
858
858
  const n = typeof t == "string" ? t.split(".") : [t];
859
859
  let i = e;
860
860
  for (const [c, d] of n.entries()) {
@@ -890,11 +890,11 @@ const Dn = re("authorization", {
890
890
  n in r && typeof r[n] == "object" && typeof i == "object" ? r[n] = Z(r[n], i) : r[n] = _t(i);
891
891
  return r;
892
892
  };
893
- let k = null;
894
- function g() {
895
- if (k)
896
- return k;
897
- const e = $.getEnvironment(), t = (() => e === "prod" || e === "production" ? "pPROC7dPoJ7XdxHrwsTQNXCGX79MJjhp" : e === "staging" ? "823rqOTwVk1ZCWVyBAdLInZ77TcFF0CF" : "TMZX6evFnu87JrBHV5qLwHsld5C6hilZ")(), r = !!t, n = e !== "prod" && e !== "production";
893
+ let $ = null;
894
+ function y() {
895
+ if ($)
896
+ return $;
897
+ const e = C.getEnvironment(), t = (() => e === "prod" || e === "production" ? "pPROC7dPoJ7XdxHrwsTQNXCGX79MJjhp" : e === "staging" ? "823rqOTwVk1ZCWVyBAdLInZ77TcFF0CF" : "TMZX6evFnu87JrBHV5qLwHsld5C6hilZ")(), r = !!t, n = e !== "prod" && e !== "production";
898
898
  let i = null;
899
899
  function c() {
900
900
  return r;
@@ -973,16 +973,16 @@ function g() {
973
973
  function l(m, f = [], h = "log") {
974
974
  f || (f = []), n && console[h](`%cⒶ%c ::SDK Analytics:: ${m}`, "color: green;", "color: inherit;", ...f);
975
975
  }
976
- return k = {
976
+ return $ = {
977
977
  analyticsScriptReady: p,
978
978
  isEnabled: c,
979
979
  identify: u,
980
980
  page: o,
981
981
  track: s,
982
982
  consoleMessage: l
983
- }, k;
983
+ }, $;
984
984
  }
985
- g.destroy = () => k = null;
985
+ y.destroy = () => $ = null;
986
986
  function xt() {
987
987
  const e = "Hubler Application";
988
988
  function t(o) {
@@ -1000,27 +1000,27 @@ function xt() {
1000
1000
  };
1001
1001
  }
1002
1002
  async function r(o) {
1003
- return g().page("Application Authentication Viewed", e, t(o));
1003
+ return y().page("Application Authentication Viewed", e, t(o));
1004
1004
  }
1005
1005
  async function n(o) {
1006
- return g().page("Application Magic Link Viewed", e, t(o));
1006
+ return y().page("Application Magic Link Viewed", e, t(o));
1007
1007
  }
1008
1008
  async function i(o) {
1009
- return g().page("Application Job Viewed", e, t(o));
1009
+ return y().page("Application Job Viewed", e, t(o));
1010
1010
  }
1011
1011
  async function c(o) {
1012
- return g().page("Application Information Viewed", e, t(o));
1012
+ return y().page("Application Information Viewed", e, t(o));
1013
1013
  }
1014
1014
  async function d(o) {
1015
- return g().page("Application Document Viewed", e, t(o));
1015
+ return y().page("Application Document Viewed", e, t(o));
1016
1016
  }
1017
1017
  async function p(o) {
1018
- return g().page("Application Success Viewed", e, t(o));
1018
+ return y().page("Application Success Viewed", e, t(o));
1019
1019
  }
1020
1020
  async function u(o) {
1021
1021
  if (!o.error)
1022
1022
  throw new Error(`Missing argument "error" for domain "${e}", event "Application Form Failed"`);
1023
- return g().track("Application Form Failed", e, { ...t(o), error: o.error });
1023
+ return y().track("Application Form Failed", e, { ...t(o), error: o.error });
1024
1024
  }
1025
1025
  return {
1026
1026
  applicationAuthenticationViewed: r,
@@ -1034,60 +1034,60 @@ function xt() {
1034
1034
  }
1035
1035
  function Tt() {
1036
1036
  const e = "Profile";
1037
- function t(a, R) {
1037
+ function t(a, A) {
1038
1038
  var E;
1039
1039
  if (!a)
1040
1040
  throw new Error(`Missing arguments for domain "${e}"`);
1041
- const A = {
1041
+ const R = {
1042
1042
  companyId: a.companyId ? a.companyId.toString() : null,
1043
1043
  hublerId: (E = a.hublerId) == null ? void 0 : E.toString()
1044
1044
  };
1045
- return R && (A.productId = a.companyId ? a.companyId + "_2" : null), a.recruitmentId && (A.recruitmentId = a.recruitmentId.toString()), a.selections && (A.selections = a.selections), a.institutionId && (A.institutionId = a.institutionId.map(String)), A;
1045
+ return A && (R.productId = a.companyId ? a.companyId + "_2" : null), a.recruitmentId && (R.recruitmentId = a.recruitmentId.toString()), a.selections && (R.selections = a.selections), a.institutionId && (R.institutionId = a.institutionId.map(String)), R;
1046
1046
  }
1047
1047
  async function r(a) {
1048
- return g().track(a.name, e, t(a.properties), !0);
1048
+ return y().track(a.name, e, t(a.properties), !0);
1049
1049
  }
1050
1050
  async function n(a) {
1051
- return g().track(a.name, e, t(a.properties, !0));
1051
+ return y().track(a.name, e, t(a.properties, !0));
1052
1052
  }
1053
1053
  async function i(a) {
1054
- return g().track(a.name, e, t(a.properties, !0));
1054
+ return y().track(a.name, e, t(a.properties, !0));
1055
1055
  }
1056
1056
  async function c(a) {
1057
- return g().track(a.name, e, t(a.properties, !0));
1057
+ return y().track(a.name, e, t(a.properties, !0));
1058
1058
  }
1059
1059
  async function d(a) {
1060
- return g().track(a.name, e, t(a.properties, !0));
1060
+ return y().track(a.name, e, t(a.properties, !0));
1061
1061
  }
1062
1062
  async function p(a) {
1063
- return g().track(a.name, e, t(a.properties, !0));
1063
+ return y().track(a.name, e, t(a.properties, !0));
1064
1064
  }
1065
1065
  async function u(a) {
1066
- return g().track(a.name, e, t(a.properties, !0));
1066
+ return y().track(a.name, e, t(a.properties, !0));
1067
1067
  }
1068
1068
  async function o(a) {
1069
- return g().track(a.name, e, t(a.properties, !0));
1069
+ return y().track(a.name, e, t(a.properties, !0));
1070
1070
  }
1071
1071
  async function s(a) {
1072
- return g().track(a.name, e, t(a.properties, !0));
1072
+ return y().track(a.name, e, t(a.properties, !0));
1073
1073
  }
1074
1074
  async function l(a) {
1075
- return g().track(a.name, e, t(a.properties, !0));
1075
+ return y().track(a.name, e, t(a.properties, !0));
1076
1076
  }
1077
1077
  async function m(a) {
1078
- return g().track(a.name, e, t(a.properties, !0));
1078
+ return y().track(a.name, e, t(a.properties, !0));
1079
1079
  }
1080
1080
  async function f(a) {
1081
- return g().track(a.name, e, t(a.properties, !0));
1081
+ return y().track(a.name, e, t(a.properties, !0));
1082
1082
  }
1083
1083
  async function h(a) {
1084
- return g().track(a.name, e, t(a.properties, !0));
1084
+ return y().track(a.name, e, t(a.properties, !0));
1085
1085
  }
1086
1086
  async function b(a) {
1087
- return g().page(a.name, a.properties.category, t(a.properties, !1));
1087
+ return y().page(a.name, a.properties.category, t(a.properties, !1));
1088
1088
  }
1089
1089
  async function S(a) {
1090
- return g().track(a.name, e, t(a.properties, !1));
1090
+ return y().track(a.name, e, t(a.properties, !1));
1091
1091
  }
1092
1092
  return {
1093
1093
  profileDocumentDeleted: r,
@@ -1114,7 +1114,7 @@ const B = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1114
1114
  }, Symbol.toStringTag, { value: "Module" }));
1115
1115
  function _n() {
1116
1116
  function e(r) {
1117
- return g().identify(r.id, {
1117
+ return y().identify(r.id, {
1118
1118
  email: r.email,
1119
1119
  firstName: r.firstname,
1120
1120
  lastName: r.lastname,
@@ -1182,10 +1182,10 @@ let N = null;
1182
1182
  const Ut = () => N, Tn = (e = {}) => {
1183
1183
  let t = e.locale || "fr";
1184
1184
  const r = (u) => t = u, n = () => t, i = Z(qt, (e == null ? void 0 : e.messages) || {}), c = (u, o) => {
1185
- const s = C(i, `${t}.${u}`);
1185
+ const s = k(i, `${t}.${u}`);
1186
1186
  return s ? o ? Ht(s, o) : s : u;
1187
1187
  }, d = (u, o) => {
1188
- const s = C(i, `${t}.${u}`);
1188
+ const s = k(i, `${t}.${u}`);
1189
1189
  return s ? Vt(s, o) : u;
1190
1190
  };
1191
1191
  return N = {
@@ -1197,7 +1197,7 @@ const Ut = () => N, Tn = (e = {}) => {
1197
1197
  u.config.globalProperties.$t = c, u.config.globalProperties.$tNode = d;
1198
1198
  }
1199
1199
  }, N;
1200
- }, Ht = (e, t) => e ? e.replace(/{{ ?([a-zA-Z_.]+) ?}}/g, (r, n) => C(t, n)) : null, Vt = (e, t) => {
1200
+ }, Ht = (e, t) => e ? e.replace(/{{ ?([a-zA-Z_.]+) ?}}/g, (r, n) => k(t, n)) : null, Vt = (e, t) => {
1201
1201
  if (!e)
1202
1202
  return null;
1203
1203
  const r = e.split(/(\{[{%]+[^{}]*[%}]+})/g).filter((n) => n !== "").map((n) => {
@@ -1208,7 +1208,7 @@ const Ut = () => N, Tn = (e = {}) => {
1208
1208
  const c = n.match(/^[a-zA-Z_.]+/)[0];
1209
1209
  n = n.replace(c, "").trim();
1210
1210
  const d = {};
1211
- return n !== "" && ([...n.matchAll(/([a-zA-Z_.]+)(=([a-zA-Z_.]+))?/g)].reduce((o, s) => (s[3] === void 0 ? F(o, s[1], C(t, s[1])) : F(o, s[1], C(t, s[3])), o), d), [...n.matchAll(/([a-zA-Z_.]+)="([^"]+)"/g)].reduce((o, s) => {
1211
+ return n !== "" && ([...n.matchAll(/([a-zA-Z_.]+)(=([a-zA-Z_.]+))?/g)].reduce((o, s) => (s[3] === void 0 ? F(o, s[1], k(t, s[1])) : F(o, s[1], k(t, s[3])), o), d), [...n.matchAll(/([a-zA-Z_.]+)="([^"]+)"/g)].reduce((o, s) => {
1212
1212
  let l = s[2];
1213
1213
  return new RegExp(/^[0-9]*$/).exec(s[2]) ? l = parseInt(s[2]) : new RegExp(/^(true|false)$/).exec(s[2]) && (l = s[2] === "true"), o[s[1]] = l, o;
1214
1214
  }, d)), (p) => q[i](c, t, p, d);
@@ -1216,7 +1216,7 @@ const Ut = () => N, Tn = (e = {}) => {
1216
1216
  return { setup: (n, { slots: i }) => () => r.map((c) => c(i)) };
1217
1217
  }, q = {
1218
1218
  slot: (e, t, r, n) => x("span", { class: "node node--slot" }, r[e.trim()](n)),
1219
- variable: (e, t) => x("span", { class: "node node--variable" }, C(t, e.trim())),
1219
+ variable: (e, t) => x("span", { class: "node node--variable" }, k(t, e.trim())),
1220
1220
  text: (e) => x("span", { class: "node node--text" }, e)
1221
1221
  };
1222
1222
  function jn(e) {
@@ -1340,11 +1340,11 @@ function Nn() {
1340
1340
  handle: n
1341
1341
  };
1342
1342
  }
1343
- const I = () => $.getMainAppHost(), Jt = () => `${I()}/rh/establishments`, Wt = (e) => `${I()}/rh/establishment/${e}`, Zt = (e) => e && typeof e == "object" && e.urls && e.urls.display ? e.urls.display : "", Xt = (e) => `${I()}/rh/establishment/${e}/cvtheque/`, Yt = (e, t) => `${I()}/rh/establishment/${e}/recruitment/${t}`, en = (e, t) => `${I()}/rh/establishment/${e}/recruitment/${t}/kanban`, tn = (e) => `${I()}/rh/establishment/${e}/career-configuration`, nn = (e, t = null) => t ? `${I()}/career-website/${e}/${t}` : `${I()}/career-website/${e}`, rn = (e, t) => `${I()}/career-website-preview/${e}/${t}`, on = (e, t = null) => {
1343
+ const zn = () => ({ getAssetUrl: (t) => `${C.getBaseAssetUrl()}${t}` }), I = () => C.getMainAppHost(), Jt = () => `${I()}/rh/establishments`, Wt = (e) => `${I()}/rh/establishment/${e}`, Zt = (e) => e && typeof e == "object" && e.urls && e.urls.display ? e.urls.display : "", Xt = (e) => `${I()}/rh/establishment/${e}/cvtheque/`, Yt = (e, t) => `${I()}/rh/establishment/${e}/recruitment/${t}`, en = (e, t) => `${I()}/rh/establishment/${e}/recruitment/${t}/kanban`, tn = (e) => `${I()}/rh/establishment/${e}/career-configuration`, nn = (e, t = null) => t ? `${I()}/career-website/${e}/${t}` : `${I()}/career-website/${e}`, rn = (e, t) => `${I()}/career-website-preview/${e}/${t}`, on = (e, t = null) => {
1344
1344
  const r = I().replace("://", `://${e}.`);
1345
1345
  return t ? `${r}?_version=${t}` : `${r}`;
1346
1346
  };
1347
- function zn() {
1347
+ function Fn() {
1348
1348
  return {
1349
1349
  root: I,
1350
1350
  establishments: Jt,
@@ -1359,15 +1359,15 @@ function zn() {
1359
1359
  careerWebsite: on
1360
1360
  };
1361
1361
  }
1362
- const Fn = "0.2.6";
1362
+ const Bn = "0.2.7";
1363
1363
  export {
1364
1364
  j as BaseLogger,
1365
1365
  xn as Gmap,
1366
- $ as SDKConfig,
1366
+ C as SDKConfig,
1367
1367
  L as SDKLogger,
1368
- Fn as VERSION,
1368
+ Bn as VERSION,
1369
1369
  _t as _clone,
1370
- C as _get,
1370
+ k as _get,
1371
1371
  Z as _merge,
1372
1372
  F as _set,
1373
1373
  Tn as createI18n,
@@ -1375,6 +1375,7 @@ export {
1375
1375
  xt as useAnalyticsHublerApplication,
1376
1376
  _n as useAnalyticsIdentify,
1377
1377
  Tt as useAnalyticsProfile,
1378
+ zn as useAssetUrls,
1378
1379
  _ as useAuthentication,
1379
1380
  Dt as useAuthorization,
1380
1381
  Dn as useAuthorizationStore,
@@ -1383,13 +1384,13 @@ export {
1383
1384
  fn as useCommentRepository,
1384
1385
  pn as useContractTypeRepository,
1385
1386
  hn as useCvbankRepository,
1386
- yn as useCvthequeRepository,
1387
- gn as useDiplomaRepository,
1387
+ gn as useCvthequeRepository,
1388
+ yn as useDiplomaRepository,
1388
1389
  bn as useDocumentRepository,
1389
- zn as useDomainUrls,
1390
+ Fn as useDomainUrls,
1390
1391
  wn as useEmailHistoryRepository,
1391
- Rn as useEmailRepository,
1392
- An as useEmailTemplateRepository,
1392
+ An as useEmailRepository,
1393
+ Rn as useEmailTemplateRepository,
1393
1394
  Pn as useEstablishmentCareerRepository,
1394
1395
  J as useEstablishmentRepository,
1395
1396
  In as useFeatureFlagRepository,
@@ -1398,7 +1399,7 @@ export {
1398
1399
  En as useLabelRepository,
1399
1400
  jn as useLocaleTimeAgo,
1400
1401
  Sn as useOfferRepository,
1401
- y as usePrivateRequest,
1402
+ g as usePrivateRequest,
1402
1403
  Nn as useQSAction,
1403
1404
  Cn as useRecruiterRepository,
1404
1405
  kn as useRecruitmentRepository,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hublo/mstaff-client-sdk",
3
- "version": "0.2.7",
3
+ "version": "0.2.8",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"