@hublo/mstaff-client-sdk 0.2.65 → 0.2.66

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/core.cjs +1 -1
  2. package/dist/core.js +165 -164
  3. package/package.json +1 -1
package/dist/core.cjs CHANGED
@@ -3,4 +3,4 @@
3
3
  * Copyright(c) 2012-2014 Roman Shtylman
4
4
  * Copyright(c) 2015 Douglas Christopher Wilson
5
5
  * MIT Licensed
6
- */var ae=Xe,te=Ye,Ze=Object.prototype.toString,x=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function Xe(e,t){if(typeof e!="string")throw new TypeError("argument str must be a string");for(var i={},n=t||{},s=n.decode||et,c=0;c<e.length;){var l=e.indexOf("=",c);if(l===-1)break;var m=e.indexOf(";",c);if(m===-1)m=e.length;else if(m<l){c=e.lastIndexOf(";",l-1)+1;continue}var u=e.slice(c,l).trim();if(i[u]===void 0){var r=e.slice(l+1,m).trim();r.charCodeAt(0)===34&&(r=r.slice(1,-1)),i[u]=it(r,s)}c=m+1}return i}function Ye(e,t,i){var n=i||{},s=n.encode||tt;if(typeof s!="function")throw new TypeError("option encode is invalid");if(!x.test(e))throw new TypeError("argument name is invalid");var c=s(t);if(c&&!x.test(c))throw new TypeError("argument val is invalid");var l=e+"="+c;if(n.maxAge!=null){var m=n.maxAge-0;if(isNaN(m)||!isFinite(m))throw new TypeError("option maxAge is invalid");l+="; Max-Age="+Math.floor(m)}if(n.domain){if(!x.test(n.domain))throw new TypeError("option domain is invalid");l+="; Domain="+n.domain}if(n.path){if(!x.test(n.path))throw new TypeError("option path is invalid");l+="; Path="+n.path}if(n.expires){var u=n.expires;if(!nt(u)||isNaN(u.valueOf()))throw new TypeError("option expires is invalid");l+="; Expires="+u.toUTCString()}if(n.httpOnly&&(l+="; HttpOnly"),n.secure&&(l+="; Secure"),n.partitioned&&(l+="; Partitioned"),n.priority){var r=typeof n.priority=="string"?n.priority.toLowerCase():n.priority;switch(r){case"low":l+="; Priority=Low";break;case"medium":l+="; Priority=Medium";break;case"high":l+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(n.sameSite){var a=typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite;switch(a){case!0:l+="; SameSite=Strict";break;case"lax":l+="; SameSite=Lax";break;case"strict":l+="; SameSite=Strict";break;case"none":l+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return l}function et(e){return e.indexOf("%")!==-1?decodeURIComponent(e):e}function tt(e){return encodeURIComponent(e)}function nt(e){return Ze.call(e)==="[object Date]"||e instanceof Date}function it(e,t){try{return t(e)}catch{return e}}function st(){const e=typeof global>"u"?void 0:global.TEST_HAS_DOCUMENT_COOKIE;return typeof e=="boolean"?e:typeof document=="object"&&typeof document.cookie=="string"}function rt(e){return typeof e=="string"?ae(e):typeof e=="object"&&e!==null?e:{}}function H(e,t={}){const i=ot(e);if(!t.doNotParse)try{return JSON.parse(i)}catch{}return e}function ot(e){return e&&e[0]==="j"&&e[1]===":"?e.substr(2):e}class at{constructor(t,i={}){this.changeListeners=[],this.HAS_DOCUMENT_COOKIE=!1,this.update=()=>{if(!this.HAS_DOCUMENT_COOKIE)return;const s=this.cookies;this.cookies=ae(document.cookie),this._checkChanges(s)};const n=typeof document>"u"?"":document.cookie;this.cookies=rt(t||n),this.defaultSetOptions=i,this.HAS_DOCUMENT_COOKIE=st()}_emitChange(t){for(let i=0;i<this.changeListeners.length;++i)this.changeListeners[i](t)}_checkChanges(t){new Set(Object.keys(t).concat(Object.keys(this.cookies))).forEach(n=>{t[n]!==this.cookies[n]&&this._emitChange({name:n,value:H(this.cookies[n])})})}_startPolling(){this.pollingInterval=setInterval(this.update,300)}_stopPolling(){this.pollingInterval&&clearInterval(this.pollingInterval)}get(t,i={}){return i.doNotUpdate||this.update(),H(this.cookies[t],i)}getAll(t={}){t.doNotUpdate||this.update();const i={};for(let n in this.cookies)i[n]=H(this.cookies[n],t);return i}set(t,i,n){n?n=Object.assign(Object.assign({},this.defaultSetOptions),n):n=this.defaultSetOptions;const s=typeof i=="string"?i:JSON.stringify(i);this.cookies=Object.assign(Object.assign({},this.cookies),{[t]:s}),this.HAS_DOCUMENT_COOKIE&&(document.cookie=te(t,s,n)),this._emitChange({name:t,value:i,options:n})}remove(t,i){const n=i=Object.assign(Object.assign(Object.assign({},this.defaultSetOptions),i),{expires:new Date(1970,1,1,0,0,1),maxAge:0});this.cookies=Object.assign({},this.cookies),delete this.cookies[t],this.HAS_DOCUMENT_COOKIE&&(document.cookie=te(t,"",n)),this._emitChange({name:t,value:void 0,options:i})}addChangeListener(t){this.changeListeners.push(t),this.HAS_DOCUMENT_COOKIE&&this.changeListeners.length===1&&(typeof window=="object"&&"cookieStore"in window?window.cookieStore.addEventListener("change",this.update):this._startPolling())}removeChangeListener(t){const i=this.changeListeners.indexOf(t);i>=0&&this.changeListeners.splice(i,1),this.HAS_DOCUMENT_COOKIE&&this.changeListeners.length===0&&(typeof window=="object"&&"cookieStore"in window?window.cookieStore.removeEventListener("change",this.update):this._stopPolling())}}function ct(e,{doNotParse:t=!1,autoUpdateDependencies:i=!1}={},n=new at){const s=i?[...e||[]]:e;let c=n.getAll({doNotParse:!0});const l=$.ref(0),m=()=>{const u=n.getAll({doNotParse:!0});ut(s||null,u,c)&&l.value++,c=u};return n.addChangeListener(m),Je(()=>{n.removeChangeListener(m)}),{get:(...u)=>(i&&s&&!s.includes(u[0])&&s.push(u[0]),l.value,n.get(u[0],{doNotParse:t,...u[1]})),getAll:(...u)=>(l.value,n.getAll({doNotParse:t,...u[0]})),set:(...u)=>n.set(...u),remove:(...u)=>n.remove(...u),addChangeListener:(...u)=>n.addChangeListener(...u),removeChangeListener:(...u)=>n.removeChangeListener(...u)}}function ut(e,t,i){if(!e)return!0;for(const n of e)if(t[n]!==i[n])return!0;return!1}const lt=()=>{let e=!1;return function(t){(/(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(t)||/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(t.substr(0,4)))&&(e=!0)}(navigator.userAgent||navigator.vendor||window.opera),e},dt=()=>typeof window<"u"&&typeof window.document<"u",T=()=>typeof process<"u"&&process.versions!=null&&process.versions.node!=null,L=(e,t,i)=>{const n=typeof t=="string"?t.split("."):[t];let s=e;const c=m=>m!=null,l=m=>typeof m=="object";for(const[m,u]of n.entries()){if(!c(s))return i;if(m===n.length-1)return c(s[u])?s[u]:i;if(!l(s[u]))return i;s=s[u]}return i},G=(e,t,i)=>{const n=typeof t=="string"?t.split("."):[t],s=m=>typeof m=="number"||/^\d$/g.test(m),c=m=>parseInt(m,10);let l=e;return n.forEach((m,u)=>{if(u===n.length-1)l[m]=i;else{const r=s(n[u+1])?[]:{};m=s(m)?c(m):m,l[m]=l[m]??r,l=l[m]}}),e},ce=e=>{if(typeof e=="object"){if(Array.isArray(e))return[...e];if(Object(e)===e)return{...e}}return e},Z=(e,t)=>{const i={...e};for(const[n,s]of Object.entries(t))n in i&&typeof i[n]=="object"&&typeof s=="object"?i[n]=Z(i[n],s):i[n]=ce(s);return i},mt=e=>typeof e=="boolean",pt=e=>typeof e=="number",ft=e=>typeof e=="string",X=e=>Array.isArray(e),ue=e=>typeof e=="object"&&!X(e)&&e!==null,ht=e=>e instanceof Date,yt=e=>typeof e=="function",le=e=>e===null,de=e=>e===void 0,me=e=>le(e)||de(e),gt=e=>!me(e),bt=e=>!!e,wt=e=>!e,At=(e,t)=>X(e)&&e.every(i=>t(i)),vt=(e,t)=>ue(e)&&Object.values(e).every(i=>t(i)),Rt=e=>e.startsWith("http:")?e.replace("http:","https:"):e,Pt=(e,t=!1)=>e.startsWith("http:")||e.startsWith("https:")?e:t?`https://${e}`:`http://${e}`,pe=()=>typeof window<"u"&&(window!=null&&window.location)?new URL(window.location).hostname:void 0,ne=()=>{const e=pe();return!e||e==="localhost"?e:`.${e}`},kt=()=>({path:"/"}),Et=e=>({path:"/",domain:e,sameSite:"none",secure:!0}),q=e=>{if(!(T()||!e))return e.startsWith("localhost")?kt():Et(e)};function fe(){const e=ct(),t=c=>e.get(c),i=(c,l)=>e.set(c,l,q(ne())),n=c=>{e.remove(c),e.remove(c,q(pe())),e.remove(c,q(ne()))};return{getItem:t,setItem:i,removeItem:n,clear:()=>Object.keys(e.getAll()).forEach(c=>n(c))}}let _=null;function j(e={auth:"token",refresh:"refresh_token",expiration:"token_expiration_date"},t=fe()){if(_)return _;function i(){return t.getItem(e.auth)}function n(){return t.getItem(e.refresh)}function s(){return t.getItem(e.expiration)}function c(f,h){const b=a(f);if(!b.exp)throw new Error("Invalid JWT token.");t.setItem(e.auth,f),t.setItem(e.refresh,h),t.setItem(e.expiration,((b.exp-60)*1e3).toString())}function l(){t.removeItem(e.auth),t.removeItem(e.refresh),t.removeItem(e.expiration)}function m(){return u()&&!r()}function u(){return!!i()}function r(){const f=s();return f?new Date(f)<new Date:!0}function a(f){return JSON.parse(atob(f.split(".")[1]))}function p(){return t}return _={keys:e,getAuthToken:i,getRefreshToken:n,getExpiration:s,authenticate:c,clear:l,isAuthenticated:m,hasAuth:u,isExpired:r,getStorage:p},_}function It(e){let t={"Content-Type":"application/json"};e&&i(e);function i(b,w=!1){return t=w?b:{...t,...b},this}function n(){return t}function s(b,w){return t[b]=w,this}function c(b){return t[b]}function l(b){return t[b]&&delete t[b],this}function m(b){return s("Authorization","Bearer "+b),this}function u(){return l("Authorization"),this}function r(){return!!c("Authorization")}function a(){return s("Content-Type","multipart/form-data"),this}function p(){return s("Content-Type","application/json"),this}function f(){return c("Content-Type")==="multipart/form-data"}function h(){return c("Content-Type")==="application/json"}return{setHeaders:i,getHeaders:n,setHeader:s,getHeader:c,removeHeader:l,setAuthorization:m,removeAuthorization:u,hasAuthorization:r,setFormData:a,setJson:p,isFormData:f,isJson:h}}function Ct(e){let t=null;e&&i(e);function i(s){if(s=s.toLowerCase(),!["get","post","put","patch","delete"].includes(s))throw new Error("Invalid method.");return t=s,this}function n(){return t}return{setMethod:i,getMethod:n}}function St(e,t,i){let n=null;i&&s(i);function s(r){if(!["post","put","patch"].includes(e.getMethod()))throw new Error("Payload can only be set for POST, PUT and PATCH requests.");return r instanceof FormData?t.setFormData():l(r)&&(r=m(r),t.setFormData()),t.isFormData()&&e.getMethod()==="put"&&(e.setMethod("post"),r.append("_method","PUT")),n=r,this}function c(){return n}function l(r){for(const a in r){const p=r[a];if(u(p))return!0;if(typeof p=="object"&&l(p))return!0}return!1}function m(r,a=null,p=0){const f=!a;f&&(a=new FormData);for(const h in r){const b=r[h];u(b)?(r[h]="<<FileIndex:"+p+">>",a.append(p,b,b.name),p++):typeof b=="object"&&(r[h]=m(r[h],a,p))}return f?(a.append("payload",JSON.stringify(r)),a):r}function u(r){return typeof File<"u"&&r instanceof File||typeof Blob<"u"&&r instanceof Blob}return{setPayload:s,getPayload:c}}const E=class E{constructor(t={}){C(this,"level",3);C(this,"logger");C(this,"prefix");this.logger=t.logger||console,this.prefix=t.prefix||""}setLevel(t){this.level=t}debug(...t){this.level<=E.LEVEL_DEBUG&&B(this.logger.debug,this.prefix,t)}info(...t){this.level<=E.LEVEL_INFO&&B(this.logger.info,this.prefix,t)}warn(...t){this.level<=E.LEVEL_WARN&&B(this.logger.warn,this.prefix,t)}error(...t){this.level<=E.LEVEL_ERROR&&B(this.logger.error,this.prefix,t)}};C(E,"LEVEL_DEBUG",0),C(E,"LEVEL_INFO",1),C(E,"LEVEL_WARN",2),C(E,"LEVEL_ERROR",3),C(E,"LEVEL_OFF",4);let F=E;const B=(e,t,i)=>{t?e(t,...i):e(...i)},A=new F({prefix:"[SDK]"});let he=null,ye=null,ge=null,be="/",we=null;const Ot=()=>he,Tt=e=>{if(A.info("[Config] Environment:",e),!e)throw new Error("Invalid environment.");he=e},Lt=()=>ye,$t=e=>{if(A.info("[Config] API Host:",e),!e)throw new Error("Invalid API host.");ye=e},Mt=()=>we,Nt=e=>{we=e},Dt=()=>ge,jt=e=>{if(A.info("[Config] Main App Host:",e),!e)throw new Error("Invalid main app host.");ge=e},xt=e=>{A.info("[Config] Base Assets Urls:",e),be=e},_t=()=>be,O={getEnvironment:Ot,getApiHost:Lt,getErrorHandler:Mt,setEnvironment:Tt,setApiHost:$t,setErrorHandler:Nt,getMainAppHost:Dt,setMainAppHost:jt,setBaseAssetsUrl:xt,getBaseAssetsUrl:_t};function Bt(e){const t=O.getApiHost().replace(/\/$/g,"");let i=null,n={},s={};e&&m(e);function c(){return t+u()+h()}function l(){return u(!0,!0)}function m(d){return i="/"+d.replace(/^\//g,""),this}function u(d=!0,P=!1){return d?i.replace(/:(\w+)/g,(k,I)=>P?"*":s[I]||":"+I):i}function r(d){return n=d,this}function a(d,P){return n[d]=P,this}function p(d){return n[d]&&delete n[d],this}function f(){return Object.keys(n).length>0}function h(d=!0){if(!f())return"";let P="";for(const k in n)if(Array.isArray(n[k]))for(const I of n[k])P+=(P.length?"&":"")+`${k}[]=`+I;else P+=(P.length?"&":"")+k+"="+n[k];return(d?"?":"")+P}function b(d){return s=d,this}function w(d,P){return s[d]=P,this}function S(d){return s[d]&&delete s[d],this}return{setPath:m,getPath:u,getUri:c,getMockUri:l,setQueryParams:r,setQueryParam:a,removeQueryParam:p,hasQuery:f,getQueryString:h,setRouteParams:b,setRouteParam:w,removeRouteParam:S}}function Ut(e){let t=[];function i(){return t=r(arguments),l(),this}function n(){return t.length>0}function s(a){return t.includes(a.trim())?this:(t.push(a.trim()),l(),this)}function c(a){const p=t.indexOf(a.trim());return p===-1?this:(t.splice(p,1),l(),this)}function l(){t.length?e.setQueryParam("groups",u(t)):e.removeQueryParam("groups")}function m(a){return a.split(",").map(p=>p.trim())}function u(a){return a.join(",")}function r(a){let p=[];return a.length===1?typeof a[0]=="string"?p=m(a[0]):Array.isArray(a[0])&&(p=a[0]):p=Array.from(a),p}return{setGroups:i,hasGroups:n,addGroup:s,removeGroup:c}}function zt(e){let t=!1,i=!1,n=1,s=10;function c(){return t=!0,l(),this}function l(){i=!0;const h=f(arguments);return r(h.page||1,!1),a(h.perPage||s,!1),p(),this}function m(){return i=!1,p(),this}function u(){return i}function r(h,b=!0){return t=!0,i=!0,n=h,b&&p(),this}function a(h,b=!0){return t=!0,i=!0,s=h,b&&p(),this}function p(){t?u()?(e.removeQueryParam("pagination"),e.setQueryParam("page",n),e.setQueryParam("nbResultPerPage",s)):(e.removeQueryParam("page"),e.removeQueryParam("nbResultPerPage"),e.setQueryParam("pagination","false")):(e.removeQueryParam("page"),e.removeQueryParam("nbResultPerPage"),e.removeQueryParam("pagination"))}function f(h){if(h.length===1&&typeof h[0]=="object")return h[0];const b={};return h.length>=1&&(b.page=h[0]),h.length>=2&&(b.perPage=h[1]),b}return{isList:c,paginate:l,disablePagination:m,hasPagination:u,setPage:r,setPerPage:a}}function Ft(e){let t=!1,i="id",n="ASC";function s(){t=!0;const a=r(arguments);return a.orderBy&&l(a.orderBy,!1),a.orderDir&&m(a.orderDir,!1),u(),this}function c(){return t}function l(a,p=!0){return t=!0,i=a,p&&u(),this}function m(a,p=!0){if(a=a.toUpperCase(),["ASC","DESC"].indexOf(a)===-1)throw new Error("Invalid order direction");return t=!0,n=a,p&&u(),this}function u(){c()&&(e.setQueryParam("orderBy",i),e.setQueryParam("orderDirection",n))}function r(a){if(a.length===1&&typeof a[0]=="object")return a[0];const p={};return a.length>=1&&(p.orderBy=a[0]),a.length>=2&&(p.orderDir=a[1]),p}return{setOrder:s,hasOrder:c,setOrderBy:l,setOrderDir:m}}function Vt(){let e=!1;function t(){return e=!0,this}function i(){return e}return{setSilent:t,isSilent:i}}function Ht(){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 i(){return e}return{setResponseType:t,getResponseType:i}}function qt(e){function t(){return e}function i(){return e.data}function n(){return e.data}return{getResponse:t,getData:i,getPayload:n}}function Qt(e,t=!1){let i=!1,n=!1;return e.response?(i=!0,n=!0):e.request&&(i=!0),!t&&O.getErrorHandler()&&O.getErrorHandler()(e),{sent:i,responded:n,error:e}}function Gt(e){function t(){return e}function i(){return e.data}function n(){return e.data}function s(){return e.data["@type"]==="hydra:Collection"}function c(){return s()?e.data["hydra:member"]:null}function l(){return s()?e.data["hydra:totalItems"]:null}function m(){return s()?e.data["hydra:view"]&&e.data["hydra:view"]["hydra:last"]:!1}function u(){return!s()||!m()?null:parseInt(e.data["hydra:view"]["@id"].match(/page=(\d+)/)[1])}function r(){return!s()||!m()?null:parseInt(e.data["hydra:view"]["hydra:last"].match(/page=(\d+)/)[1])}return{getResponse:t,getData:i,getPayload:n,isCollection:s,getCollection:c,getTotal:l,hasPagination:m,getPage:u,getPages:r}}function Kt(e,t,i,n,s,c){async function l(){const u=i.getMethod(),r=t.getUri(),a=e.getHeaders(),p=n.getPayload(),f=[r];["post","put","patch"].includes(u)&&f.push(p||{}),f.push({headers:a,responseType:c.getResponseType()}),A.info("[Request] Sending request:",`[${u.toUpperCase()}]`,r);try{const h=await Ge[u](...f);return m(h)}catch(h){throw Qt(h,s.isSilent())}}function m(u){if(u.headers){const r=Object.keys(u.headers),a=r.map(p=>p.toLowerCase()).indexOf("content-type");if(a!==-1&&u.headers[r[a]].includes("application/ld+json"))return Gt(u)}return qt(u)}return{send:l}}function R(e,t="get",i=null){const n=It(),s=Bt(e),c=Ct(t),l=St(c,n,i),m=Ut(s),u=zt(s),r=Ft(s),a=Vt(),p=Ht(),f=Kt(n,s,c,l,a,p);return{...n,...s,...c,...l,...m,...u,...r,...a,...p,...f}}function y(e,t="get",i=null){const n=R(e,t,i),s=j();s.isAuthenticated()&&n.setAuthorization(s.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 Wt=(e,t)=>y("/v2/activity/candidate/:candidateId/establishment/:establishmentId").setRouteParams({candidateId:e,establishmentId:t}),Jt=()=>({listByCandidateAndEstablishment:Wt}),Zt=(e,t,i)=>y("/candidate/:candidateId/share/establishment/:establishmentId").setMethod("post").setRouteParams({candidateId:e,establishmentId:t}).setPayload(i),Xt=(e,t)=>y("/candidate/:candidateId/archive/establishment/:establishmentId").setRouteParams({candidateId:e,establishmentId:t}),Yt=(e,t)=>y("/candidate/:candidateId/archive/establishment/:establishmentId").setMethod("post").setRouteParams({candidateId:e,establishmentId:t}),en=(e,t)=>y("/candidate/:candidateId/archive/establishment/:establishmentId").setMethod("delete").setRouteParams({candidateId:e,establishmentId:t}),tn=(e,t)=>y("/v2/candidates/lookup").setQueryParam("email",e).setQueryParam("establishment-id",t),nn=(e,t)=>y("/v2/candidates").setMethod("post").setQueryParam("establishment-id",e).setPayload(t),sn=(e,t,i)=>y("/v2/candidates/:candidateId").setQueryParam("establishment-id",t).setRouteParams({candidateId:e}).setMethod("put").setPayload(i),rn=e=>y("/candidate/register/close/:registrationToken").setMethod("post").setRouteParams({registrationToken:e}),on=e=>y("/candidate/register/open").setMethod("post").setQueryParam("groups","register:token").setPayload(e),an=(e,t)=>y("/establishment/:establishmentId:/candidate/invitation").setRouteParams({establishmentId:e}).setMethod("post").setPayload(t),cn=()=>({share:Zt,isArchived:Xt,archive:Yt,unarchive:en,lookupCandidate:tn,createCandidate:nn,updateCandidate:sn,closeIncompleteRegistration:rn,openNewRegistration:on,updateInvitation:an}),un=(e,t)=>y("/comment/establishment/:establishmentId/candidate/:userId").setRouteParams({establishmentId:e,userId:t}),ln=(e,t,i)=>y("/comment/establishment/:establishmentId/candidate/:userId").setRouteParams({establishmentId:e,userId:t}).setMethod("post").setPayload(i),dn=(e,t)=>y("/comment/:commentId").setRouteParams({commentId:e}).setMethod("put").setPayload(t),mn=e=>y("/comment/:commentId").setRouteParams({commentId:e}).setMethod("delete"),pn=()=>({getForEstablishmentCandidate:un,postForEstablishmentCandidate:ln,update:dn,remove:mn}),fn=()=>R("contractType").isList().addGroup("Term:id").addGroup("Term:name"),hn=(e,t=!0)=>y("contractType/establishment/:establishmentId").isList().setRouteParams({establishmentId:e}).setQueryParam("all",t).addGroup("Term:id").addGroup("Term:name"),yn=()=>({list:fn,listByEstablishment:hn}),gn=e=>y("/v2/talents").isList().setQueryParam("establishment-id",e),bn=e=>y("/v2/talent/mark-as-seen/:talentId").setRouteParams({talentId:e}).setMethod("post"),wn=()=>({list:gn,markAsSeen:bn}),An=(e,t,i)=>y("/cvtheque/establishment/:establishmentId/candidate/:candidateId/label/synchronize").setRouteParams({establishmentId:e,candidateId:t}).setMethod("post").setPayload(i),vn=()=>({syncCandidateLabels:An}),Rn=()=>R("diploma").isList().addGroup("Term:id").addGroup("Term:name"),Pn=()=>({list:Rn}),kn=e=>y("document/candidate/:candidateId").setRouteParams({candidateId:e}).isList().disablePagination(),En=(e,t)=>y("document/candidate/:candidateId/establishment/:establishmentId/recruiter").setRouteParams({candidateId:e,establishmentId:t}).isList().disablePagination(),In=(e,t)=>y("document/candidate/:candidateId/establishment/:establishmentId/candidate").setRouteParams({candidateId:e,establishmentId:t}).isList().disablePagination(),Cn=e=>y("document/recruiter").setMethod("post").setPayload(e),Sn=e=>y("document/:documentId").setRouteParams({documentId:e}).setMethod("delete"),On=()=>({listByCandidate:kn,listByCandidateAndEstablishmentFromRecruiter:En,listByCandidateAndEstablishmentFromCandidate:In,addFromRecruiter:Cn,remove:Sn}),Tn=(e,t)=>y("/v2/establishments/:establishmentId/email-history").setRouteParams({establishmentId:t}).setQueryParam("receiverId",e).isList().disablePagination(),Ln=()=>({listByCandidateAndEstablishment:Tn}),$n=(e,t)=>y("/email/candidate/:candidateId").setMethod("post").setRouteParams({candidateId:e}).setPayload(t),Mn=(e,t)=>y("/v2/emails/send").setMethod("post").setPayload({recipientIds:e,...t}),Nn=()=>({sendToCandidate:$n,sendToRecipients:Mn}),Dn=(e,t=!0)=>{const i=y("/v2/establishments/:establishmentId/email-templates").setRouteParams({establishmentId:e}).isList().disablePagination();return t&&i.setQueryParam("global",!0),i},jn=()=>y("/v2/self/email-templates").isList().disablePagination(),xn=()=>({listByEstablishment:Dn,listSelf:jn}),_n=(e,t)=>y("establishment-career/:establishmentId/:versionId").setRouteParams({establishmentId:e,versionId:t}),Bn=(e,t="published")=>y("establishment-career/:establishmentId/state/:state").setRouteParams({establishmentId:e,state:t}),Un=(e,t,i=null)=>{const n=i!==null?y("establishment-career/:establishmentId/:versionId").setRouteParams({establishmentId:e,versionId:i}):y("establishment-career/:establishmentId").setRouteParams({establishmentId:e});return n.setMethod("post").setPayload(t),n},zn=(e,t)=>y("establishment-career/:establishmentId/logo-banner").setMethod("post").setRouteParams({establishmentId:e}).setPayload(t),Fn=(e,t,i)=>y("establishment-career/:establishmentId/publish/:versionId").setMethod("post").setRouteParams({establishmentId:e,versionId:t}).setPayload(i),Vn=()=>({readById:_n,readByState:Bn,upsert:Un,uploadLogoAndBanner:zn,publish:Fn}),Hn=e=>R("establishment/:establishmentId").setRouteParams({establishmentId:e}),qn=e=>y("establishment/:establishmentId/authorizations").setRouteParams({establishmentId:e}),Y=()=>({read:Hn,authorizations:qn}),Qn=e=>R("feature-flag/maintenance").setMethod("post").setPayload(e),Gn=(e,t)=>R("feature-flag/establishment").setMethod("post").setPayload({establishment:e,flagName:t}),Kn=()=>({maintenanceModeEnabled:Qn,forEstablishment:Gn}),Wn=()=>R("job").isList().addGroup("Term:id").addGroup("Term:name"),Jn=(e,t=!0)=>y("job/establishment/:establishmentId").isList().setRouteParams({establishmentId:e}).setQueryParam("all",t).addGroup("Term:id").addGroup("Term:name"),Zn=()=>({list:Wn,listByEstablishment:Jn}),Xn=e=>y("/label/establishment/:establishmentId").isList().setRouteParams({establishmentId:e}),Yn=(e,t)=>y("/label/establishment/:establishmentId").setMethod("post").setRouteParams({establishmentId:e}).setPayload(t),ei=(e,t)=>y("/label/:labelId").setMethod("put").setRouteParams({labelId:e}).setPayload(t),ti=e=>y("/label/:labelId").setMethod("delete").setRouteParams({labelId:e}),ni=(e,t,i)=>y("/label/establishment/:establishmentId/candidate/:candidateId/synchronize").setMethod("post").setPayload(i).setRouteParams({establishmentId:e,candidateId:t}),ii=()=>({listByEstablishment:Xn,addToEstablishment:Yn,update:ei,remove:ti,syncForCandidate:ni}),si=e=>R("offer/:offerId").setRouteParams({offerId:e}),ri=()=>({read:si}),oi=(e,t=!1)=>{const i=y("/recruiter/establishment/:establishmentId").isList().setRouteParams({establishmentId:e});return t&&i.setQueryParam("exclude-me",1),i},ai=()=>({listByEstablishment:oi}),ci=e=>y("/recruitment/:recruitmentId").setRouteParams({recruitmentId:e}),ui=e=>y("/recruitment/mine/establishment/:establishmentId").isList().setRouteParams({establishmentId:e}),li=(e,t)=>y("/recruitment/mine/establishment/:establishmentId/has-not/candidate/:candidateId").isList().setRouteParams({establishmentId:e,candidateId:t}),di=(e,t)=>y("/recruitment/mine/establishment/:establishmentId/has/candidate/:candidateId").isList().setRouteParams({establishmentId:e,candidateId:t}),mi=(e,t)=>y("/recruitment/establishment/:establishmentId/has/candidate/:candidateId").isList().setRouteParams({establishmentId:e,candidateId:t}),pi=(e,t)=>y("/recruitment/:recruitmentId/candidate").setMethod("put").setRouteParams({recruitmentId:e}).setPayload(t),fi=(e,t)=>y("/recruitment/:recruitmentId/candidate/:candidateId").setMethod("delete").setRouteParams({recruitmentId:e,candidateId:t}),hi=()=>({read:ci,mineByEstablishment:ui,mineWithoutCandidate:li,mineWithCandidate:di,withCandidate:mi,addCandidates:pi,removeCandidate:fi}),yi=(e,t,i,n=null)=>{const s=R("candidate/register/open").setMethod("post"),c={email:e};return t==="establishment"&&(c.establishmentId=i),t==="offer"&&(c.offerId=i),n&&(c.referer=n),s.setPayload(c),s},gi=(e,t)=>R("candidate/register/update/:token").setMethod("post").setRouteParams({token:e}).setPayload(t),bi=e=>R("candidate/register/read/:token").setRouteParams({token:e}),wi=e=>R("candidate/register/close/:token").setMethod("post").setRouteParams({token:e}),Ai=()=>({open:yi,update:gi,read:bi,close:wi}),vi=(e,t)=>y("/v2/registrations/lookup").setQueryParam("candidate-id",e).setQueryParam("establishment-id",t),Ri=()=>({lookupEstablishment:vi}),Pi=()=>R("speciality").isList().addGroup("Term:id").addGroup("Term:name"),ki=(e,t=!0)=>y("speciality/establishment/:establishmentId").isList().setRouteParams({establishmentId:e}).setQueryParam("all",t).addGroup("Term:id").addGroup("Term:name"),Ei=()=>({list:Pi,listByEstablishment:ki}),Ii=e=>y("/tag/public/establishment/:establishmentId").isList().setRouteParams({establishmentId:e}),Ci=()=>({listByEstablishment:Ii}),Si=(e,t)=>y("/v2/talents/lookup").setQueryParam("candidate-id",e).setQueryParam("establishment-id",t),Oi=e=>y("/v2/talents/index").setMethod("post").setPayload(e),Ti=()=>({lookupTalent:Si,addCandidateToTalentPool:Oi}),Li=e=>R("user/email/isset/:email").setRouteParams({email:e}),$i=()=>y("user/self").addGroup("user:self"),Mi=e=>y("/user/:uuid").setRouteParams({uuid:e}),Ni=e=>R("/user/:uuid").setRouteParams({uuid:e}),Di=e=>y("/user/:id/uuid").setRouteParams({id:e}),ee=()=>({emailExists:Li,self:$i,byUuidPrivate:Mi,byUuid:Ni,fetchUuid:Di});let U;function Ae(){if(U)return U;const e={user:void 0,roles:[],establishments:{}},t=async()=>{if(!j().isAuthenticated())throw new Error("::SDK Authorization:: User not authenticated");const r=(await ee().self().send()).getData();e.user={id:r.id,email:r.email,firstName:r.firstName,lastName:r.lastName,avatar:r.avatar},e.roles=r.roles},i=async r=>{if(!j().isAuthenticated())throw new Error("::SDK Authorization:: User not authenticated");e.establishments[r]=(await Y().authorizations(r).send()).getData()},n=r=>{if(e.user===void 0)throw new Error("::SDK Authorization:: User not fetched");return e.roles.includes(r)};return U={fetchSelf:t,fetchPermission:i,hasRole:n,hasRoleRH:()=>n("ROLE_RH"),hasRoleCandidate:()=>n("ROLE_CANDIDATE"),hasRoleAdmin:()=>n("ROLE_ADMIN"),hasPermission:(r,...a)=>{const p=e.establishments[r];if(p===void 0)throw new Error(`::SDK Authorization:: Permissions not fetched for establishment ${r}`);return a.every(f=>p[f]===!0)},clear:()=>{e.user=void 0,e.roles=[],e.establishments={}}},U}async function ji(e,...t){if(!j().isAuthenticated())throw"ERR_NOT_AUTHENTICATED";const n=Ae();await Promise.all([n.fetchSelf(),n.fetchPermission(e)]);for(let s=0;s<t.length;s++){const c=t[s];if(!n.hasPermission(e,c))throw"ERR_MISSING_PERMISSION"}}const xi=Ke.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 ee().self().send();this.user=t.getData()}},async fetchPermission(e,t){if(!this.establishments[e]||t){const i=await Y().authorizations(e).send();this.establishments[e]=i.getData()}},hasPermission(e,...t){const i=this.establishments[e];return i===void 0?!1:t.every(n=>i[n]===!0)}}});let N=null;function g(){if(N)return N;const e=O.getEnvironment(),t=(()=>e==="prod"||e==="production"?"pPROC7dPoJ7XdxHrwsTQNXCGX79MJjhp":e==="staging"?"823rqOTwVk1ZCWVyBAdLInZ77TcFF0CF":"TMZX6evFnu87JrBHV5qLwHsld5C6hilZ")(),i=!!t,n=e!=="prod"&&e!=="production";let s=null;function c(){return i}function l(){const f=window.analytics=window.analytics||[];if(!f.initialize&&f.invoked)A.error("Segment snippet included twice.");else{f.invoked=!0,f.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on","addSourceMiddleware","addIntegrationMiddleware","setAnonymousId","addDestinationMiddleware"],f.factory=function(h){return function(){if(window.analytics.initialized)return window.analytics[h].apply(window.analytics,arguments);const b=Array.prototype.slice.call(arguments);return b.unshift(h),f.push(b),f}};for(let h=0;h<f.methods.length;h++){const b=f.methods[h];f[b]=f.factory(b)}f.load=function(h,b){const w=document.createElement("script");w.id="analytics-script",w.type="text/javascript",w.async=!0,w.src="https://cdn.segment.com/analytics.js/v1/"+h+"/analytics.min.js",w.onerror=()=>window.dispatchEvent(new Event("analytics-error"));const S=document.getElementsByTagName("script")[0];S.parentNode.insertBefore(w,S),f._loadOptions=b},f._writeKey=t,f.SNIPPET_VERSION="4.16.1",f.load(t),f.page(),f.ready(()=>window.dispatchEvent(new Event("analytics-ready")))}}async function m(){return s!==null||(s=new Promise((f,h)=>{if(!c())return p("Analytics is disabled."),f();if(window.addEventListener("analytics-ready",()=>{p("Analytics script loaded successfully."),f()}),window.addEventListener("analytics-error",()=>{p("Analytics script failed to load. Consider disabling your AdBlocker.",null,"error"),h()}),p("Loading Analytics script."),window.analytics)return f();l()})),s}async function u(f,h){if(!T())try{if(await this.analyticsScriptReady(),p("[identify]",[f,h]),c())return window.analytics.identify(f,h)}catch{p("[identify]",[f,h],"error")}}async function r(f,h,b){if(!T()){typeof b!="object"&&(b={});try{if(await this.analyticsScriptReady(),p("[page]",[f,h,b]),c())return window.analytics.page(f,{category:h,...b})}catch(w){console.log(w),p("[page]",[f,h,b],"error")}}}async function a(f,h,b){if(!T()){typeof b!="object"&&(b={});try{if(await this.analyticsScriptReady(),p("[track]",[f,h,b]),c())return window.analytics.track(f,{category:h,...b})}catch{p("[track]",[f,h,b],"error")}}}function p(f,h=[],b="info"){h||(h=[]),n&&A[b](`::SDK Analytics:: ${f}`,...h)}return N={analyticsScriptReady:m,isEnabled:c,identify:u,page:r,track:a,consoleMessage:p},N}g.destroy=()=>N=null;function ve(){const e="Hubler Application";function t(r){if(!r)throw new Error(`Missing arguments for domain "${e}"`);const a=!!r.offerId;if(a&&!r.recruitmentId)throw new Error(`Missing argument "recruitmentId" for domain "${e}"`);return{companyId:r.establishmentId?r.establishmentId.toString():null,jobOfferId:a?r.offerId.toString():null,recruitmentId:a?r.recruitmentId.toString():null,selections:[a?"Application":"Spontaneous Application"]}}async function i(r){return g().page("Application Authentication Viewed",e,t(r))}async function n(r){return g().page("Application Magic Link Viewed",e,t(r))}async function s(r){return g().page("Application Job Viewed",e,t(r))}async function c(r){return g().page("Application Information Viewed",e,t(r))}async function l(r){return g().page("Application Document Viewed",e,t(r))}async function m(r){return g().page("Application Success Viewed",e,t(r))}async function u(r){if(!r.error)throw new Error(`Missing argument "error" for domain "${e}", event "Application Form Failed"`);return g().track("Application Form Failed",e,{...t(r),error:r.error})}return{applicationAuthenticationViewed:i,applicationMagicLinkViewed:n,applicationJobViewed:s,applicationInformationViewed:c,applicationDocumentViewed:l,applicationSuccessViewed:m,applicationFormFailed:u}}function Re(){const e="Profile";function t(d,P){var I;if(!d)throw new Error(`Missing arguments for domain "${e}"`);const k={companyId:d.companyId?d.companyId.toString():null,hublerId:(I=d.hublerId)==null?void 0:I.toString()};return P&&(k.productId=d.companyId?d.companyId+"_2":null),d.recruitmentId&&(k.recruitmentId=d.recruitmentId.toString()),d.selections&&(k.selections=d.selections),d.institutionId&&(k.institutionId=d.institutionId.map(String)),k}async function i(d){return g().track(d.name,e,t(d.properties),!0)}async function n(d){return g().track(d.name,e,t(d.properties,!0))}async function s(d){return g().track(d.name,e,t(d.properties,!0))}async function c(d){return g().track(d.name,e,t(d.properties,!0))}async function l(d){return g().track(d.name,e,t(d.properties,!0))}async function m(d){return g().track(d.name,e,t(d.properties,!0))}async function u(d){return g().track(d.name,e,t(d.properties,!0))}async function r(d){return g().track(d.name,e,t(d.properties,!0))}async function a(d){return g().track(d.name,e,t(d.properties,!0))}async function p(d){return g().track(d.name,e,t(d.properties,!0))}async function f(d){return g().track(d.name,e,t(d.properties,!0))}async function h(d){return g().track(d.name,e,t(d.properties,!0))}async function b(d){return g().track(d.name,e,t(d.properties,!0))}async function w(d){return g().page(d.name,d.properties.category,t(d.properties,!1))}async function S(d){return g().track(d.name,e,t(d.properties,!1))}return{profileDocumentDeleted:i,profileLabelAdded:n,profileLabelRemoved:s,profileShared:c,profileArchived:l,profileCandidateAdded:m,profileCommentAdded:u,profileDocumentAdded:r,profileDocumentDownloaded:a,profileDocumentRequested:p,profileRecruitmentAdded:f,profileRecruitmentRemoved:h,profileTabSelected:b,profileViewed:w,profileEmailSent:S}}function Pe(){const e="Recruitment";function t(n){if(!n)throw new Error(`Missing arguments for domain "${e}"`);const s={companyId:n.companyId?n.companyId.toString():null};return n.institutionId&&(s.institutionId=[n.institutionId.toString()]),n.origin&&(s.origin=n.origin.toString()),s}async function i(n){return g().track(n.name,e,{...t(n),recruitmentId:n.recruitmentId.toString(),count:parseInt(n.count)})}return{candidateAdded:i}}function ke(){const e="Visual Builder";function t(o,He){if(!o)throw new Error(`Missing arguments for domain "${e}"`);const M={companyId:o.companyId?o.companyId.toString():null};return He&&(M.productId=o.companyId?o.companyId+"_2":null),o.selections&&(M.selections=o.selections),o.error&&(M.error=o.error),o.institutionId&&(M.institutionId=[o.institutionId.toString()]),M}async function i(o){return g().page(o.name,e,t(o.properties,!0))}async function n(o){return g().track(o.name,e,t(o.properties),!0)}async function s(o){return g().track(o.name,e,t(o.properties,!0))}async function c(o){return g().page(o.name,e,t(o.properties,!0))}async function l(o){return g().page(o.name,e,t(o.properties,!0))}async function m(o){return g().track(o.name,e,t(o.properties,!0))}async function u(o){return g().page(o.name,e,t(o.properties,!0))}async function r(o){return g().page(o.name,e,t(o.properties,!0))}async function a(o){return g().page(o.name,e,t(o.properties,!0))}async function p(o){return g().track(o.name,e,t(o.properties,!0))}async function f(o){return g().page(o.name,e,t(o.properties,!0))}async function h(o){return g().page(o.name,e,t(o.properties,!0))}async function b(o){return g().track(o.name,e,t(o.properties,!0))}async function w(o){return g().track(o.name,e,t(o.properties,!0))}async function S(o){return g().page(o.name,e,t(o.properties,!0))}async function d(o){return g().page(o.name,e,t(o.properties,!0))}async function P(o){return g().page(o.name,e,t(o.properties,!0))}async function k(o){return g().page(o.name,e,t(o.properties,!0))}async function I(o){return g().page(o.name,e,t(o.properties,!1))}async function Te(o){return g().track(o.name,e,t(o.properties,!0))}async function Le(o){return g().track(o.name,e,t(o.properties,!0))}async function $e(o){return g().track(o.name,e,t(o.properties,!0))}async function Me(o){return g().track(o.name,e,t(o.properties,!0))}async function Ne(o){return g().track(o.name,e,t(o.properties,!0))}async function De(o){return g().track(o.name,e,t(o.properties,!0))}async function je(o){return g().track(o.name,e,t(o.properties,!0))}async function xe(o){return g().track(o.name,e,t(o.properties,!0))}async function _e(o){return g().track(o.name,e,t(o.properties,!0))}async function Be(o){return g().track(o.name,e,t(o.properties,!0))}async function Ue(o){return g().track(o.name,e,t(o.properties,!0))}async function ze(o){return g().track(o.name,e,t(o.properties,!0))}async function Fe(o){return g().track(o.name,e,t(o.properties,!0))}async function Ve(o){return g().page(o.name,e,t(o.properties,!1))}return{careerSitePreviewViewed:i,careerSitePublished:n,setupBenefitCustomAdded:s,setupBenefitViewed:c,setupCandidateInformationViewed:l,setupContactAdded:m,setupContactViewed:u,setupEditionDoneViewed:r,setupExternalLinkViewed:a,setupImageUploaded:p,setupImageViewed:f,setupLocationViewed:h,setupPresentationContentAdded:b,setupPresentationNewTabAdded:w,setupPresentationViewed:S,setupSettingsDoneViewed:d,setupSocialNetworkViewed:P,setupThemeViewed:k,visualBuilderViewed:I,setupImageUploadFailed:Te,fastCopyLinkClicked:Le,setupBenefitCustomDeleted:$e,setupBenefitCustomEdited:Me,setupContactDeleted:Ne,setupContactEdited:De,setupContactNewClicked:je,setupPresentationContentDeleted:xe,setupPresentationContentDuplicated:_e,setupPresentationContentMoved:Be,setupPresentationTabDeleted:Ue,setupPresentationTabEdited:ze,setupPresentationTabMoved:Fe,setupSEOViewed:Ve}}const ie=Object.freeze(Object.defineProperty({__proto__:null,useAnalyticsHublerApplication:ve,useAnalyticsProfile:Re,useAnalyticsRecruitment:Pe,useAnalyticsVisualBuilder:ke},Symbol.toStringTag,{value:"Module"}));function _i(){function e(i){return g().identify(i.id,{email:i.email,firstName:i.firstname,lastName:i.lastname,createdAt:i.createdAt,type:"Hubler",lang:"fr",medium:t()?"MOBILE_DEVICE":"WEB_BROWSER"})}function t(){let i=!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)))&&(i=!0)}(navigator.userAgent||navigator.vendor||window.opera),i}return{identifyCandidate:e}}let z=null;const Bi=async(e,t)=>{try{return await V(),A.info("[identify]",[e,t]),window.analytics.identify(e,t)}catch{A.error("[identify]",[e,t])}},Ui=async(e,t,i)=>{typeof i!="object"&&(i={});try{return await V(),A.info("[page]",[e,t,i]),window.analytics.page(e,{category:t,...i})}catch{A.error("[page]",[e,t,i])}},zi=async(e,t,i)=>{typeof i!="object"&&(i={});try{return await V(),A.info("[track]",[e,t,i]),window.analytics.track(e,{category:t,...i})}catch{A.error("[track]",[e,t,i])}},K=()=>{const e=O.getEnvironment();return e==="prod"||e==="production"?"pPROC7dPoJ7XdxHrwsTQNXCGX79MJjhp":e==="staging"?"823rqOTwVk1ZCWVyBAdLInZ77TcFF0CF":"TMZX6evFnu87JrBHV5qLwHsld5C6hilZ"},Ee=()=>{const e=window.analytics=window.analytics||[];if(!e.initialize&&e.invoked)A.error("Segment snippet included twice.");else{e.invoked=!0,e.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on","addSourceMiddleware","addIntegrationMiddleware","setAnonymousId","addDestinationMiddleware"],e.factory=function(t){return function(){if(window.analytics.initialized)return window.analytics[t].apply(window.analytics,arguments);const i=Array.prototype.slice.call(arguments);return i.unshift(t),e.push(i),e}};for(let t=0;t<e.methods.length;t++){const i=e.methods[t];e[i]=e.factory(i)}e.load=function(t,i){const n=document.createElement("script");n.id="analytics-script",n.type="text/javascript",n.async=!0,n.src="https://cdn.segment.com/analytics.js/v1/"+t+"/analytics.min.js",n.onerror=()=>window.dispatchEvent(new Event("analytics-error"));const s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(n,s),e._loadOptions=i},e._writeKey=K(),e.SNIPPET_VERSION="4.16.1",e.load(K()),e.page(),e.ready(()=>window.dispatchEvent(new Event("analytics-ready")))}},V=()=>(z!==null||(z=new Promise((e,t)=>{if(window.addEventListener("analytics-ready",()=>{A.info("Analytics script loaded successfully."),e()}),window.addEventListener("analytics-error",()=>{A.error("Analytics script failed to load. Consider disabling your AdBlocker."),t()}),A.info("Loading Analytics script."),window.analytics)return e();Ee()})),z),Fi={key:K,appendScript:Ee,ready:V,identify:Bi,page:Ui,track:zi},Vi="AIzaSyDicyRD6rvVdnicp1tgV0ElazASNGbyyTs";let Ie=!1;const Ce=()=>new Promise(e=>{T()||Ie||window.google&&window.google.maps?e():(window.addEventListener("gmap-ready",()=>e()),Qi())}),Hi=(e,t)=>Ce().then(()=>{T()||qi(e,t)}),qi=(e,t)=>{const i=new window.google.maps.places.Autocomplete(e,{componentRestrictions:{country:["fr","re","yt","gp","mq"]}});window.google.maps.event.addListener(i,"place_changed",()=>{const n=i.getPlace();n.formatted_address&&t&&t(n.formatted_address,n)})},Qi=()=>{window.onGmapScriptReady=()=>{};const e=document.createElement("script");e.src="https://maps.googleapis.com/maps/api/js?key="+Vi+"&libraries=places&callback=onGmapScriptReady",e.async=!0,e.defer=!0,e.onload=()=>window.dispatchEvent(new Event("gmap-ready")),document.body.appendChild(e),Ie=!0},Gi={scriptReady:Ce,autocompleteInput:Hi},Ki={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"}},Wi={fr:Ki};let W=null;const Se=()=>W,Ji=(e={})=>{let t=e.locale||"fr";const i=u=>t=u,n=()=>t,s=Z(Wi,(e==null?void 0:e.messages)||{}),c=(u,r)=>{const a=L(s,`${t}.${u}`);return a?r?Zi(a,r):a:u},l=(u,r)=>{const a=L(s,`${t}.${u}`);return a?Xi(a,r):u};return W={t:c,tNode:l,setLocale:i,getLocale:n,install:u=>{u.config.globalProperties.$t=c,u.config.globalProperties.$tNode=l}},W},Zi=(e,t)=>e?e.replace(/{{ ?([a-zA-Z_.]+) ?}}/g,(i,n)=>L(t,n)):null,Xi=(e,t)=>{if(!e)return null;const i=e.split(/(\{[{%]+[^{}]*[%}]+})/g).filter(n=>n!=="").map(n=>{const s=n.startsWith("{%")&&n.endsWith("%}")?"slot":n.startsWith("{{")&&n.endsWith("}}")?"variable":"text";if(s==="text")return()=>se.text(n);n=n.replace(/[{}%]/g,"").trim();const c=n.match(/^[a-zA-Z_.]+/)[0];n=n.replace(c,"").trim();const l={};return n!==""&&([...n.matchAll(/([a-zA-Z_.]+)(=([a-zA-Z_.]+))?/g)].reduce((r,a)=>(a[3]===void 0?G(r,a[1],L(t,a[1])):G(r,a[1],L(t,a[3])),r),l),[...n.matchAll(/([a-zA-Z_.]+)="([^"]+)"/g)].reduce((r,a)=>{let p=a[2];return new RegExp(/^[0-9]*$/).exec(a[2])?p=parseInt(a[2]):new RegExp(/^(true|false)$/).exec(a[2])&&(p=a[2]==="true"),r[a[1]]=p,r},l)),m=>se[s](c,t,m,l)});return{setup:(n,{slots:s})=>()=>i.map(c=>c(s))}},se={slot:(e,t,i,n)=>$.h("span",{class:"node node--slot"},i[e.trim()](n)),variable:(e,t)=>$.h("span",{class:"node node--variable"},L(t,e.trim())),text:e=>$.h("span",{class:"node node--text"},e)};function Yi(e){const{t}=Se(),i={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,s)=>n===1?t(s?"timeAgo.last-month":"timeAgo.next-month"):`${n} ${t("timeAgo.month",n)}`,year:(n,s)=>n===1?t(s?"timeAgo.last-year":"timeAgo.next-year"):`${n} ${t("timeAgo.year",n)}`,day:(n,s)=>n===1?t(s?"timeAgo.yesterday":"timeAgo.tomorrow"):`${n} ${t("timeAgo.day",n)}`,week:(n,s)=>n===1?t(s?"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 We.useTimeAgo(e,{fullDateFormatter:n=>n.toLocaleDateString(),messages:i})}function es(){let e=null;function t(){return e}function i(){return e.controller}function n(){return"use"+e.controller.charAt(0).toUpperCase()+e.controller.slice(1)+"QSController"}function s(){return e.action}function c(){return e.arguments}function l(){return!!(e&&e.controller&&e.action)}function m(){window.location.search.length!==0&&(e=window.location.search.substring(1).split("&").reduce((u,r)=>{const a=r.split("=");return a[0]==="controller"||a[0]==="action"?u[a[0]]=decodeURIComponent(a[1]):u.arguments[a[0]]=decodeURIComponent(a[1]),u},{controller:null,action:null,arguments:{}}))}return m(),{getParams:t,getController:i,getControllerComposableName:n,getAction:s,getArguments:c,hasAction:l}}function ts(){async function e({domain:n,event:s,...c}){const l="useAnalytics"+n.charAt(0).toUpperCase()+n.slice(1);if(!t(l))throw new Error(`Domain ${n} is not defined`);const m=ie[l]();if(!i(m,s))throw new Error(`Event ${s} is not defined in domain ${n}`);return m[s](c)}function t(n){return!!ie[n]}function i(n,s){return!!n[s]}return{call:e}}const re=Object.freeze(Object.defineProperty({__proto__:null,useAnalyticsQSController:ts},Symbol.toStringTag,{value:"Module"}));function ns(e){if(!e.hasAction())throw new Error("No action found in router");function t(){if(!i())throw new Error(`Controller ${e.getController()} not found`);const s=re[e.getControllerComposableName()]();if(!n(s))throw new Error(`Action ${e.getAction()} not found in controller ${e.getController()}`);return s[e.getAction()](e.getArguments())}function i(){return e.getControllerComposableName()in re}function n(s){return e.getAction()in s}return{dispatch:t}}function is(){let e=!1;function t(s,c,l){n(),l()}function i(s,c,l){if(!e)return e=!0,t(s,c,l);l()}function n(){const s=es();if(!s.hasAction())return;ns(s).dispatch()}return{vueRouterBeforeEach:t,vueRouterBeforeFirst:i,handle:n}}const ss=()=>({getAssetUrl:t=>`${O.getBaseAssetsUrl()}${t}`}),v=()=>O.getMainAppHost(),rs=()=>`${v()}/rh/establishments`,os=e=>`${v()}/rh/establishment/${e}`,as=e=>{var t;return typeof e=="string"?e:typeof e=="object"&&((t=e==null?void 0:e.urls)!=null&&t.display)?e.urls.display:null},cs=()=>`${v()}/rh/dashboard`,us=e=>`${v()}/candidate-invite/establishment/${e}`,ls=(e,t=!1)=>t?`${v()}/cvbank/${e}`:`${v()}/rh/establishment/${e}/cvtheque`,ds=(e,t)=>`${v()}/user-profile/establishment/${e}/user/${t}`,ms=e=>`${v()}/rh/establishment/${e}/recruitment`,ps=(e,t)=>`${v()}/rh/establishment/${e}/recruitment/${t}`,fs=(e,t)=>`${v()}/rh/establishment/${e}/recruitment/${t}/kanban`,hs=e=>`${v()}/rh/establishment/${e}/career-configuration`,ys=(e,t=null)=>t?`${v()}/career-website/${e}/${t}`:`${v()}/career-website/${e}`,gs=(e,t)=>`${v()}/career-website-preview/${e}/${t}`,bs=(e,t=null)=>{const i=v().replace("://",`://${e}.`);return t?`${i}?_version=${t}`:`${i}`},ws=e=>`${v()}/rh/establishment/${e}/stats`,As=e=>`${v()}/rh/establishment/${e}/backoffice`,vs=()=>`${v()}/rh/settings/general`;function Rs(){return{root:v,establishments:rs,establishment:os,img:as,dashboard:cs,candidateInvite:us,cvtheque:ls,userProfile:ds,recruitments:ms,recruitment:ps,recruitmentKanban:fs,career:hs,careerConfig:ys,careerPreview:gs,careerWebsite:bs,statistics:ws,backoffice:As,userSettings:vs}}const oe=new Set;let D,J={ignore:e=>e.startsWith("Ui")};const Q=e=>{if(e!=null&&e.classList){e._cssChecked=!0;for(const t of e.classList)D.has(t)||oe.has(t)||J.ignore(t)||(oe.add(t),A.error(`Undefined CSS class: ${t}`))}},Oe=e=>{var t;for(const i of e)if(i!=null&&i.cssRules&&(i==null?void 0:i.cssRules.length)>0)Oe(i.cssRules);else if(i.selectorText){const n=(t=i.selectorText)==null?void 0:t.match(/\.[\w-]+/g);if(n)for(const s of n)D.add(s.substr(1))}},Ps=(e={})=>{if(D)return D;D=new Set,J={...J,...e},Oe(document.styleSheets),new MutationObserver(i=>{for(const n of i)if(n.type==="childList"&&(n!=null&&n.addedNodes)){for(const s of n.addedNodes)if(!(s.nodeType===3||s.nodeType===8)){Q(s);for(const c of s.querySelectorAll("*"))Q(c)}}else(n==null?void 0:n.attributeName)==="class"&&Q(n.target)}).observe(document,{attributes:!0,childList:!0,subtree:!0})},ks="0.2.64";exports.Analytics=Fi;exports.BaseLogger=F;exports.Gmap=Gi;exports.SDKConfig=O;exports.SDKLogger=A;exports.VERSION=ks;exports._clone=ce;exports._get=L;exports._merge=Z;exports._set=G;exports.createI18n=Ji;exports.ensureScheme=Pt;exports.inBrowser=dt;exports.inNode=T;exports.isArray=X;exports.isArrayOf=At;exports.isBoolean=mt;exports.isDate=ht;exports.isFalsy=wt;exports.isFunction=yt;exports.isMobile=lt;exports.isNotNullOrUndefined=gt;exports.isNull=le;exports.isNullOrUndefined=me;exports.isNumber=pt;exports.isObject=ue;exports.isObjectOf=vt;exports.isString=ft;exports.isTruthy=bt;exports.isUndefined=de;exports.secureScheme=Rt;exports.useActivityRepository=Jt;exports.useAnalyticsHublerApplication=ve;exports.useAnalyticsIdentify=_i;exports.useAnalyticsProfile=Re;exports.useAnalyticsRecruitment=Pe;exports.useAnalyticsVisualBuilder=ke;exports.useAssetUrls=ss;exports.useAuthentication=j;exports.useAuthorization=Ae;exports.useAuthorizationStore=xi;exports.useCanAccessEstablishmentMiddleware=ji;exports.useCandidateRepository=cn;exports.useCommentRepository=pn;exports.useContractTypeRepository=yn;exports.useCookieStorage=fe;exports.useCvbankRepository=wn;exports.useCvthequeRepository=vn;exports.useDiplomaRepository=Pn;exports.useDocumentRepository=On;exports.useDomainUrls=Rs;exports.useEmailHistoryRepository=Ln;exports.useEmailRepository=Nn;exports.useEmailTemplateRepository=xn;exports.useEstablishmentCareerRepository=Vn;exports.useEstablishmentRepository=Y;exports.useFeatureFlagRepository=Kn;exports.useI18n=Se;exports.useJobRepository=Zn;exports.useLabelRepository=ii;exports.useLocaleTimeAgo=Yi;exports.useOfferRepository=ri;exports.usePrivateRequest=y;exports.useQSAction=is;exports.useRecruiterRepository=ai;exports.useRecruitmentRepository=hi;exports.useRegisterRepository=Ai;exports.useRegistrationRepository=Ri;exports.useRequest=R;exports.useSpecialityRepository=Ei;exports.useTagRepository=Ci;exports.useTalentRepository=Ti;exports.useUndefinedCssClasses=Ps;exports.useUserRepository=ee;
6
+ */var ce=Xe,ne=Ye,Ze=Object.prototype.toString,x=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function Xe(e,t){if(typeof e!="string")throw new TypeError("argument str must be a string");for(var i={},n=t||{},s=n.decode||et,c=0;c<e.length;){var l=e.indexOf("=",c);if(l===-1)break;var m=e.indexOf(";",c);if(m===-1)m=e.length;else if(m<l){c=e.lastIndexOf(";",l-1)+1;continue}var u=e.slice(c,l).trim();if(i[u]===void 0){var r=e.slice(l+1,m).trim();r.charCodeAt(0)===34&&(r=r.slice(1,-1)),i[u]=it(r,s)}c=m+1}return i}function Ye(e,t,i){var n=i||{},s=n.encode||tt;if(typeof s!="function")throw new TypeError("option encode is invalid");if(!x.test(e))throw new TypeError("argument name is invalid");var c=s(t);if(c&&!x.test(c))throw new TypeError("argument val is invalid");var l=e+"="+c;if(n.maxAge!=null){var m=n.maxAge-0;if(isNaN(m)||!isFinite(m))throw new TypeError("option maxAge is invalid");l+="; Max-Age="+Math.floor(m)}if(n.domain){if(!x.test(n.domain))throw new TypeError("option domain is invalid");l+="; Domain="+n.domain}if(n.path){if(!x.test(n.path))throw new TypeError("option path is invalid");l+="; Path="+n.path}if(n.expires){var u=n.expires;if(!nt(u)||isNaN(u.valueOf()))throw new TypeError("option expires is invalid");l+="; Expires="+u.toUTCString()}if(n.httpOnly&&(l+="; HttpOnly"),n.secure&&(l+="; Secure"),n.partitioned&&(l+="; Partitioned"),n.priority){var r=typeof n.priority=="string"?n.priority.toLowerCase():n.priority;switch(r){case"low":l+="; Priority=Low";break;case"medium":l+="; Priority=Medium";break;case"high":l+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(n.sameSite){var a=typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite;switch(a){case!0:l+="; SameSite=Strict";break;case"lax":l+="; SameSite=Lax";break;case"strict":l+="; SameSite=Strict";break;case"none":l+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return l}function et(e){return e.indexOf("%")!==-1?decodeURIComponent(e):e}function tt(e){return encodeURIComponent(e)}function nt(e){return Ze.call(e)==="[object Date]"||e instanceof Date}function it(e,t){try{return t(e)}catch{return e}}function st(){const e=typeof global>"u"?void 0:global.TEST_HAS_DOCUMENT_COOKIE;return typeof e=="boolean"?e:typeof document=="object"&&typeof document.cookie=="string"}function rt(e){return typeof e=="string"?ce(e):typeof e=="object"&&e!==null?e:{}}function H(e,t={}){const i=ot(e);if(!t.doNotParse)try{return JSON.parse(i)}catch{}return e}function ot(e){return e&&e[0]==="j"&&e[1]===":"?e.substr(2):e}class at{constructor(t,i={}){this.changeListeners=[],this.HAS_DOCUMENT_COOKIE=!1,this.update=()=>{if(!this.HAS_DOCUMENT_COOKIE)return;const s=this.cookies;this.cookies=ce(document.cookie),this._checkChanges(s)};const n=typeof document>"u"?"":document.cookie;this.cookies=rt(t||n),this.defaultSetOptions=i,this.HAS_DOCUMENT_COOKIE=st()}_emitChange(t){for(let i=0;i<this.changeListeners.length;++i)this.changeListeners[i](t)}_checkChanges(t){new Set(Object.keys(t).concat(Object.keys(this.cookies))).forEach(n=>{t[n]!==this.cookies[n]&&this._emitChange({name:n,value:H(this.cookies[n])})})}_startPolling(){this.pollingInterval=setInterval(this.update,300)}_stopPolling(){this.pollingInterval&&clearInterval(this.pollingInterval)}get(t,i={}){return i.doNotUpdate||this.update(),H(this.cookies[t],i)}getAll(t={}){t.doNotUpdate||this.update();const i={};for(let n in this.cookies)i[n]=H(this.cookies[n],t);return i}set(t,i,n){n?n=Object.assign(Object.assign({},this.defaultSetOptions),n):n=this.defaultSetOptions;const s=typeof i=="string"?i:JSON.stringify(i);this.cookies=Object.assign(Object.assign({},this.cookies),{[t]:s}),this.HAS_DOCUMENT_COOKIE&&(document.cookie=ne(t,s,n)),this._emitChange({name:t,value:i,options:n})}remove(t,i){const n=i=Object.assign(Object.assign(Object.assign({},this.defaultSetOptions),i),{expires:new Date(1970,1,1,0,0,1),maxAge:0});this.cookies=Object.assign({},this.cookies),delete this.cookies[t],this.HAS_DOCUMENT_COOKIE&&(document.cookie=ne(t,"",n)),this._emitChange({name:t,value:void 0,options:i})}addChangeListener(t){this.changeListeners.push(t),this.HAS_DOCUMENT_COOKIE&&this.changeListeners.length===1&&(typeof window=="object"&&"cookieStore"in window?window.cookieStore.addEventListener("change",this.update):this._startPolling())}removeChangeListener(t){const i=this.changeListeners.indexOf(t);i>=0&&this.changeListeners.splice(i,1),this.HAS_DOCUMENT_COOKIE&&this.changeListeners.length===0&&(typeof window=="object"&&"cookieStore"in window?window.cookieStore.removeEventListener("change",this.update):this._stopPolling())}}function ct(e,{doNotParse:t=!1,autoUpdateDependencies:i=!1}={},n=new at){const s=i?[...e||[]]:e;let c=n.getAll({doNotParse:!0});const l=$.ref(0),m=()=>{const u=n.getAll({doNotParse:!0});ut(s||null,u,c)&&l.value++,c=u};return n.addChangeListener(m),Je(()=>{n.removeChangeListener(m)}),{get:(...u)=>(i&&s&&!s.includes(u[0])&&s.push(u[0]),l.value,n.get(u[0],{doNotParse:t,...u[1]})),getAll:(...u)=>(l.value,n.getAll({doNotParse:t,...u[0]})),set:(...u)=>n.set(...u),remove:(...u)=>n.remove(...u),addChangeListener:(...u)=>n.addChangeListener(...u),removeChangeListener:(...u)=>n.removeChangeListener(...u)}}function ut(e,t,i){if(!e)return!0;for(const n of e)if(t[n]!==i[n])return!0;return!1}const lt=()=>{let e=!1;return function(t){(/(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(t)||/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(t.substr(0,4)))&&(e=!0)}(navigator.userAgent||navigator.vendor||window.opera),e},dt=()=>typeof window<"u"&&typeof window.document<"u",T=()=>typeof process<"u"&&process.versions!=null&&process.versions.node!=null,L=(e,t,i)=>{const n=typeof t=="string"?t.split("."):[t];let s=e;const c=m=>m!=null,l=m=>typeof m=="object";for(const[m,u]of n.entries()){if(!c(s))return i;if(m===n.length-1)return c(s[u])?s[u]:i;if(!l(s[u]))return i;s=s[u]}return i},G=(e,t,i)=>{const n=typeof t=="string"?t.split("."):[t],s=m=>typeof m=="number"||/^\d$/g.test(m),c=m=>parseInt(m,10);let l=e;return n.forEach((m,u)=>{if(u===n.length-1)l[m]=i;else{const r=s(n[u+1])?[]:{};m=s(m)?c(m):m,l[m]=l[m]??r,l=l[m]}}),e},ue=e=>{if(typeof e=="object"){if(Array.isArray(e))return[...e];if(Object(e)===e)return{...e}}return e},Z=(e,t)=>{const i={...e};for(const[n,s]of Object.entries(t))n in i&&typeof i[n]=="object"&&typeof s=="object"?i[n]=Z(i[n],s):i[n]=ue(s);return i},mt=e=>typeof e=="boolean",pt=e=>typeof e=="number",ft=e=>typeof e=="string",X=e=>Array.isArray(e),Y=e=>typeof e=="object"&&!X(e)&&e!==null,ht=e=>e instanceof Date,yt=e=>typeof e=="function",le=e=>e===null,de=e=>e===void 0,me=e=>le(e)||de(e),gt=e=>!me(e),bt=e=>!!e,wt=e=>!e,At=(e,t)=>X(e)&&e.every(i=>t(i)),vt=(e,t)=>Y(e)&&Object.values(e).every(i=>t(i)),Rt=(e,t)=>Y(e)&&Object.entries(t).every(([i,n])=>n(e[i])),Pt=e=>e.startsWith("http:")?e.replace("http:","https:"):e,kt=(e,t=!1)=>e.startsWith("http:")||e.startsWith("https:")?e:t?`https://${e}`:`http://${e}`,pe=()=>typeof window<"u"&&(window!=null&&window.location)?new URL(window.location).hostname:void 0,ie=()=>{const e=pe();return!e||e==="localhost"?e:`.${e}`},Et=()=>({path:"/"}),It=e=>({path:"/",domain:e,sameSite:"none",secure:!0}),q=e=>{if(!(T()||!e))return e.startsWith("localhost")?Et():It(e)};function fe(){const e=ct(),t=c=>e.get(c),i=(c,l)=>e.set(c,l,q(ie())),n=c=>{e.remove(c),e.remove(c,q(pe())),e.remove(c,q(ie()))};return{getItem:t,setItem:i,removeItem:n,clear:()=>Object.keys(e.getAll()).forEach(c=>n(c))}}let _=null;function j(e={auth:"token",refresh:"refresh_token",expiration:"token_expiration_date"},t=fe()){if(_)return _;function i(){return t.getItem(e.auth)}function n(){return t.getItem(e.refresh)}function s(){return t.getItem(e.expiration)}function c(f,h){const b=a(f);if(!b.exp)throw new Error("Invalid JWT token.");t.setItem(e.auth,f),t.setItem(e.refresh,h),t.setItem(e.expiration,((b.exp-60)*1e3).toString())}function l(){t.removeItem(e.auth),t.removeItem(e.refresh),t.removeItem(e.expiration)}function m(){return u()&&!r()}function u(){return!!i()}function r(){const f=s();return f?new Date(f)<new Date:!0}function a(f){return JSON.parse(atob(f.split(".")[1]))}function p(){return t}return _={keys:e,getAuthToken:i,getRefreshToken:n,getExpiration:s,authenticate:c,clear:l,isAuthenticated:m,hasAuth:u,isExpired:r,getStorage:p},_}function Ct(e){let t={"Content-Type":"application/json"};e&&i(e);function i(b,w=!1){return t=w?b:{...t,...b},this}function n(){return t}function s(b,w){return t[b]=w,this}function c(b){return t[b]}function l(b){return t[b]&&delete t[b],this}function m(b){return s("Authorization","Bearer "+b),this}function u(){return l("Authorization"),this}function r(){return!!c("Authorization")}function a(){return s("Content-Type","multipart/form-data"),this}function p(){return s("Content-Type","application/json"),this}function f(){return c("Content-Type")==="multipart/form-data"}function h(){return c("Content-Type")==="application/json"}return{setHeaders:i,getHeaders:n,setHeader:s,getHeader:c,removeHeader:l,setAuthorization:m,removeAuthorization:u,hasAuthorization:r,setFormData:a,setJson:p,isFormData:f,isJson:h}}function St(e){let t=null;e&&i(e);function i(s){if(s=s.toLowerCase(),!["get","post","put","patch","delete"].includes(s))throw new Error("Invalid method.");return t=s,this}function n(){return t}return{setMethod:i,getMethod:n}}function Ot(e,t,i){let n=null;i&&s(i);function s(r){if(!["post","put","patch"].includes(e.getMethod()))throw new Error("Payload can only be set for POST, PUT and PATCH requests.");return r instanceof FormData?t.setFormData():l(r)&&(r=m(r),t.setFormData()),t.isFormData()&&e.getMethod()==="put"&&(e.setMethod("post"),r.append("_method","PUT")),n=r,this}function c(){return n}function l(r){for(const a in r){const p=r[a];if(u(p))return!0;if(typeof p=="object"&&l(p))return!0}return!1}function m(r,a=null,p=0){const f=!a;f&&(a=new FormData);for(const h in r){const b=r[h];u(b)?(r[h]="<<FileIndex:"+p+">>",a.append(p,b,b.name),p++):typeof b=="object"&&(r[h]=m(r[h],a,p))}return f?(a.append("payload",JSON.stringify(r)),a):r}function u(r){return typeof File<"u"&&r instanceof File||typeof Blob<"u"&&r instanceof Blob}return{setPayload:s,getPayload:c}}const E=class E{constructor(t={}){C(this,"level",3);C(this,"logger");C(this,"prefix");this.logger=t.logger||console,this.prefix=t.prefix||""}setLevel(t){this.level=t}debug(...t){this.level<=E.LEVEL_DEBUG&&B(this.logger.debug,this.prefix,t)}info(...t){this.level<=E.LEVEL_INFO&&B(this.logger.info,this.prefix,t)}warn(...t){this.level<=E.LEVEL_WARN&&B(this.logger.warn,this.prefix,t)}error(...t){this.level<=E.LEVEL_ERROR&&B(this.logger.error,this.prefix,t)}};C(E,"LEVEL_DEBUG",0),C(E,"LEVEL_INFO",1),C(E,"LEVEL_WARN",2),C(E,"LEVEL_ERROR",3),C(E,"LEVEL_OFF",4);let F=E;const B=(e,t,i)=>{t?e(t,...i):e(...i)},A=new F({prefix:"[SDK]"});let he=null,ye=null,ge=null,be="/",we=null;const Tt=()=>he,Lt=e=>{if(A.info("[Config] Environment:",e),!e)throw new Error("Invalid environment.");he=e},$t=()=>ye,Mt=e=>{if(A.info("[Config] API Host:",e),!e)throw new Error("Invalid API host.");ye=e},Nt=()=>we,Dt=e=>{we=e},jt=()=>ge,xt=e=>{if(A.info("[Config] Main App Host:",e),!e)throw new Error("Invalid main app host.");ge=e},_t=e=>{A.info("[Config] Base Assets Urls:",e),be=e},Bt=()=>be,O={getEnvironment:Tt,getApiHost:$t,getErrorHandler:Nt,setEnvironment:Lt,setApiHost:Mt,setErrorHandler:Dt,getMainAppHost:jt,setMainAppHost:xt,setBaseAssetsUrl:_t,getBaseAssetsUrl:Bt};function Ut(e){const t=O.getApiHost().replace(/\/$/g,"");let i=null,n={},s={};e&&m(e);function c(){return t+u()+h()}function l(){return u(!0,!0)}function m(d){return i="/"+d.replace(/^\//g,""),this}function u(d=!0,P=!1){return d?i.replace(/:(\w+)/g,(k,I)=>P?"*":s[I]||":"+I):i}function r(d){return n=d,this}function a(d,P){return n[d]=P,this}function p(d){return n[d]&&delete n[d],this}function f(){return Object.keys(n).length>0}function h(d=!0){if(!f())return"";let P="";for(const k in n)if(Array.isArray(n[k]))for(const I of n[k])P+=(P.length?"&":"")+`${k}[]=`+I;else P+=(P.length?"&":"")+k+"="+n[k];return(d?"?":"")+P}function b(d){return s=d,this}function w(d,P){return s[d]=P,this}function S(d){return s[d]&&delete s[d],this}return{setPath:m,getPath:u,getUri:c,getMockUri:l,setQueryParams:r,setQueryParam:a,removeQueryParam:p,hasQuery:f,getQueryString:h,setRouteParams:b,setRouteParam:w,removeRouteParam:S}}function zt(e){let t=[];function i(){return t=r(arguments),l(),this}function n(){return t.length>0}function s(a){return t.includes(a.trim())?this:(t.push(a.trim()),l(),this)}function c(a){const p=t.indexOf(a.trim());return p===-1?this:(t.splice(p,1),l(),this)}function l(){t.length?e.setQueryParam("groups",u(t)):e.removeQueryParam("groups")}function m(a){return a.split(",").map(p=>p.trim())}function u(a){return a.join(",")}function r(a){let p=[];return a.length===1?typeof a[0]=="string"?p=m(a[0]):Array.isArray(a[0])&&(p=a[0]):p=Array.from(a),p}return{setGroups:i,hasGroups:n,addGroup:s,removeGroup:c}}function Ft(e){let t=!1,i=!1,n=1,s=10;function c(){return t=!0,l(),this}function l(){i=!0;const h=f(arguments);return r(h.page||1,!1),a(h.perPage||s,!1),p(),this}function m(){return i=!1,p(),this}function u(){return i}function r(h,b=!0){return t=!0,i=!0,n=h,b&&p(),this}function a(h,b=!0){return t=!0,i=!0,s=h,b&&p(),this}function p(){t?u()?(e.removeQueryParam("pagination"),e.setQueryParam("page",n),e.setQueryParam("nbResultPerPage",s)):(e.removeQueryParam("page"),e.removeQueryParam("nbResultPerPage"),e.setQueryParam("pagination","false")):(e.removeQueryParam("page"),e.removeQueryParam("nbResultPerPage"),e.removeQueryParam("pagination"))}function f(h){if(h.length===1&&typeof h[0]=="object")return h[0];const b={};return h.length>=1&&(b.page=h[0]),h.length>=2&&(b.perPage=h[1]),b}return{isList:c,paginate:l,disablePagination:m,hasPagination:u,setPage:r,setPerPage:a}}function Vt(e){let t=!1,i="id",n="ASC";function s(){t=!0;const a=r(arguments);return a.orderBy&&l(a.orderBy,!1),a.orderDir&&m(a.orderDir,!1),u(),this}function c(){return t}function l(a,p=!0){return t=!0,i=a,p&&u(),this}function m(a,p=!0){if(a=a.toUpperCase(),["ASC","DESC"].indexOf(a)===-1)throw new Error("Invalid order direction");return t=!0,n=a,p&&u(),this}function u(){c()&&(e.setQueryParam("orderBy",i),e.setQueryParam("orderDirection",n))}function r(a){if(a.length===1&&typeof a[0]=="object")return a[0];const p={};return a.length>=1&&(p.orderBy=a[0]),a.length>=2&&(p.orderDir=a[1]),p}return{setOrder:s,hasOrder:c,setOrderBy:l,setOrderDir:m}}function Ht(){let e=!1;function t(){return e=!0,this}function i(){return e}return{setSilent:t,isSilent:i}}function qt(){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 i(){return e}return{setResponseType:t,getResponseType:i}}function Qt(e){function t(){return e}function i(){return e.data}function n(){return e.data}return{getResponse:t,getData:i,getPayload:n}}function Gt(e,t=!1){let i=!1,n=!1;return e.response?(i=!0,n=!0):e.request&&(i=!0),!t&&O.getErrorHandler()&&O.getErrorHandler()(e),{sent:i,responded:n,error:e}}function Kt(e){function t(){return e}function i(){return e.data}function n(){return e.data}function s(){return e.data["@type"]==="hydra:Collection"}function c(){return s()?e.data["hydra:member"]:null}function l(){return s()?e.data["hydra:totalItems"]:null}function m(){return s()?e.data["hydra:view"]&&e.data["hydra:view"]["hydra:last"]:!1}function u(){return!s()||!m()?null:parseInt(e.data["hydra:view"]["@id"].match(/page=(\d+)/)[1])}function r(){return!s()||!m()?null:parseInt(e.data["hydra:view"]["hydra:last"].match(/page=(\d+)/)[1])}return{getResponse:t,getData:i,getPayload:n,isCollection:s,getCollection:c,getTotal:l,hasPagination:m,getPage:u,getPages:r}}function Wt(e,t,i,n,s,c){async function l(){const u=i.getMethod(),r=t.getUri(),a=e.getHeaders(),p=n.getPayload(),f=[r];["post","put","patch"].includes(u)&&f.push(p||{}),f.push({headers:a,responseType:c.getResponseType()}),A.info("[Request] Sending request:",`[${u.toUpperCase()}]`,r);try{const h=await Ge[u](...f);return m(h)}catch(h){throw Gt(h,s.isSilent())}}function m(u){if(u.headers){const r=Object.keys(u.headers),a=r.map(p=>p.toLowerCase()).indexOf("content-type");if(a!==-1&&u.headers[r[a]].includes("application/ld+json"))return Kt(u)}return Qt(u)}return{send:l}}function R(e,t="get",i=null){const n=Ct(),s=Ut(e),c=St(t),l=Ot(c,n,i),m=zt(s),u=Ft(s),r=Vt(s),a=Ht(),p=qt(),f=Wt(n,s,c,l,a,p);return{...n,...s,...c,...l,...m,...u,...r,...a,...p,...f}}function y(e,t="get",i=null){const n=R(e,t,i),s=j();s.isAuthenticated()&&n.setAuthorization(s.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 Jt=(e,t)=>y("/v2/activity/candidate/:candidateId/establishment/:establishmentId").setRouteParams({candidateId:e,establishmentId:t}),Zt=()=>({listByCandidateAndEstablishment:Jt}),Xt=(e,t,i)=>y("/candidate/:candidateId/share/establishment/:establishmentId").setMethod("post").setRouteParams({candidateId:e,establishmentId:t}).setPayload(i),Yt=(e,t)=>y("/candidate/:candidateId/archive/establishment/:establishmentId").setRouteParams({candidateId:e,establishmentId:t}),en=(e,t)=>y("/candidate/:candidateId/archive/establishment/:establishmentId").setMethod("post").setRouteParams({candidateId:e,establishmentId:t}),tn=(e,t)=>y("/candidate/:candidateId/archive/establishment/:establishmentId").setMethod("delete").setRouteParams({candidateId:e,establishmentId:t}),nn=(e,t)=>y("/v2/candidates/lookup").setQueryParam("email",e).setQueryParam("establishment-id",t),sn=(e,t)=>y("/v2/candidates").setMethod("post").setQueryParam("establishment-id",e).setPayload(t),rn=(e,t,i)=>y("/v2/candidates/:candidateId").setQueryParam("establishment-id",t).setRouteParams({candidateId:e}).setMethod("put").setPayload(i),on=e=>y("/candidate/register/close/:registrationToken").setMethod("post").setRouteParams({registrationToken:e}),an=e=>y("/candidate/register/open").setMethod("post").setQueryParam("groups","register:token").setPayload(e),cn=(e,t)=>y("/establishment/:establishmentId:/candidate/invitation").setRouteParams({establishmentId:e}).setMethod("post").setPayload(t),un=()=>({share:Xt,isArchived:Yt,archive:en,unarchive:tn,lookupCandidate:nn,createCandidate:sn,updateCandidate:rn,closeIncompleteRegistration:on,openNewRegistration:an,updateInvitation:cn}),ln=(e,t)=>y("/comment/establishment/:establishmentId/candidate/:userId").setRouteParams({establishmentId:e,userId:t}),dn=(e,t,i)=>y("/comment/establishment/:establishmentId/candidate/:userId").setRouteParams({establishmentId:e,userId:t}).setMethod("post").setPayload(i),mn=(e,t)=>y("/comment/:commentId").setRouteParams({commentId:e}).setMethod("put").setPayload(t),pn=e=>y("/comment/:commentId").setRouteParams({commentId:e}).setMethod("delete"),fn=()=>({getForEstablishmentCandidate:ln,postForEstablishmentCandidate:dn,update:mn,remove:pn}),hn=()=>R("contractType").isList().addGroup("Term:id").addGroup("Term:name"),yn=(e,t=!0)=>y("contractType/establishment/:establishmentId").isList().setRouteParams({establishmentId:e}).setQueryParam("all",t).addGroup("Term:id").addGroup("Term:name"),gn=()=>({list:hn,listByEstablishment:yn}),bn=e=>y("/v2/talents").isList().setQueryParam("establishment-id",e),wn=e=>y("/v2/talent/mark-as-seen/:talentId").setRouteParams({talentId:e}).setMethod("post"),An=()=>({list:bn,markAsSeen:wn}),vn=(e,t,i)=>y("/cvtheque/establishment/:establishmentId/candidate/:candidateId/label/synchronize").setRouteParams({establishmentId:e,candidateId:t}).setMethod("post").setPayload(i),Rn=()=>({syncCandidateLabels:vn}),Pn=()=>R("diploma").isList().addGroup("Term:id").addGroup("Term:name"),kn=()=>({list:Pn}),En=e=>y("document/candidate/:candidateId").setRouteParams({candidateId:e}).isList().disablePagination(),In=(e,t)=>y("document/candidate/:candidateId/establishment/:establishmentId/recruiter").setRouteParams({candidateId:e,establishmentId:t}).isList().disablePagination(),Cn=(e,t)=>y("document/candidate/:candidateId/establishment/:establishmentId/candidate").setRouteParams({candidateId:e,establishmentId:t}).isList().disablePagination(),Sn=e=>y("document/recruiter").setMethod("post").setPayload(e),On=e=>y("document/:documentId").setRouteParams({documentId:e}).setMethod("delete"),Tn=()=>({listByCandidate:En,listByCandidateAndEstablishmentFromRecruiter:In,listByCandidateAndEstablishmentFromCandidate:Cn,addFromRecruiter:Sn,remove:On}),Ln=(e,t)=>y("/v2/establishments/:establishmentId/email-history").setRouteParams({establishmentId:t}).setQueryParam("receiverId",e).isList().disablePagination(),$n=()=>({listByCandidateAndEstablishment:Ln}),Mn=(e,t)=>y("/email/candidate/:candidateId").setMethod("post").setRouteParams({candidateId:e}).setPayload(t),Nn=(e,t)=>y("/v2/emails/send").setMethod("post").setPayload({recipientIds:e,...t}),Dn=()=>({sendToCandidate:Mn,sendToRecipients:Nn}),jn=(e,t=!0)=>{const i=y("/v2/establishments/:establishmentId/email-templates").setRouteParams({establishmentId:e}).isList().disablePagination();return t&&i.setQueryParam("global",!0),i},xn=()=>y("/v2/self/email-templates").isList().disablePagination(),_n=()=>({listByEstablishment:jn,listSelf:xn}),Bn=(e,t)=>y("establishment-career/:establishmentId/:versionId").setRouteParams({establishmentId:e,versionId:t}),Un=(e,t="published")=>y("establishment-career/:establishmentId/state/:state").setRouteParams({establishmentId:e,state:t}),zn=(e,t,i=null)=>{const n=i!==null?y("establishment-career/:establishmentId/:versionId").setRouteParams({establishmentId:e,versionId:i}):y("establishment-career/:establishmentId").setRouteParams({establishmentId:e});return n.setMethod("post").setPayload(t),n},Fn=(e,t)=>y("establishment-career/:establishmentId/logo-banner").setMethod("post").setRouteParams({establishmentId:e}).setPayload(t),Vn=(e,t,i)=>y("establishment-career/:establishmentId/publish/:versionId").setMethod("post").setRouteParams({establishmentId:e,versionId:t}).setPayload(i),Hn=()=>({readById:Bn,readByState:Un,upsert:zn,uploadLogoAndBanner:Fn,publish:Vn}),qn=e=>R("establishment/:establishmentId").setRouteParams({establishmentId:e}),Qn=e=>y("establishment/:establishmentId/authorizations").setRouteParams({establishmentId:e}),ee=()=>({read:qn,authorizations:Qn}),Gn=e=>R("feature-flag/maintenance").setMethod("post").setPayload(e),Kn=(e,t)=>R("feature-flag/establishment").setMethod("post").setPayload({establishment:e,flagName:t}),Wn=()=>({maintenanceModeEnabled:Gn,forEstablishment:Kn}),Jn=()=>R("job").isList().addGroup("Term:id").addGroup("Term:name"),Zn=(e,t=!0)=>y("job/establishment/:establishmentId").isList().setRouteParams({establishmentId:e}).setQueryParam("all",t).addGroup("Term:id").addGroup("Term:name"),Xn=()=>({list:Jn,listByEstablishment:Zn}),Yn=e=>y("/label/establishment/:establishmentId").isList().setRouteParams({establishmentId:e}),ei=(e,t)=>y("/label/establishment/:establishmentId").setMethod("post").setRouteParams({establishmentId:e}).setPayload(t),ti=(e,t)=>y("/label/:labelId").setMethod("put").setRouteParams({labelId:e}).setPayload(t),ni=e=>y("/label/:labelId").setMethod("delete").setRouteParams({labelId:e}),ii=(e,t,i)=>y("/label/establishment/:establishmentId/candidate/:candidateId/synchronize").setMethod("post").setPayload(i).setRouteParams({establishmentId:e,candidateId:t}),si=()=>({listByEstablishment:Yn,addToEstablishment:ei,update:ti,remove:ni,syncForCandidate:ii}),ri=e=>R("offer/:offerId").setRouteParams({offerId:e}),oi=()=>({read:ri}),ai=(e,t=!1)=>{const i=y("/recruiter/establishment/:establishmentId").isList().setRouteParams({establishmentId:e});return t&&i.setQueryParam("exclude-me",1),i},ci=()=>({listByEstablishment:ai}),ui=e=>y("/recruitment/:recruitmentId").setRouteParams({recruitmentId:e}),li=e=>y("/recruitment/mine/establishment/:establishmentId").isList().setRouteParams({establishmentId:e}),di=(e,t)=>y("/recruitment/mine/establishment/:establishmentId/has-not/candidate/:candidateId").isList().setRouteParams({establishmentId:e,candidateId:t}),mi=(e,t)=>y("/recruitment/mine/establishment/:establishmentId/has/candidate/:candidateId").isList().setRouteParams({establishmentId:e,candidateId:t}),pi=(e,t)=>y("/recruitment/establishment/:establishmentId/has/candidate/:candidateId").isList().setRouteParams({establishmentId:e,candidateId:t}),fi=(e,t)=>y("/recruitment/:recruitmentId/candidate").setMethod("put").setRouteParams({recruitmentId:e}).setPayload(t),hi=(e,t)=>y("/recruitment/:recruitmentId/candidate/:candidateId").setMethod("delete").setRouteParams({recruitmentId:e,candidateId:t}),yi=()=>({read:ui,mineByEstablishment:li,mineWithoutCandidate:di,mineWithCandidate:mi,withCandidate:pi,addCandidates:fi,removeCandidate:hi}),gi=(e,t,i,n=null)=>{const s=R("candidate/register/open").setMethod("post"),c={email:e};return t==="establishment"&&(c.establishmentId=i),t==="offer"&&(c.offerId=i),n&&(c.referer=n),s.setPayload(c),s},bi=(e,t)=>R("candidate/register/update/:token").setMethod("post").setRouteParams({token:e}).setPayload(t),wi=e=>R("candidate/register/read/:token").setRouteParams({token:e}),Ai=e=>R("candidate/register/close/:token").setMethod("post").setRouteParams({token:e}),vi=()=>({open:gi,update:bi,read:wi,close:Ai}),Ri=(e,t)=>y("/v2/registrations/lookup").setQueryParam("candidate-id",e).setQueryParam("establishment-id",t),Pi=()=>({lookupEstablishment:Ri}),ki=()=>R("speciality").isList().addGroup("Term:id").addGroup("Term:name"),Ei=(e,t=!0)=>y("speciality/establishment/:establishmentId").isList().setRouteParams({establishmentId:e}).setQueryParam("all",t).addGroup("Term:id").addGroup("Term:name"),Ii=()=>({list:ki,listByEstablishment:Ei}),Ci=e=>y("/tag/public/establishment/:establishmentId").isList().setRouteParams({establishmentId:e}),Si=()=>({listByEstablishment:Ci}),Oi=(e,t)=>y("/v2/talents/lookup").setQueryParam("candidate-id",e).setQueryParam("establishment-id",t),Ti=e=>y("/v2/talents/index").setMethod("post").setPayload(e),Li=()=>({lookupTalent:Oi,addCandidateToTalentPool:Ti}),$i=e=>R("user/email/isset/:email").setRouteParams({email:e}),Mi=()=>y("user/self").addGroup("user:self"),Ni=e=>y("/user/:uuid").setRouteParams({uuid:e}),Di=e=>R("/user/:uuid").setRouteParams({uuid:e}),ji=e=>y("/user/:id/uuid").setRouteParams({id:e}),te=()=>({emailExists:$i,self:Mi,byUuidPrivate:Ni,byUuid:Di,fetchUuid:ji});let U;function Ae(){if(U)return U;const e={user:void 0,roles:[],establishments:{}},t=async()=>{if(!j().isAuthenticated())throw new Error("::SDK Authorization:: User not authenticated");const r=(await te().self().send()).getData();e.user={id:r.id,email:r.email,firstName:r.firstName,lastName:r.lastName,avatar:r.avatar},e.roles=r.roles},i=async r=>{if(!j().isAuthenticated())throw new Error("::SDK Authorization:: User not authenticated");e.establishments[r]=(await ee().authorizations(r).send()).getData()},n=r=>{if(e.user===void 0)throw new Error("::SDK Authorization:: User not fetched");return e.roles.includes(r)};return U={fetchSelf:t,fetchPermission:i,hasRole:n,hasRoleRH:()=>n("ROLE_RH"),hasRoleCandidate:()=>n("ROLE_CANDIDATE"),hasRoleAdmin:()=>n("ROLE_ADMIN"),hasPermission:(r,...a)=>{const p=e.establishments[r];if(p===void 0)throw new Error(`::SDK Authorization:: Permissions not fetched for establishment ${r}`);return a.every(f=>p[f]===!0)},clear:()=>{e.user=void 0,e.roles=[],e.establishments={}}},U}async function xi(e,...t){if(!j().isAuthenticated())throw"ERR_NOT_AUTHENTICATED";const n=Ae();await Promise.all([n.fetchSelf(),n.fetchPermission(e)]);for(let s=0;s<t.length;s++){const c=t[s];if(!n.hasPermission(e,c))throw"ERR_MISSING_PERMISSION"}}const _i=Ke.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 te().self().send();this.user=t.getData()}},async fetchPermission(e,t){if(!this.establishments[e]||t){const i=await ee().authorizations(e).send();this.establishments[e]=i.getData()}},hasPermission(e,...t){const i=this.establishments[e];return i===void 0?!1:t.every(n=>i[n]===!0)}}});let N=null;function g(){if(N)return N;const e=O.getEnvironment(),t=(()=>e==="prod"||e==="production"?"pPROC7dPoJ7XdxHrwsTQNXCGX79MJjhp":e==="staging"?"823rqOTwVk1ZCWVyBAdLInZ77TcFF0CF":"TMZX6evFnu87JrBHV5qLwHsld5C6hilZ")(),i=!!t,n=e!=="prod"&&e!=="production";let s=null;function c(){return i}function l(){const f=window.analytics=window.analytics||[];if(!f.initialize&&f.invoked)A.error("Segment snippet included twice.");else{f.invoked=!0,f.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on","addSourceMiddleware","addIntegrationMiddleware","setAnonymousId","addDestinationMiddleware"],f.factory=function(h){return function(){if(window.analytics.initialized)return window.analytics[h].apply(window.analytics,arguments);const b=Array.prototype.slice.call(arguments);return b.unshift(h),f.push(b),f}};for(let h=0;h<f.methods.length;h++){const b=f.methods[h];f[b]=f.factory(b)}f.load=function(h,b){const w=document.createElement("script");w.id="analytics-script",w.type="text/javascript",w.async=!0,w.src="https://cdn.segment.com/analytics.js/v1/"+h+"/analytics.min.js",w.onerror=()=>window.dispatchEvent(new Event("analytics-error"));const S=document.getElementsByTagName("script")[0];S.parentNode.insertBefore(w,S),f._loadOptions=b},f._writeKey=t,f.SNIPPET_VERSION="4.16.1",f.load(t),f.page(),f.ready(()=>window.dispatchEvent(new Event("analytics-ready")))}}async function m(){return s!==null||(s=new Promise((f,h)=>{if(!c())return p("Analytics is disabled."),f();if(window.addEventListener("analytics-ready",()=>{p("Analytics script loaded successfully."),f()}),window.addEventListener("analytics-error",()=>{p("Analytics script failed to load. Consider disabling your AdBlocker.",null,"error"),h()}),p("Loading Analytics script."),window.analytics)return f();l()})),s}async function u(f,h){if(!T())try{if(await this.analyticsScriptReady(),p("[identify]",[f,h]),c())return window.analytics.identify(f,h)}catch{p("[identify]",[f,h],"error")}}async function r(f,h,b){if(!T()){typeof b!="object"&&(b={});try{if(await this.analyticsScriptReady(),p("[page]",[f,h,b]),c())return window.analytics.page(f,{category:h,...b})}catch(w){console.log(w),p("[page]",[f,h,b],"error")}}}async function a(f,h,b){if(!T()){typeof b!="object"&&(b={});try{if(await this.analyticsScriptReady(),p("[track]",[f,h,b]),c())return window.analytics.track(f,{category:h,...b})}catch{p("[track]",[f,h,b],"error")}}}function p(f,h=[],b="info"){h||(h=[]),n&&A[b](`::SDK Analytics:: ${f}`,...h)}return N={analyticsScriptReady:m,isEnabled:c,identify:u,page:r,track:a,consoleMessage:p},N}g.destroy=()=>N=null;function ve(){const e="Hubler Application";function t(r){if(!r)throw new Error(`Missing arguments for domain "${e}"`);const a=!!r.offerId;if(a&&!r.recruitmentId)throw new Error(`Missing argument "recruitmentId" for domain "${e}"`);return{companyId:r.establishmentId?r.establishmentId.toString():null,jobOfferId:a?r.offerId.toString():null,recruitmentId:a?r.recruitmentId.toString():null,selections:[a?"Application":"Spontaneous Application"]}}async function i(r){return g().page("Application Authentication Viewed",e,t(r))}async function n(r){return g().page("Application Magic Link Viewed",e,t(r))}async function s(r){return g().page("Application Job Viewed",e,t(r))}async function c(r){return g().page("Application Information Viewed",e,t(r))}async function l(r){return g().page("Application Document Viewed",e,t(r))}async function m(r){return g().page("Application Success Viewed",e,t(r))}async function u(r){if(!r.error)throw new Error(`Missing argument "error" for domain "${e}", event "Application Form Failed"`);return g().track("Application Form Failed",e,{...t(r),error:r.error})}return{applicationAuthenticationViewed:i,applicationMagicLinkViewed:n,applicationJobViewed:s,applicationInformationViewed:c,applicationDocumentViewed:l,applicationSuccessViewed:m,applicationFormFailed:u}}function Re(){const e="Profile";function t(d,P){var I;if(!d)throw new Error(`Missing arguments for domain "${e}"`);const k={companyId:d.companyId?d.companyId.toString():null,hublerId:(I=d.hublerId)==null?void 0:I.toString()};return P&&(k.productId=d.companyId?d.companyId+"_2":null),d.recruitmentId&&(k.recruitmentId=d.recruitmentId.toString()),d.selections&&(k.selections=d.selections),d.institutionId&&(k.institutionId=d.institutionId.map(String)),k}async function i(d){return g().track(d.name,e,t(d.properties),!0)}async function n(d){return g().track(d.name,e,t(d.properties,!0))}async function s(d){return g().track(d.name,e,t(d.properties,!0))}async function c(d){return g().track(d.name,e,t(d.properties,!0))}async function l(d){return g().track(d.name,e,t(d.properties,!0))}async function m(d){return g().track(d.name,e,t(d.properties,!0))}async function u(d){return g().track(d.name,e,t(d.properties,!0))}async function r(d){return g().track(d.name,e,t(d.properties,!0))}async function a(d){return g().track(d.name,e,t(d.properties,!0))}async function p(d){return g().track(d.name,e,t(d.properties,!0))}async function f(d){return g().track(d.name,e,t(d.properties,!0))}async function h(d){return g().track(d.name,e,t(d.properties,!0))}async function b(d){return g().track(d.name,e,t(d.properties,!0))}async function w(d){return g().page(d.name,d.properties.category,t(d.properties,!1))}async function S(d){return g().track(d.name,e,t(d.properties,!1))}return{profileDocumentDeleted:i,profileLabelAdded:n,profileLabelRemoved:s,profileShared:c,profileArchived:l,profileCandidateAdded:m,profileCommentAdded:u,profileDocumentAdded:r,profileDocumentDownloaded:a,profileDocumentRequested:p,profileRecruitmentAdded:f,profileRecruitmentRemoved:h,profileTabSelected:b,profileViewed:w,profileEmailSent:S}}function Pe(){const e="Recruitment";function t(n){if(!n)throw new Error(`Missing arguments for domain "${e}"`);const s={companyId:n.companyId?n.companyId.toString():null};return n.institutionId&&(s.institutionId=[n.institutionId.toString()]),n.origin&&(s.origin=n.origin.toString()),s}async function i(n){return g().track(n.name,e,{...t(n),recruitmentId:n.recruitmentId.toString(),count:parseInt(n.count)})}return{candidateAdded:i}}function ke(){const e="Visual Builder";function t(o,He){if(!o)throw new Error(`Missing arguments for domain "${e}"`);const M={companyId:o.companyId?o.companyId.toString():null};return He&&(M.productId=o.companyId?o.companyId+"_2":null),o.selections&&(M.selections=o.selections),o.error&&(M.error=o.error),o.institutionId&&(M.institutionId=[o.institutionId.toString()]),M}async function i(o){return g().page(o.name,e,t(o.properties,!0))}async function n(o){return g().track(o.name,e,t(o.properties),!0)}async function s(o){return g().track(o.name,e,t(o.properties,!0))}async function c(o){return g().page(o.name,e,t(o.properties,!0))}async function l(o){return g().page(o.name,e,t(o.properties,!0))}async function m(o){return g().track(o.name,e,t(o.properties,!0))}async function u(o){return g().page(o.name,e,t(o.properties,!0))}async function r(o){return g().page(o.name,e,t(o.properties,!0))}async function a(o){return g().page(o.name,e,t(o.properties,!0))}async function p(o){return g().track(o.name,e,t(o.properties,!0))}async function f(o){return g().page(o.name,e,t(o.properties,!0))}async function h(o){return g().page(o.name,e,t(o.properties,!0))}async function b(o){return g().track(o.name,e,t(o.properties,!0))}async function w(o){return g().track(o.name,e,t(o.properties,!0))}async function S(o){return g().page(o.name,e,t(o.properties,!0))}async function d(o){return g().page(o.name,e,t(o.properties,!0))}async function P(o){return g().page(o.name,e,t(o.properties,!0))}async function k(o){return g().page(o.name,e,t(o.properties,!0))}async function I(o){return g().page(o.name,e,t(o.properties,!1))}async function Te(o){return g().track(o.name,e,t(o.properties,!0))}async function Le(o){return g().track(o.name,e,t(o.properties,!0))}async function $e(o){return g().track(o.name,e,t(o.properties,!0))}async function Me(o){return g().track(o.name,e,t(o.properties,!0))}async function Ne(o){return g().track(o.name,e,t(o.properties,!0))}async function De(o){return g().track(o.name,e,t(o.properties,!0))}async function je(o){return g().track(o.name,e,t(o.properties,!0))}async function xe(o){return g().track(o.name,e,t(o.properties,!0))}async function _e(o){return g().track(o.name,e,t(o.properties,!0))}async function Be(o){return g().track(o.name,e,t(o.properties,!0))}async function Ue(o){return g().track(o.name,e,t(o.properties,!0))}async function ze(o){return g().track(o.name,e,t(o.properties,!0))}async function Fe(o){return g().track(o.name,e,t(o.properties,!0))}async function Ve(o){return g().page(o.name,e,t(o.properties,!1))}return{careerSitePreviewViewed:i,careerSitePublished:n,setupBenefitCustomAdded:s,setupBenefitViewed:c,setupCandidateInformationViewed:l,setupContactAdded:m,setupContactViewed:u,setupEditionDoneViewed:r,setupExternalLinkViewed:a,setupImageUploaded:p,setupImageViewed:f,setupLocationViewed:h,setupPresentationContentAdded:b,setupPresentationNewTabAdded:w,setupPresentationViewed:S,setupSettingsDoneViewed:d,setupSocialNetworkViewed:P,setupThemeViewed:k,visualBuilderViewed:I,setupImageUploadFailed:Te,fastCopyLinkClicked:Le,setupBenefitCustomDeleted:$e,setupBenefitCustomEdited:Me,setupContactDeleted:Ne,setupContactEdited:De,setupContactNewClicked:je,setupPresentationContentDeleted:xe,setupPresentationContentDuplicated:_e,setupPresentationContentMoved:Be,setupPresentationTabDeleted:Ue,setupPresentationTabEdited:ze,setupPresentationTabMoved:Fe,setupSEOViewed:Ve}}const se=Object.freeze(Object.defineProperty({__proto__:null,useAnalyticsHublerApplication:ve,useAnalyticsProfile:Re,useAnalyticsRecruitment:Pe,useAnalyticsVisualBuilder:ke},Symbol.toStringTag,{value:"Module"}));function Bi(){function e(i){return g().identify(i.id,{email:i.email,firstName:i.firstname,lastName:i.lastname,createdAt:i.createdAt,type:"Hubler",lang:"fr",medium:t()?"MOBILE_DEVICE":"WEB_BROWSER"})}function t(){let i=!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)))&&(i=!0)}(navigator.userAgent||navigator.vendor||window.opera),i}return{identifyCandidate:e}}let z=null;const Ui=async(e,t)=>{try{return await V(),A.info("[identify]",[e,t]),window.analytics.identify(e,t)}catch{A.error("[identify]",[e,t])}},zi=async(e,t,i)=>{typeof i!="object"&&(i={});try{return await V(),A.info("[page]",[e,t,i]),window.analytics.page(e,{category:t,...i})}catch{A.error("[page]",[e,t,i])}},Fi=async(e,t,i)=>{typeof i!="object"&&(i={});try{return await V(),A.info("[track]",[e,t,i]),window.analytics.track(e,{category:t,...i})}catch{A.error("[track]",[e,t,i])}},K=()=>{const e=O.getEnvironment();return e==="prod"||e==="production"?"pPROC7dPoJ7XdxHrwsTQNXCGX79MJjhp":e==="staging"?"823rqOTwVk1ZCWVyBAdLInZ77TcFF0CF":"TMZX6evFnu87JrBHV5qLwHsld5C6hilZ"},Ee=()=>{const e=window.analytics=window.analytics||[];if(!e.initialize&&e.invoked)A.error("Segment snippet included twice.");else{e.invoked=!0,e.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on","addSourceMiddleware","addIntegrationMiddleware","setAnonymousId","addDestinationMiddleware"],e.factory=function(t){return function(){if(window.analytics.initialized)return window.analytics[t].apply(window.analytics,arguments);const i=Array.prototype.slice.call(arguments);return i.unshift(t),e.push(i),e}};for(let t=0;t<e.methods.length;t++){const i=e.methods[t];e[i]=e.factory(i)}e.load=function(t,i){const n=document.createElement("script");n.id="analytics-script",n.type="text/javascript",n.async=!0,n.src="https://cdn.segment.com/analytics.js/v1/"+t+"/analytics.min.js",n.onerror=()=>window.dispatchEvent(new Event("analytics-error"));const s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(n,s),e._loadOptions=i},e._writeKey=K(),e.SNIPPET_VERSION="4.16.1",e.load(K()),e.page(),e.ready(()=>window.dispatchEvent(new Event("analytics-ready")))}},V=()=>(z!==null||(z=new Promise((e,t)=>{if(window.addEventListener("analytics-ready",()=>{A.info("Analytics script loaded successfully."),e()}),window.addEventListener("analytics-error",()=>{A.error("Analytics script failed to load. Consider disabling your AdBlocker."),t()}),A.info("Loading Analytics script."),window.analytics)return e();Ee()})),z),Vi={key:K,appendScript:Ee,ready:V,identify:Ui,page:zi,track:Fi},Hi="AIzaSyDicyRD6rvVdnicp1tgV0ElazASNGbyyTs";let Ie=!1;const Ce=()=>new Promise(e=>{T()||Ie||window.google&&window.google.maps?e():(window.addEventListener("gmap-ready",()=>e()),Gi())}),qi=(e,t)=>Ce().then(()=>{T()||Qi(e,t)}),Qi=(e,t)=>{const i=new window.google.maps.places.Autocomplete(e,{componentRestrictions:{country:["fr","re","yt","gp","mq"]}});window.google.maps.event.addListener(i,"place_changed",()=>{const n=i.getPlace();n.formatted_address&&t&&t(n.formatted_address,n)})},Gi=()=>{window.onGmapScriptReady=()=>{};const e=document.createElement("script");e.src="https://maps.googleapis.com/maps/api/js?key="+Hi+"&libraries=places&callback=onGmapScriptReady",e.async=!0,e.defer=!0,e.onload=()=>window.dispatchEvent(new Event("gmap-ready")),document.body.appendChild(e),Ie=!0},Ki={scriptReady:Ce,autocompleteInput:qi},Wi={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"}},Ji={fr:Wi};let W=null;const Se=()=>W,Zi=(e={})=>{let t=e.locale||"fr";const i=u=>t=u,n=()=>t,s=Z(Ji,(e==null?void 0:e.messages)||{}),c=(u,r)=>{const a=L(s,`${t}.${u}`);return a?r?Xi(a,r):a:u},l=(u,r)=>{const a=L(s,`${t}.${u}`);return a?Yi(a,r):u};return W={t:c,tNode:l,setLocale:i,getLocale:n,install:u=>{u.config.globalProperties.$t=c,u.config.globalProperties.$tNode=l}},W},Xi=(e,t)=>e?e.replace(/{{ ?([a-zA-Z_.]+) ?}}/g,(i,n)=>L(t,n)):null,Yi=(e,t)=>{if(!e)return null;const i=e.split(/(\{[{%]+[^{}]*[%}]+})/g).filter(n=>n!=="").map(n=>{const s=n.startsWith("{%")&&n.endsWith("%}")?"slot":n.startsWith("{{")&&n.endsWith("}}")?"variable":"text";if(s==="text")return()=>re.text(n);n=n.replace(/[{}%]/g,"").trim();const c=n.match(/^[a-zA-Z_.]+/)[0];n=n.replace(c,"").trim();const l={};return n!==""&&([...n.matchAll(/([a-zA-Z_.]+)(=([a-zA-Z_.]+))?/g)].reduce((r,a)=>(a[3]===void 0?G(r,a[1],L(t,a[1])):G(r,a[1],L(t,a[3])),r),l),[...n.matchAll(/([a-zA-Z_.]+)="([^"]+)"/g)].reduce((r,a)=>{let p=a[2];return new RegExp(/^[0-9]*$/).exec(a[2])?p=parseInt(a[2]):new RegExp(/^(true|false)$/).exec(a[2])&&(p=a[2]==="true"),r[a[1]]=p,r},l)),m=>re[s](c,t,m,l)});return{setup:(n,{slots:s})=>()=>i.map(c=>c(s))}},re={slot:(e,t,i,n)=>$.h("span",{class:"node node--slot"},i[e.trim()](n)),variable:(e,t)=>$.h("span",{class:"node node--variable"},L(t,e.trim())),text:e=>$.h("span",{class:"node node--text"},e)};function es(e){const{t}=Se(),i={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,s)=>n===1?t(s?"timeAgo.last-month":"timeAgo.next-month"):`${n} ${t("timeAgo.month",n)}`,year:(n,s)=>n===1?t(s?"timeAgo.last-year":"timeAgo.next-year"):`${n} ${t("timeAgo.year",n)}`,day:(n,s)=>n===1?t(s?"timeAgo.yesterday":"timeAgo.tomorrow"):`${n} ${t("timeAgo.day",n)}`,week:(n,s)=>n===1?t(s?"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 We.useTimeAgo(e,{fullDateFormatter:n=>n.toLocaleDateString(),messages:i})}function ts(){let e=null;function t(){return e}function i(){return e.controller}function n(){return"use"+e.controller.charAt(0).toUpperCase()+e.controller.slice(1)+"QSController"}function s(){return e.action}function c(){return e.arguments}function l(){return!!(e&&e.controller&&e.action)}function m(){window.location.search.length!==0&&(e=window.location.search.substring(1).split("&").reduce((u,r)=>{const a=r.split("=");return a[0]==="controller"||a[0]==="action"?u[a[0]]=decodeURIComponent(a[1]):u.arguments[a[0]]=decodeURIComponent(a[1]),u},{controller:null,action:null,arguments:{}}))}return m(),{getParams:t,getController:i,getControllerComposableName:n,getAction:s,getArguments:c,hasAction:l}}function ns(){async function e({domain:n,event:s,...c}){const l="useAnalytics"+n.charAt(0).toUpperCase()+n.slice(1);if(!t(l))throw new Error(`Domain ${n} is not defined`);const m=se[l]();if(!i(m,s))throw new Error(`Event ${s} is not defined in domain ${n}`);return m[s](c)}function t(n){return!!se[n]}function i(n,s){return!!n[s]}return{call:e}}const oe=Object.freeze(Object.defineProperty({__proto__:null,useAnalyticsQSController:ns},Symbol.toStringTag,{value:"Module"}));function is(e){if(!e.hasAction())throw new Error("No action found in router");function t(){if(!i())throw new Error(`Controller ${e.getController()} not found`);const s=oe[e.getControllerComposableName()]();if(!n(s))throw new Error(`Action ${e.getAction()} not found in controller ${e.getController()}`);return s[e.getAction()](e.getArguments())}function i(){return e.getControllerComposableName()in oe}function n(s){return e.getAction()in s}return{dispatch:t}}function ss(){let e=!1;function t(s,c,l){n(),l()}function i(s,c,l){if(!e)return e=!0,t(s,c,l);l()}function n(){const s=ts();if(!s.hasAction())return;is(s).dispatch()}return{vueRouterBeforeEach:t,vueRouterBeforeFirst:i,handle:n}}const rs=()=>({getAssetUrl:t=>`${O.getBaseAssetsUrl()}${t}`}),v=()=>O.getMainAppHost(),os=()=>`${v()}/rh/establishments`,as=e=>`${v()}/rh/establishment/${e}`,cs=e=>{var t;return typeof e=="string"?e:typeof e=="object"&&((t=e==null?void 0:e.urls)!=null&&t.display)?e.urls.display:null},us=()=>`${v()}/rh/dashboard`,ls=e=>`${v()}/candidate-invite/establishment/${e}`,ds=(e,t=!1)=>t?`${v()}/cvbank/${e}`:`${v()}/rh/establishment/${e}/cvtheque`,ms=(e,t)=>`${v()}/user-profile/establishment/${e}/user/${t}`,ps=e=>`${v()}/rh/establishment/${e}/recruitment`,fs=(e,t)=>`${v()}/rh/establishment/${e}/recruitment/${t}`,hs=(e,t)=>`${v()}/rh/establishment/${e}/recruitment/${t}/kanban`,ys=e=>`${v()}/rh/establishment/${e}/career-configuration`,gs=(e,t=null)=>t?`${v()}/career-website/${e}/${t}`:`${v()}/career-website/${e}`,bs=(e,t)=>`${v()}/career-website-preview/${e}/${t}`,ws=(e,t=null)=>{const i=v().replace("://",`://${e}.`);return t?`${i}?_version=${t}`:`${i}`},As=e=>`${v()}/rh/establishment/${e}/stats`,vs=e=>`${v()}/rh/establishment/${e}/backoffice`,Rs=()=>`${v()}/rh/settings/general`;function Ps(){return{root:v,establishments:os,establishment:as,img:cs,dashboard:us,candidateInvite:ls,cvtheque:ds,userProfile:ms,recruitments:ps,recruitment:fs,recruitmentKanban:hs,career:ys,careerConfig:gs,careerPreview:bs,careerWebsite:ws,statistics:As,backoffice:vs,userSettings:Rs}}const ae=new Set;let D,J={ignore:e=>e.startsWith("Ui")};const Q=e=>{if(e!=null&&e.classList){e._cssChecked=!0;for(const t of e.classList)D.has(t)||ae.has(t)||J.ignore(t)||(ae.add(t),A.error(`Undefined CSS class: ${t}`))}},Oe=e=>{var t;for(const i of e)if(i!=null&&i.cssRules&&(i==null?void 0:i.cssRules.length)>0)Oe(i.cssRules);else if(i.selectorText){const n=(t=i.selectorText)==null?void 0:t.match(/\.[\w-]+/g);if(n)for(const s of n)D.add(s.substr(1))}},ks=(e={})=>{if(D)return D;D=new Set,J={...J,...e},Oe(document.styleSheets),new MutationObserver(i=>{for(const n of i)if(n.type==="childList"&&(n!=null&&n.addedNodes)){for(const s of n.addedNodes)if(!(s.nodeType===3||s.nodeType===8)){Q(s);for(const c of s.querySelectorAll("*"))Q(c)}}else(n==null?void 0:n.attributeName)==="class"&&Q(n.target)}).observe(document,{attributes:!0,childList:!0,subtree:!0})},Es="0.2.65";exports.Analytics=Vi;exports.BaseLogger=F;exports.Gmap=Ki;exports.SDKConfig=O;exports.SDKLogger=A;exports.VERSION=Es;exports._clone=ue;exports._get=L;exports._merge=Z;exports._set=G;exports.createI18n=Zi;exports.ensureScheme=kt;exports.inBrowser=dt;exports.inNode=T;exports.isArray=X;exports.isArrayOf=At;exports.isBoolean=mt;exports.isDate=ht;exports.isFalsy=wt;exports.isFunction=yt;exports.isMobile=lt;exports.isNotNullOrUndefined=gt;exports.isNull=le;exports.isNullOrUndefined=me;exports.isNumber=pt;exports.isObject=Y;exports.isObjectOf=vt;exports.isString=ft;exports.isTruthy=bt;exports.isUndefined=de;exports.objectPropsAre=Rt;exports.secureScheme=Pt;exports.useActivityRepository=Zt;exports.useAnalyticsHublerApplication=ve;exports.useAnalyticsIdentify=Bi;exports.useAnalyticsProfile=Re;exports.useAnalyticsRecruitment=Pe;exports.useAnalyticsVisualBuilder=ke;exports.useAssetUrls=rs;exports.useAuthentication=j;exports.useAuthorization=Ae;exports.useAuthorizationStore=_i;exports.useCanAccessEstablishmentMiddleware=xi;exports.useCandidateRepository=un;exports.useCommentRepository=fn;exports.useContractTypeRepository=gn;exports.useCookieStorage=fe;exports.useCvbankRepository=An;exports.useCvthequeRepository=Rn;exports.useDiplomaRepository=kn;exports.useDocumentRepository=Tn;exports.useDomainUrls=Ps;exports.useEmailHistoryRepository=$n;exports.useEmailRepository=Dn;exports.useEmailTemplateRepository=_n;exports.useEstablishmentCareerRepository=Hn;exports.useEstablishmentRepository=ee;exports.useFeatureFlagRepository=Wn;exports.useI18n=Se;exports.useJobRepository=Xn;exports.useLabelRepository=si;exports.useLocaleTimeAgo=es;exports.useOfferRepository=oi;exports.usePrivateRequest=y;exports.useQSAction=ss;exports.useRecruiterRepository=ci;exports.useRecruitmentRepository=yi;exports.useRegisterRepository=vi;exports.useRegistrationRepository=Pi;exports.useRequest=R;exports.useSpecialityRepository=Ii;exports.useTagRepository=Si;exports.useTalentRepository=Li;exports.useUndefinedCssClasses=ks;exports.useUserRepository=te;
package/dist/core.js CHANGED
@@ -1,12 +1,12 @@
1
- var Me = Object.defineProperty;
2
- var Ne = (e, t, i) => t in e ? Me(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i;
3
- var C = (e, t, i) => (Ne(e, typeof t != "symbol" ? t + "" : t, i), i);
4
- import { getCurrentScope as De, onScopeDispose as je, ref as xe, h as V } from "vue";
5
- import _e from "axios";
6
- import { defineStore as Be } from "pinia";
7
- import { useTimeAgo as ze } from "@vueuse/core";
8
- function Ue(e) {
9
- return De() ? (je(e), !0) : !1;
1
+ var Ne = Object.defineProperty;
2
+ var De = (e, t, i) => t in e ? Ne(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i;
3
+ var C = (e, t, i) => (De(e, typeof t != "symbol" ? t + "" : t, i), i);
4
+ import { getCurrentScope as je, onScopeDispose as xe, ref as _e, h as V } from "vue";
5
+ import Be from "axios";
6
+ import { defineStore as ze } from "pinia";
7
+ import { useTimeAgo as Ue } from "@vueuse/core";
8
+ function Ve(e) {
9
+ return je() ? (xe(e), !0) : !1;
10
10
  }
11
11
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
12
12
  /*!
@@ -15,11 +15,11 @@ typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
15
15
  * Copyright(c) 2015 Douglas Christopher Wilson
16
16
  * MIT Licensed
17
17
  */
18
- var ie = Fe, J = He, Ve = Object.prototype.toString, D = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;
19
- function Fe(e, t) {
18
+ var ie = He, J = Qe, Fe = Object.prototype.toString, D = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;
19
+ function He(e, t) {
20
20
  if (typeof e != "string")
21
21
  throw new TypeError("argument str must be a string");
22
- for (var i = {}, n = t || {}, r = n.decode || Qe, c = 0; c < e.length; ) {
22
+ for (var i = {}, n = t || {}, r = n.decode || qe, c = 0; c < e.length; ) {
23
23
  var d = e.indexOf("=", c);
24
24
  if (d === -1)
25
25
  break;
@@ -33,14 +33,14 @@ function Fe(e, t) {
33
33
  var u = e.slice(c, d).trim();
34
34
  if (i[u] === void 0) {
35
35
  var s = e.slice(d + 1, m).trim();
36
- s.charCodeAt(0) === 34 && (s = s.slice(1, -1)), i[u] = Ke(s, r);
36
+ s.charCodeAt(0) === 34 && (s = s.slice(1, -1)), i[u] = We(s, r);
37
37
  }
38
38
  c = m + 1;
39
39
  }
40
40
  return i;
41
41
  }
42
- function He(e, t, i) {
43
- var n = i || {}, r = n.encode || qe;
42
+ function Qe(e, t, i) {
43
+ var n = i || {}, r = n.encode || Ge;
44
44
  if (typeof r != "function")
45
45
  throw new TypeError("option encode is invalid");
46
46
  if (!D.test(e))
@@ -67,7 +67,7 @@ function He(e, t, i) {
67
67
  }
68
68
  if (n.expires) {
69
69
  var u = n.expires;
70
- if (!Ge(u) || isNaN(u.valueOf()))
70
+ if (!Ke(u) || isNaN(u.valueOf()))
71
71
  throw new TypeError("option expires is invalid");
72
72
  d += "; Expires=" + u.toUTCString();
73
73
  }
@@ -108,31 +108,31 @@ function He(e, t, i) {
108
108
  }
109
109
  return d;
110
110
  }
111
- function Qe(e) {
111
+ function qe(e) {
112
112
  return e.indexOf("%") !== -1 ? decodeURIComponent(e) : e;
113
113
  }
114
- function qe(e) {
114
+ function Ge(e) {
115
115
  return encodeURIComponent(e);
116
116
  }
117
- function Ge(e) {
118
- return Ve.call(e) === "[object Date]" || e instanceof Date;
117
+ function Ke(e) {
118
+ return Fe.call(e) === "[object Date]" || e instanceof Date;
119
119
  }
120
- function Ke(e, t) {
120
+ function We(e, t) {
121
121
  try {
122
122
  return t(e);
123
123
  } catch {
124
124
  return e;
125
125
  }
126
126
  }
127
- function We() {
127
+ function Je() {
128
128
  const e = typeof global > "u" ? void 0 : global.TEST_HAS_DOCUMENT_COOKIE;
129
129
  return typeof e == "boolean" ? e : typeof document == "object" && typeof document.cookie == "string";
130
130
  }
131
- function Je(e) {
131
+ function Ze(e) {
132
132
  return typeof e == "string" ? ie(e) : typeof e == "object" && e !== null ? e : {};
133
133
  }
134
134
  function F(e, t = {}) {
135
- const i = Ze(e);
135
+ const i = Xe(e);
136
136
  if (!t.doNotParse)
137
137
  try {
138
138
  return JSON.parse(i);
@@ -140,10 +140,10 @@ function F(e, t = {}) {
140
140
  }
141
141
  return e;
142
142
  }
143
- function Ze(e) {
143
+ function Xe(e) {
144
144
  return e && e[0] === "j" && e[1] === ":" ? e.substr(2) : e;
145
145
  }
146
- class Xe {
146
+ class Ye {
147
147
  constructor(t, i = {}) {
148
148
  this.changeListeners = [], this.HAS_DOCUMENT_COOKIE = !1, this.update = () => {
149
149
  if (!this.HAS_DOCUMENT_COOKIE)
@@ -152,7 +152,7 @@ class Xe {
152
152
  this.cookies = ie(document.cookie), this._checkChanges(r);
153
153
  };
154
154
  const n = typeof document > "u" ? "" : document.cookie;
155
- this.cookies = Je(t || n), this.defaultSetOptions = i, this.HAS_DOCUMENT_COOKIE = We();
155
+ this.cookies = Ze(t || n), this.defaultSetOptions = i, this.HAS_DOCUMENT_COOKIE = Je();
156
156
  }
157
157
  _emitChange(t) {
158
158
  for (let i = 0; i < this.changeListeners.length; ++i)
@@ -199,18 +199,18 @@ class Xe {
199
199
  i >= 0 && this.changeListeners.splice(i, 1), this.HAS_DOCUMENT_COOKIE && this.changeListeners.length === 0 && (typeof window == "object" && "cookieStore" in window ? window.cookieStore.removeEventListener("change", this.update) : this._stopPolling());
200
200
  }
201
201
  }
202
- function Ye(e, { doNotParse: t = !1, autoUpdateDependencies: i = !1 } = {}, n = new Xe()) {
202
+ function et(e, { doNotParse: t = !1, autoUpdateDependencies: i = !1 } = {}, n = new Ye()) {
203
203
  const r = i ? [...e || []] : e;
204
204
  let c = n.getAll({ doNotParse: !0 });
205
- const d = xe(0), m = () => {
205
+ const d = _e(0), m = () => {
206
206
  const u = n.getAll({ doNotParse: !0 });
207
- et(
207
+ tt(
208
208
  r || null,
209
209
  u,
210
210
  c
211
211
  ) && d.value++, c = u;
212
212
  };
213
- return n.addChangeListener(m), Ue(() => {
213
+ return n.addChangeListener(m), Ve(() => {
214
214
  n.removeChangeListener(m);
215
215
  }), {
216
216
  /**
@@ -227,7 +227,7 @@ function Ye(e, { doNotParse: t = !1, autoUpdateDependencies: i = !1 } = {}, n =
227
227
  removeChangeListener: (...u) => n.removeChangeListener(...u)
228
228
  };
229
229
  }
230
- function et(e, t, i) {
230
+ function tt(e, t, i) {
231
231
  if (!e)
232
232
  return !0;
233
233
  for (const n of e)
@@ -265,7 +265,7 @@ const _i = () => {
265
265
  m = r(m) ? c(m) : m, d[m] = d[m] ?? s, d = d[m];
266
266
  }
267
267
  }), e;
268
- }, tt = (e) => {
268
+ }, nt = (e) => {
269
269
  if (typeof e == "object") {
270
270
  if (Array.isArray(e))
271
271
  return [...e];
@@ -276,10 +276,10 @@ const _i = () => {
276
276
  }, re = (e, t) => {
277
277
  const i = { ...e };
278
278
  for (const [n, r] of Object.entries(t))
279
- n in i && typeof i[n] == "object" && typeof r == "object" ? i[n] = re(i[n], r) : i[n] = tt(r);
279
+ n in i && typeof i[n] == "object" && typeof r == "object" ? i[n] = re(i[n], r) : i[n] = nt(r);
280
280
  return i;
281
- }, zi = (e) => typeof e == "boolean", Ui = (e) => typeof e == "number", Vi = (e) => typeof e == "string", se = (e) => Array.isArray(e), nt = (e) => typeof e == "object" && !se(e) && e !== null, Fi = (e) => e instanceof Date, Hi = (e) => typeof e == "function", it = (e) => e === null, rt = (e) => e === void 0, st = (e) => it(e) || rt(e), Qi = (e) => !st(e), qi = (e) => !!e, Gi = (e) => !e, Ki = (e, t) => se(e) && e.every((i) => t(i)), Wi = (e, t) => nt(e) && Object.values(e).every((i) => t(i)), Ji = (e) => e.startsWith("http:") ? e.replace("http:", "https:") : e, Zi = (e, t = !1) => e.startsWith("http:") || e.startsWith("https:") ? e : t ? `https://${e}` : `http://${e}`, oe = () => typeof window < "u" && (window != null && window.location) ? new URL(window.location).hostname : void 0, X = () => {
282
- const e = oe();
281
+ }, zi = (e) => typeof e == "boolean", Ui = (e) => typeof e == "number", Vi = (e) => typeof e == "string", se = (e) => Array.isArray(e), oe = (e) => typeof e == "object" && !se(e) && e !== null, Fi = (e) => e instanceof Date, Hi = (e) => typeof e == "function", it = (e) => e === null, rt = (e) => e === void 0, st = (e) => it(e) || rt(e), Qi = (e) => !st(e), qi = (e) => !!e, Gi = (e) => !e, Ki = (e, t) => se(e) && e.every((i) => t(i)), Wi = (e, t) => oe(e) && Object.values(e).every((i) => t(i)), Ji = (e, t) => oe(e) && Object.entries(t).every(([i, n]) => n(e[i])), Zi = (e) => e.startsWith("http:") ? e.replace("http:", "https:") : e, Xi = (e, t = !1) => e.startsWith("http:") || e.startsWith("https:") ? e : t ? `https://${e}` : `http://${e}`, ae = () => typeof window < "u" && (window != null && window.location) ? new URL(window.location).hostname : void 0, X = () => {
282
+ const e = ae();
283
283
  return !e || e === "localhost" ? e : `.${e}`;
284
284
  }, ot = () => ({ path: "/" }), at = (e) => ({
285
285
  path: "/",
@@ -291,12 +291,12 @@ const _i = () => {
291
291
  return e.startsWith("localhost") ? ot() : at(e);
292
292
  };
293
293
  function ct() {
294
- const e = Ye(), t = (c) => e.get(c), i = (c, d) => e.set(
294
+ const e = et(), t = (c) => e.get(c), i = (c, d) => e.set(
295
295
  c,
296
296
  d,
297
297
  H(X())
298
298
  ), n = (c) => {
299
- e.remove(c), e.remove(c, H(oe())), e.remove(c, H(X()));
299
+ e.remove(c), e.remove(c, H(ae())), e.remove(c, H(X()));
300
300
  };
301
301
  return {
302
302
  getItem: t,
@@ -515,24 +515,24 @@ const x = (e, t, i) => {
515
515
  }, A = new q({
516
516
  prefix: "[SDK]"
517
517
  });
518
- let ae = null, ce = null, ue = null, de = "/", le = null;
519
- const mt = () => ae, ft = (e) => {
518
+ let ce = null, ue = null, de = null, le = "/", me = null;
519
+ const mt = () => ce, ft = (e) => {
520
520
  if (A.info("[Config] Environment:", e), !e)
521
521
  throw new Error("Invalid environment.");
522
- ae = e;
523
- }, pt = () => ce, ht = (e) => {
522
+ ce = e;
523
+ }, pt = () => ue, ht = (e) => {
524
524
  if (A.info("[Config] API Host:", e), !e)
525
525
  throw new Error("Invalid API host.");
526
- ce = e;
527
- }, yt = () => le, gt = (e) => {
528
- le = e;
529
- }, bt = () => ue, wt = (e) => {
526
+ ue = e;
527
+ }, yt = () => me, gt = (e) => {
528
+ me = e;
529
+ }, bt = () => de, wt = (e) => {
530
530
  if (A.info("[Config] Main App Host:", e), !e)
531
531
  throw new Error("Invalid main app host.");
532
- ue = e;
532
+ de = e;
533
533
  }, vt = (e) => {
534
- A.info("[Config] Base Assets Urls:", e), de = e;
535
- }, At = () => de, O = {
534
+ A.info("[Config] Base Assets Urls:", e), le = e;
535
+ }, At = () => le, O = {
536
536
  getEnvironment: mt,
537
537
  getApiHost: pt,
538
538
  getErrorHandler: yt,
@@ -817,7 +817,7 @@ function $t(e, t, i, n, r, c) {
817
817
  responseType: c.getResponseType()
818
818
  }), A.info("[Request] Sending request:", `[${u.toUpperCase()}]`, s);
819
819
  try {
820
- const h = await _e[u](...p);
820
+ const h = await Be[u](...p);
821
821
  return m(h);
822
822
  } catch (h) {
823
823
  throw Ot(h, r.isSilent());
@@ -860,9 +860,9 @@ function g(e, t = "get", i = null) {
860
860
  return c();
861
861
  }, n;
862
862
  }
863
- const Lt = (e, t) => g("/v2/activity/candidate/:candidateId/establishment/:establishmentId").setRouteParams({ candidateId: e, establishmentId: t }), Xi = () => ({
863
+ const Lt = (e, t) => g("/v2/activity/candidate/:candidateId/establishment/:establishmentId").setRouteParams({ candidateId: e, establishmentId: t }), Yi = () => ({
864
864
  listByCandidateAndEstablishment: Lt
865
- }), Mt = (e, t, i) => g("/candidate/:candidateId/share/establishment/:establishmentId").setMethod("post").setRouteParams({ candidateId: e, establishmentId: t }).setPayload(i), Nt = (e, t) => g("/candidate/:candidateId/archive/establishment/:establishmentId").setRouteParams({ candidateId: e, establishmentId: t }), Dt = (e, t) => g("/candidate/:candidateId/archive/establishment/:establishmentId").setMethod("post").setRouteParams({ candidateId: e, establishmentId: t }), jt = (e, t) => g("/candidate/:candidateId/archive/establishment/:establishmentId").setMethod("delete").setRouteParams({ candidateId: e, establishmentId: t }), xt = (e, t) => g("/v2/candidates/lookup").setQueryParam("email", e).setQueryParam("establishment-id", t), _t = (e, t) => g("/v2/candidates").setMethod("post").setQueryParam("establishment-id", e).setPayload(t), Bt = (e, t, i) => g("/v2/candidates/:candidateId").setQueryParam("establishment-id", t).setRouteParams({ candidateId: e }).setMethod("put").setPayload(i), zt = (e) => g("/candidate/register/close/:registrationToken").setMethod("post").setRouteParams({ registrationToken: e }), Ut = (e) => g("/candidate/register/open").setMethod("post").setQueryParam("groups", "register:token").setPayload(e), Vt = (e, t) => g("/establishment/:establishmentId:/candidate/invitation").setRouteParams({ establishmentId: e }).setMethod("post").setPayload(t), Yi = () => ({
865
+ }), Mt = (e, t, i) => g("/candidate/:candidateId/share/establishment/:establishmentId").setMethod("post").setRouteParams({ candidateId: e, establishmentId: t }).setPayload(i), Nt = (e, t) => g("/candidate/:candidateId/archive/establishment/:establishmentId").setRouteParams({ candidateId: e, establishmentId: t }), Dt = (e, t) => g("/candidate/:candidateId/archive/establishment/:establishmentId").setMethod("post").setRouteParams({ candidateId: e, establishmentId: t }), jt = (e, t) => g("/candidate/:candidateId/archive/establishment/:establishmentId").setMethod("delete").setRouteParams({ candidateId: e, establishmentId: t }), xt = (e, t) => g("/v2/candidates/lookup").setQueryParam("email", e).setQueryParam("establishment-id", t), _t = (e, t) => g("/v2/candidates").setMethod("post").setQueryParam("establishment-id", e).setPayload(t), Bt = (e, t, i) => g("/v2/candidates/:candidateId").setQueryParam("establishment-id", t).setRouteParams({ candidateId: e }).setMethod("put").setPayload(i), zt = (e) => g("/candidate/register/close/:registrationToken").setMethod("post").setRouteParams({ registrationToken: e }), Ut = (e) => g("/candidate/register/open").setMethod("post").setQueryParam("groups", "register:token").setPayload(e), Vt = (e, t) => g("/establishment/:establishmentId:/candidate/invitation").setRouteParams({ establishmentId: e }).setMethod("post").setPayload(t), er = () => ({
866
866
  share: Mt,
867
867
  isArchived: Nt,
868
868
  archive: Dt,
@@ -873,70 +873,70 @@ const Lt = (e, t) => g("/v2/activity/candidate/:candidateId/establishment/:estab
873
873
  closeIncompleteRegistration: zt,
874
874
  openNewRegistration: Ut,
875
875
  updateInvitation: Vt
876
- }), Ft = (e, t) => g("/comment/establishment/:establishmentId/candidate/:userId").setRouteParams({ establishmentId: e, userId: t }), Ht = (e, t, i) => g("/comment/establishment/:establishmentId/candidate/:userId").setRouteParams({ establishmentId: e, userId: t }).setMethod("post").setPayload(i), Qt = (e, t) => g("/comment/:commentId").setRouteParams({ commentId: e }).setMethod("put").setPayload(t), qt = (e) => g("/comment/:commentId").setRouteParams({ commentId: e }).setMethod("delete"), er = () => ({
876
+ }), Ft = (e, t) => g("/comment/establishment/:establishmentId/candidate/:userId").setRouteParams({ establishmentId: e, userId: t }), Ht = (e, t, i) => g("/comment/establishment/:establishmentId/candidate/:userId").setRouteParams({ establishmentId: e, userId: t }).setMethod("post").setPayload(i), Qt = (e, t) => g("/comment/:commentId").setRouteParams({ commentId: e }).setMethod("put").setPayload(t), qt = (e) => g("/comment/:commentId").setRouteParams({ commentId: e }).setMethod("delete"), tr = () => ({
877
877
  getForEstablishmentCandidate: Ft,
878
878
  postForEstablishmentCandidate: Ht,
879
879
  update: Qt,
880
880
  remove: qt
881
- }), Gt = () => k("contractType").isList().addGroup("Term:id").addGroup("Term:name"), Kt = (e, t = !0) => g("contractType/establishment/:establishmentId").isList().setRouteParams({ establishmentId: e }).setQueryParam("all", t).addGroup("Term:id").addGroup("Term:name"), tr = () => ({
881
+ }), Gt = () => k("contractType").isList().addGroup("Term:id").addGroup("Term:name"), Kt = (e, t = !0) => g("contractType/establishment/:establishmentId").isList().setRouteParams({ establishmentId: e }).setQueryParam("all", t).addGroup("Term:id").addGroup("Term:name"), nr = () => ({
882
882
  list: Gt,
883
883
  listByEstablishment: Kt
884
- }), Wt = (e) => g("/v2/talents").isList().setQueryParam("establishment-id", e), Jt = (e) => g("/v2/talent/mark-as-seen/:talentId").setRouteParams({ talentId: e }).setMethod("post"), nr = () => ({
884
+ }), Wt = (e) => g("/v2/talents").isList().setQueryParam("establishment-id", e), Jt = (e) => g("/v2/talent/mark-as-seen/:talentId").setRouteParams({ talentId: e }).setMethod("post"), ir = () => ({
885
885
  list: Wt,
886
886
  markAsSeen: Jt
887
- }), Zt = (e, t, i) => g("/cvtheque/establishment/:establishmentId/candidate/:candidateId/label/synchronize").setRouteParams({ establishmentId: e, candidateId: t }).setMethod("post").setPayload(i), ir = () => ({
887
+ }), Zt = (e, t, i) => g("/cvtheque/establishment/:establishmentId/candidate/:candidateId/label/synchronize").setRouteParams({ establishmentId: e, candidateId: t }).setMethod("post").setPayload(i), rr = () => ({
888
888
  syncCandidateLabels: Zt
889
- }), Xt = () => k("diploma").isList().addGroup("Term:id").addGroup("Term:name"), rr = () => ({
889
+ }), Xt = () => k("diploma").isList().addGroup("Term:id").addGroup("Term:name"), sr = () => ({
890
890
  list: Xt
891
- }), Yt = (e) => g("document/candidate/:candidateId").setRouteParams({ candidateId: e }).isList().disablePagination(), en = (e, t) => g("document/candidate/:candidateId/establishment/:establishmentId/recruiter").setRouteParams({ candidateId: e, establishmentId: t }).isList().disablePagination(), tn = (e, t) => g("document/candidate/:candidateId/establishment/:establishmentId/candidate").setRouteParams({ candidateId: e, establishmentId: t }).isList().disablePagination(), nn = (e) => g("document/recruiter").setMethod("post").setPayload(e), rn = (e) => g("document/:documentId").setRouteParams({ documentId: e }).setMethod("delete"), sr = () => ({
891
+ }), Yt = (e) => g("document/candidate/:candidateId").setRouteParams({ candidateId: e }).isList().disablePagination(), en = (e, t) => g("document/candidate/:candidateId/establishment/:establishmentId/recruiter").setRouteParams({ candidateId: e, establishmentId: t }).isList().disablePagination(), tn = (e, t) => g("document/candidate/:candidateId/establishment/:establishmentId/candidate").setRouteParams({ candidateId: e, establishmentId: t }).isList().disablePagination(), nn = (e) => g("document/recruiter").setMethod("post").setPayload(e), rn = (e) => g("document/:documentId").setRouteParams({ documentId: e }).setMethod("delete"), or = () => ({
892
892
  listByCandidate: Yt,
893
893
  listByCandidateAndEstablishmentFromRecruiter: en,
894
894
  listByCandidateAndEstablishmentFromCandidate: tn,
895
895
  addFromRecruiter: nn,
896
896
  remove: rn
897
- }), sn = (e, t) => g("/v2/establishments/:establishmentId/email-history").setRouteParams({ establishmentId: t }).setQueryParam("receiverId", e).isList().disablePagination(), or = () => ({
897
+ }), sn = (e, t) => g("/v2/establishments/:establishmentId/email-history").setRouteParams({ establishmentId: t }).setQueryParam("receiverId", e).isList().disablePagination(), ar = () => ({
898
898
  listByCandidateAndEstablishment: sn
899
- }), on = (e, t) => g("/email/candidate/:candidateId").setMethod("post").setRouteParams({ candidateId: e }).setPayload(t), an = (e, t) => g("/v2/emails/send").setMethod("post").setPayload({ recipientIds: e, ...t }), ar = () => ({
899
+ }), on = (e, t) => g("/email/candidate/:candidateId").setMethod("post").setRouteParams({ candidateId: e }).setPayload(t), an = (e, t) => g("/v2/emails/send").setMethod("post").setPayload({ recipientIds: e, ...t }), cr = () => ({
900
900
  sendToCandidate: on,
901
901
  sendToRecipients: an
902
902
  }), cn = (e, t = !0) => {
903
903
  const i = g("/v2/establishments/:establishmentId/email-templates").setRouteParams({ establishmentId: e }).isList().disablePagination();
904
904
  return t && i.setQueryParam("global", !0), i;
905
- }, un = () => g("/v2/self/email-templates").isList().disablePagination(), cr = () => ({
905
+ }, un = () => g("/v2/self/email-templates").isList().disablePagination(), ur = () => ({
906
906
  listByEstablishment: cn,
907
907
  listSelf: un
908
908
  }), dn = (e, t) => g("establishment-career/:establishmentId/:versionId").setRouteParams({ establishmentId: e, versionId: t }), ln = (e, t = "published") => g("establishment-career/:establishmentId/state/:state").setRouteParams({ establishmentId: e, state: t }), mn = (e, t, i = null) => {
909
909
  const n = i !== null ? g("establishment-career/:establishmentId/:versionId").setRouteParams({ establishmentId: e, versionId: i }) : g("establishment-career/:establishmentId").setRouteParams({ establishmentId: e });
910
910
  return n.setMethod("post").setPayload(t), n;
911
- }, fn = (e, t) => g("establishment-career/:establishmentId/logo-banner").setMethod("post").setRouteParams({ establishmentId: e }).setPayload(t), pn = (e, t, i) => g("establishment-career/:establishmentId/publish/:versionId").setMethod("post").setRouteParams({ establishmentId: e, versionId: t }).setPayload(i), ur = () => ({
911
+ }, fn = (e, t) => g("establishment-career/:establishmentId/logo-banner").setMethod("post").setRouteParams({ establishmentId: e }).setPayload(t), pn = (e, t, i) => g("establishment-career/:establishmentId/publish/:versionId").setMethod("post").setRouteParams({ establishmentId: e, versionId: t }).setPayload(i), dr = () => ({
912
912
  readById: dn,
913
913
  readByState: ln,
914
914
  upsert: mn,
915
915
  uploadLogoAndBanner: fn,
916
916
  publish: pn
917
- }), hn = (e) => k("establishment/:establishmentId").setRouteParams({ establishmentId: e }), yn = (e) => g("establishment/:establishmentId/authorizations").setRouteParams({ establishmentId: e }), me = () => ({
917
+ }), hn = (e) => k("establishment/:establishmentId").setRouteParams({ establishmentId: e }), yn = (e) => g("establishment/:establishmentId/authorizations").setRouteParams({ establishmentId: e }), fe = () => ({
918
918
  read: hn,
919
919
  authorizations: yn
920
- }), gn = (e) => k("feature-flag/maintenance").setMethod("post").setPayload(e), bn = (e, t) => k("feature-flag/establishment").setMethod("post").setPayload({ establishment: e, flagName: t }), dr = () => ({
920
+ }), gn = (e) => k("feature-flag/maintenance").setMethod("post").setPayload(e), bn = (e, t) => k("feature-flag/establishment").setMethod("post").setPayload({ establishment: e, flagName: t }), lr = () => ({
921
921
  maintenanceModeEnabled: gn,
922
922
  forEstablishment: bn
923
- }), wn = () => k("job").isList().addGroup("Term:id").addGroup("Term:name"), vn = (e, t = !0) => g("job/establishment/:establishmentId").isList().setRouteParams({ establishmentId: e }).setQueryParam("all", t).addGroup("Term:id").addGroup("Term:name"), lr = () => ({
923
+ }), wn = () => k("job").isList().addGroup("Term:id").addGroup("Term:name"), vn = (e, t = !0) => g("job/establishment/:establishmentId").isList().setRouteParams({ establishmentId: e }).setQueryParam("all", t).addGroup("Term:id").addGroup("Term:name"), mr = () => ({
924
924
  list: wn,
925
925
  listByEstablishment: vn
926
- }), An = (e) => g("/label/establishment/:establishmentId").isList().setRouteParams({ establishmentId: e }), Pn = (e, t) => g("/label/establishment/:establishmentId").setMethod("post").setRouteParams({ establishmentId: e }).setPayload(t), kn = (e, t) => g("/label/:labelId").setMethod("put").setRouteParams({ labelId: e }).setPayload(t), Rn = (e) => g("/label/:labelId").setMethod("delete").setRouteParams({ labelId: e }), En = (e, t, i) => g("/label/establishment/:establishmentId/candidate/:candidateId/synchronize").setMethod("post").setPayload(i).setRouteParams({ establishmentId: e, candidateId: t }), mr = () => ({
926
+ }), An = (e) => g("/label/establishment/:establishmentId").isList().setRouteParams({ establishmentId: e }), Pn = (e, t) => g("/label/establishment/:establishmentId").setMethod("post").setRouteParams({ establishmentId: e }).setPayload(t), kn = (e, t) => g("/label/:labelId").setMethod("put").setRouteParams({ labelId: e }).setPayload(t), Rn = (e) => g("/label/:labelId").setMethod("delete").setRouteParams({ labelId: e }), En = (e, t, i) => g("/label/establishment/:establishmentId/candidate/:candidateId/synchronize").setMethod("post").setPayload(i).setRouteParams({ establishmentId: e, candidateId: t }), fr = () => ({
927
927
  listByEstablishment: An,
928
928
  addToEstablishment: Pn,
929
929
  update: kn,
930
930
  remove: Rn,
931
931
  syncForCandidate: En
932
- }), In = (e) => k("offer/:offerId").setRouteParams({ offerId: e }), fr = () => ({
932
+ }), In = (e) => k("offer/:offerId").setRouteParams({ offerId: e }), pr = () => ({
933
933
  read: In
934
934
  }), Cn = (e, t = !1) => {
935
935
  const i = g("/recruiter/establishment/:establishmentId").isList().setRouteParams({ establishmentId: e });
936
936
  return t && i.setQueryParam("exclude-me", 1), i;
937
- }, pr = () => ({
937
+ }, hr = () => ({
938
938
  listByEstablishment: Cn
939
- }), Sn = (e) => g("/recruitment/:recruitmentId").setRouteParams({ recruitmentId: e }), On = (e) => g("/recruitment/mine/establishment/:establishmentId").isList().setRouteParams({ establishmentId: e }), Tn = (e, t) => g("/recruitment/mine/establishment/:establishmentId/has-not/candidate/:candidateId").isList().setRouteParams({ establishmentId: e, candidateId: t }), $n = (e, t) => g("/recruitment/mine/establishment/:establishmentId/has/candidate/:candidateId").isList().setRouteParams({ establishmentId: e, candidateId: t }), Ln = (e, t) => g("/recruitment/establishment/:establishmentId/has/candidate/:candidateId").isList().setRouteParams({ establishmentId: e, candidateId: t }), Mn = (e, t) => g("/recruitment/:recruitmentId/candidate").setMethod("put").setRouteParams({ recruitmentId: e }).setPayload(t), Nn = (e, t) => g("/recruitment/:recruitmentId/candidate/:candidateId").setMethod("delete").setRouteParams({ recruitmentId: e, candidateId: t }), hr = () => ({
939
+ }), Sn = (e) => g("/recruitment/:recruitmentId").setRouteParams({ recruitmentId: e }), On = (e) => g("/recruitment/mine/establishment/:establishmentId").isList().setRouteParams({ establishmentId: e }), Tn = (e, t) => g("/recruitment/mine/establishment/:establishmentId/has-not/candidate/:candidateId").isList().setRouteParams({ establishmentId: e, candidateId: t }), $n = (e, t) => g("/recruitment/mine/establishment/:establishmentId/has/candidate/:candidateId").isList().setRouteParams({ establishmentId: e, candidateId: t }), Ln = (e, t) => g("/recruitment/establishment/:establishmentId/has/candidate/:candidateId").isList().setRouteParams({ establishmentId: e, candidateId: t }), Mn = (e, t) => g("/recruitment/:recruitmentId/candidate").setMethod("put").setRouteParams({ recruitmentId: e }).setPayload(t), Nn = (e, t) => g("/recruitment/:recruitmentId/candidate/:candidateId").setMethod("delete").setRouteParams({ recruitmentId: e, candidateId: t }), yr = () => ({
940
940
  read: Sn,
941
941
  mineByEstablishment: On,
942
942
  mineWithoutCandidate: Tn,
@@ -947,22 +947,22 @@ const Lt = (e, t) => g("/v2/activity/candidate/:candidateId/establishment/:estab
947
947
  }), Dn = (e, t, i, n = null) => {
948
948
  const r = k("candidate/register/open").setMethod("post"), c = { email: e };
949
949
  return t === "establishment" && (c.establishmentId = i), t === "offer" && (c.offerId = i), n && (c.referer = n), r.setPayload(c), r;
950
- }, jn = (e, t) => k("candidate/register/update/:token").setMethod("post").setRouteParams({ token: e }).setPayload(t), xn = (e) => k("candidate/register/read/:token").setRouteParams({ token: e }), _n = (e) => k("candidate/register/close/:token").setMethod("post").setRouteParams({ token: e }), yr = () => ({
950
+ }, jn = (e, t) => k("candidate/register/update/:token").setMethod("post").setRouteParams({ token: e }).setPayload(t), xn = (e) => k("candidate/register/read/:token").setRouteParams({ token: e }), _n = (e) => k("candidate/register/close/:token").setMethod("post").setRouteParams({ token: e }), gr = () => ({
951
951
  open: Dn,
952
952
  update: jn,
953
953
  read: xn,
954
954
  close: _n
955
- }), Bn = (e, t) => g("/v2/registrations/lookup").setQueryParam("candidate-id", e).setQueryParam("establishment-id", t), gr = () => ({
955
+ }), Bn = (e, t) => g("/v2/registrations/lookup").setQueryParam("candidate-id", e).setQueryParam("establishment-id", t), br = () => ({
956
956
  lookupEstablishment: Bn
957
- }), zn = () => k("speciality").isList().addGroup("Term:id").addGroup("Term:name"), Un = (e, t = !0) => g("speciality/establishment/:establishmentId").isList().setRouteParams({ establishmentId: e }).setQueryParam("all", t).addGroup("Term:id").addGroup("Term:name"), br = () => ({
957
+ }), zn = () => k("speciality").isList().addGroup("Term:id").addGroup("Term:name"), Un = (e, t = !0) => g("speciality/establishment/:establishmentId").isList().setRouteParams({ establishmentId: e }).setQueryParam("all", t).addGroup("Term:id").addGroup("Term:name"), wr = () => ({
958
958
  list: zn,
959
959
  listByEstablishment: Un
960
- }), Vn = (e) => g("/tag/public/establishment/:establishmentId").isList().setRouteParams({ establishmentId: e }), wr = () => ({
960
+ }), Vn = (e) => g("/tag/public/establishment/:establishmentId").isList().setRouteParams({ establishmentId: e }), vr = () => ({
961
961
  listByEstablishment: Vn
962
- }), Fn = (e, t) => g("/v2/talents/lookup").setQueryParam("candidate-id", e).setQueryParam("establishment-id", t), Hn = (e) => g("/v2/talents/index").setMethod("post").setPayload(e), vr = () => ({
962
+ }), Fn = (e, t) => g("/v2/talents/lookup").setQueryParam("candidate-id", e).setQueryParam("establishment-id", t), Hn = (e) => g("/v2/talents/index").setMethod("post").setPayload(e), Ar = () => ({
963
963
  lookupTalent: Fn,
964
964
  addCandidateToTalentPool: Hn
965
- }), Qn = (e) => k("user/email/isset/:email").setRouteParams({ email: e }), qn = () => g("user/self").addGroup("user:self"), Gn = (e) => g("/user/:uuid").setRouteParams({ uuid: e }), Kn = (e) => k("/user/:uuid").setRouteParams({ uuid: e }), Wn = (e) => g("/user/:id/uuid").setRouteParams({ id: e }), fe = () => ({
965
+ }), Qn = (e) => k("user/email/isset/:email").setRouteParams({ email: e }), qn = () => g("user/self").addGroup("user:self"), Gn = (e) => g("/user/:uuid").setRouteParams({ uuid: e }), Kn = (e) => k("/user/:uuid").setRouteParams({ uuid: e }), Wn = (e) => g("/user/:id/uuid").setRouteParams({ id: e }), pe = () => ({
966
966
  emailExists: Qn,
967
967
  self: qn,
968
968
  byUuidPrivate: Gn,
@@ -980,7 +980,7 @@ function Jn() {
980
980
  }, t = async () => {
981
981
  if (!z().isAuthenticated())
982
982
  throw new Error("::SDK Authorization:: User not authenticated");
983
- const s = (await fe().self().send()).getData();
983
+ const s = (await pe().self().send()).getData();
984
984
  e.user = {
985
985
  id: s.id,
986
986
  email: s.email,
@@ -991,7 +991,7 @@ function Jn() {
991
991
  }, i = async (s) => {
992
992
  if (!z().isAuthenticated())
993
993
  throw new Error("::SDK Authorization:: User not authenticated");
994
- e.establishments[s] = (await me().authorizations(s).send()).getData();
994
+ e.establishments[s] = (await fe().authorizations(s).send()).getData();
995
995
  }, n = (s) => {
996
996
  if (e.user === void 0)
997
997
  throw new Error("::SDK Authorization:: User not fetched");
@@ -1015,7 +1015,7 @@ function Jn() {
1015
1015
  }
1016
1016
  }, _;
1017
1017
  }
1018
- async function Ar(e, ...t) {
1018
+ async function Pr(e, ...t) {
1019
1019
  if (!z().isAuthenticated())
1020
1020
  throw "ERR_NOT_AUTHENTICATED";
1021
1021
  const n = Jn();
@@ -1029,7 +1029,7 @@ async function Ar(e, ...t) {
1029
1029
  throw "ERR_MISSING_PERMISSION";
1030
1030
  }
1031
1031
  }
1032
- const Pr = Be("authorization", {
1032
+ const kr = ze("authorization", {
1033
1033
  state: () => ({
1034
1034
  user: void 0,
1035
1035
  establishments: {}
@@ -1049,13 +1049,13 @@ const Pr = Be("authorization", {
1049
1049
  actions: {
1050
1050
  async fetchSelf(e) {
1051
1051
  if (this.user === void 0 || e) {
1052
- const t = await fe().self().send();
1052
+ const t = await pe().self().send();
1053
1053
  this.user = t.getData();
1054
1054
  }
1055
1055
  },
1056
1056
  async fetchPermission(e, t) {
1057
1057
  if (!this.establishments[e] || t) {
1058
- const i = await me().authorizations(e).send();
1058
+ const i = await fe().authorizations(e).send();
1059
1059
  this.establishments[e] = i.getData();
1060
1060
  }
1061
1061
  },
@@ -1304,13 +1304,13 @@ function Yn() {
1304
1304
  }
1305
1305
  function ei() {
1306
1306
  const e = "Visual Builder";
1307
- function t(o, Le) {
1307
+ function t(o, Me) {
1308
1308
  if (!o)
1309
1309
  throw new Error(`Missing arguments for domain "${e}"`);
1310
1310
  const L = {
1311
1311
  companyId: o.companyId ? o.companyId.toString() : null
1312
1312
  };
1313
- return Le && (L.productId = o.companyId ? o.companyId + "_2" : null), o.selections && (L.selections = o.selections), o.error && (L.error = o.error), o.institutionId && (L.institutionId = [o.institutionId.toString()]), L;
1313
+ return Me && (L.productId = o.companyId ? o.companyId + "_2" : null), o.selections && (L.selections = o.selections), o.error && (L.error = o.error), o.institutionId && (L.institutionId = [o.institutionId.toString()]), L;
1314
1314
  }
1315
1315
  async function i(o) {
1316
1316
  return y().page(o.name, e, t(o.properties, !0));
@@ -1369,9 +1369,6 @@ function ei() {
1369
1369
  async function I(o) {
1370
1370
  return y().page(o.name, e, t(o.properties, !1));
1371
1371
  }
1372
- async function be(o) {
1373
- return y().track(o.name, e, t(o.properties, !0));
1374
- }
1375
1372
  async function we(o) {
1376
1373
  return y().track(o.name, e, t(o.properties, !0));
1377
1374
  }
@@ -1409,6 +1406,9 @@ function ei() {
1409
1406
  return y().track(o.name, e, t(o.properties, !0));
1410
1407
  }
1411
1408
  async function $e(o) {
1409
+ return y().track(o.name, e, t(o.properties, !0));
1410
+ }
1411
+ async function Le(o) {
1412
1412
  return y().page(o.name, e, t(o.properties, !1));
1413
1413
  }
1414
1414
  return {
@@ -1431,20 +1431,20 @@ function ei() {
1431
1431
  setupSocialNetworkViewed: P,
1432
1432
  setupThemeViewed: R,
1433
1433
  visualBuilderViewed: I,
1434
- setupImageUploadFailed: be,
1435
- fastCopyLinkClicked: we,
1436
- setupBenefitCustomDeleted: ve,
1437
- setupBenefitCustomEdited: Ae,
1438
- setupContactDeleted: Pe,
1439
- setupContactEdited: ke,
1440
- setupContactNewClicked: Re,
1441
- setupPresentationContentDeleted: Ee,
1442
- setupPresentationContentDuplicated: Ie,
1443
- setupPresentationContentMoved: Ce,
1444
- setupPresentationTabDeleted: Se,
1445
- setupPresentationTabEdited: Oe,
1446
- setupPresentationTabMoved: Te,
1447
- setupSEOViewed: $e
1434
+ setupImageUploadFailed: we,
1435
+ fastCopyLinkClicked: ve,
1436
+ setupBenefitCustomDeleted: Ae,
1437
+ setupBenefitCustomEdited: Pe,
1438
+ setupContactDeleted: ke,
1439
+ setupContactEdited: Re,
1440
+ setupContactNewClicked: Ee,
1441
+ setupPresentationContentDeleted: Ie,
1442
+ setupPresentationContentDuplicated: Ce,
1443
+ setupPresentationContentMoved: Se,
1444
+ setupPresentationTabDeleted: Oe,
1445
+ setupPresentationTabEdited: Te,
1446
+ setupPresentationTabMoved: $e,
1447
+ setupSEOViewed: Le
1448
1448
  };
1449
1449
  }
1450
1450
  const Y = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
@@ -1454,7 +1454,7 @@ const Y = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1454
1454
  useAnalyticsRecruitment: Yn,
1455
1455
  useAnalyticsVisualBuilder: ei
1456
1456
  }, Symbol.toStringTag, { value: "Module" }));
1457
- function kr() {
1457
+ function Rr() {
1458
1458
  function e(i) {
1459
1459
  return y().identify(i.id, {
1460
1460
  email: i.email,
@@ -1506,7 +1506,7 @@ const ti = async (e, t) => {
1506
1506
  }, G = () => {
1507
1507
  const e = O.getEnvironment();
1508
1508
  return e === "prod" || e === "production" ? "pPROC7dPoJ7XdxHrwsTQNXCGX79MJjhp" : e === "staging" ? "823rqOTwVk1ZCWVyBAdLInZ77TcFF0CF" : "TMZX6evFnu87JrBHV5qLwHsld5C6hilZ";
1509
- }, pe = () => {
1509
+ }, he = () => {
1510
1510
  const e = window.analytics = window.analytics || [];
1511
1511
  if (!e.initialize && e.invoked)
1512
1512
  A.error("Segment snippet included twice.");
@@ -1537,19 +1537,19 @@ const ti = async (e, t) => {
1537
1537
  A.error("Analytics script failed to load. Consider disabling your AdBlocker."), t();
1538
1538
  }), A.info("Loading Analytics script."), window.analytics)
1539
1539
  return e();
1540
- pe();
1541
- })), B), Rr = {
1540
+ he();
1541
+ })), B), Er = {
1542
1542
  key: G,
1543
- appendScript: pe,
1543
+ appendScript: he,
1544
1544
  ready: U,
1545
1545
  identify: ti,
1546
1546
  page: ni,
1547
1547
  track: ii
1548
1548
  }, ri = "AIzaSyDicyRD6rvVdnicp1tgV0ElazASNGbyyTs";
1549
- let he = !1;
1550
- const ye = () => new Promise((e) => {
1551
- T() || he || window.google && window.google.maps ? e() : (window.addEventListener("gmap-ready", () => e()), ai());
1552
- }), si = (e, t) => ye().then(() => {
1549
+ let ye = !1;
1550
+ const ge = () => new Promise((e) => {
1551
+ T() || ye || window.google && window.google.maps ? e() : (window.addEventListener("gmap-ready", () => e()), ai());
1552
+ }), si = (e, t) => ge().then(() => {
1553
1553
  T() || oi(e, t);
1554
1554
  }), oi = (e, t) => {
1555
1555
  const i = new window.google.maps.places.Autocomplete(e, { componentRestrictions: { country: ["fr", "re", "yt", "gp", "mq"] } });
@@ -1561,9 +1561,9 @@ const ye = () => new Promise((e) => {
1561
1561
  window.onGmapScriptReady = () => {
1562
1562
  };
1563
1563
  const e = document.createElement("script");
1564
- e.src = "https://maps.googleapis.com/maps/api/js?key=" + ri + "&libraries=places&callback=onGmapScriptReady", e.async = !0, e.defer = !0, e.onload = () => window.dispatchEvent(new Event("gmap-ready")), document.body.appendChild(e), he = !0;
1565
- }, Er = {
1566
- scriptReady: ye,
1564
+ e.src = "https://maps.googleapis.com/maps/api/js?key=" + ri + "&libraries=places&callback=onGmapScriptReady", e.async = !0, e.defer = !0, e.onload = () => window.dispatchEvent(new Event("gmap-ready")), document.body.appendChild(e), ye = !0;
1565
+ }, Ir = {
1566
+ scriptReady: ge,
1567
1567
  autocompleteInput: si
1568
1568
  }, ci = {
1569
1569
  common: {
@@ -1594,7 +1594,7 @@ const ye = () => new Promise((e) => {
1594
1594
  fr: ci
1595
1595
  };
1596
1596
  let K = null;
1597
- const di = () => K, Ir = (e = {}) => {
1597
+ const di = () => K, Cr = (e = {}) => {
1598
1598
  let t = e.locale || "fr";
1599
1599
  const i = (u) => t = u, n = () => t, r = re(ui, (e == null ? void 0 : e.messages) || {}), c = (u, s) => {
1600
1600
  const a = $(r, `${t}.${u}`);
@@ -1634,7 +1634,7 @@ const di = () => K, Ir = (e = {}) => {
1634
1634
  variable: (e, t) => V("span", { class: "node node--variable" }, $(t, e.trim())),
1635
1635
  text: (e) => V("span", { class: "node node--text" }, e)
1636
1636
  };
1637
- function Cr(e) {
1637
+ function Sr(e) {
1638
1638
  const { t } = di(), i = {
1639
1639
  justNow: t("timeAgo.just-now"),
1640
1640
  past: (n) => n.match(/\d/) ? t("timeAgo.ago", [n]) : n,
@@ -1648,7 +1648,7 @@ function Cr(e) {
1648
1648
  second: (n) => `${n} ${t("timeAgo.second", n)}`,
1649
1649
  invalid: ""
1650
1650
  };
1651
- return ze(e, {
1651
+ return Ue(e, {
1652
1652
  fullDateFormatter: (n) => n.toLocaleDateString(),
1653
1653
  messages: i
1654
1654
  });
@@ -1733,7 +1733,7 @@ function hi(e) {
1733
1733
  dispatch: t
1734
1734
  };
1735
1735
  }
1736
- function Sr() {
1736
+ function Or() {
1737
1737
  let e = !1;
1738
1738
  function t(r, c, d) {
1739
1739
  n(), d();
@@ -1755,14 +1755,14 @@ function Sr() {
1755
1755
  handle: n
1756
1756
  };
1757
1757
  }
1758
- const Or = () => ({ getAssetUrl: (t) => `${O.getBaseAssetsUrl()}${t}` }), v = () => O.getMainAppHost(), yi = () => `${v()}/rh/establishments`, gi = (e) => `${v()}/rh/establishment/${e}`, bi = (e) => {
1758
+ const Tr = () => ({ getAssetUrl: (t) => `${O.getBaseAssetsUrl()}${t}` }), v = () => O.getMainAppHost(), yi = () => `${v()}/rh/establishments`, gi = (e) => `${v()}/rh/establishment/${e}`, bi = (e) => {
1759
1759
  var t;
1760
1760
  return typeof e == "string" ? e : typeof e == "object" && ((t = e == null ? void 0 : e.urls) != null && t.display) ? e.urls.display : null;
1761
1761
  }, wi = () => `${v()}/rh/dashboard`, vi = (e) => `${v()}/candidate-invite/establishment/${e}`, Ai = (e, t = !1) => t ? `${v()}/cvbank/${e}` : `${v()}/rh/establishment/${e}/cvtheque`, Pi = (e, t) => `${v()}/user-profile/establishment/${e}/user/${t}`, ki = (e) => `${v()}/rh/establishment/${e}/recruitment`, Ri = (e, t) => `${v()}/rh/establishment/${e}/recruitment/${t}`, Ei = (e, t) => `${v()}/rh/establishment/${e}/recruitment/${t}/kanban`, Ii = (e) => `${v()}/rh/establishment/${e}/career-configuration`, Ci = (e, t = null) => t ? `${v()}/career-website/${e}/${t}` : `${v()}/career-website/${e}`, Si = (e, t) => `${v()}/career-website-preview/${e}/${t}`, Oi = (e, t = null) => {
1762
1762
  const i = v().replace("://", `://${e}.`);
1763
1763
  return t ? `${i}?_version=${t}` : `${i}`;
1764
1764
  }, Ti = (e) => `${v()}/rh/establishment/${e}/stats`, $i = (e) => `${v()}/rh/establishment/${e}/backoffice`, Li = () => `${v()}/rh/settings/general`;
1765
- function Tr() {
1765
+ function $r() {
1766
1766
  return {
1767
1767
  root: v,
1768
1768
  establishments: yi,
@@ -1794,21 +1794,21 @@ const Q = (e) => {
1794
1794
  for (const t of e.classList)
1795
1795
  N.has(t) || ne.has(t) || W.ignore(t) || (ne.add(t), A.error(`Undefined CSS class: ${t}`));
1796
1796
  }
1797
- }, ge = (e) => {
1797
+ }, be = (e) => {
1798
1798
  var t;
1799
1799
  for (const i of e)
1800
1800
  if (i != null && i.cssRules && (i == null ? void 0 : i.cssRules.length) > 0)
1801
- ge(i.cssRules);
1801
+ be(i.cssRules);
1802
1802
  else if (i.selectorText) {
1803
1803
  const n = (t = i.selectorText) == null ? void 0 : t.match(/\.[\w-]+/g);
1804
1804
  if (n)
1805
1805
  for (const r of n)
1806
1806
  N.add(r.substr(1));
1807
1807
  }
1808
- }, $r = (e = {}) => {
1808
+ }, Lr = (e = {}) => {
1809
1809
  if (N)
1810
1810
  return N;
1811
- N = /* @__PURE__ */ new Set(), W = { ...W, ...e }, ge(document.styleSheets), new MutationObserver((i) => {
1811
+ N = /* @__PURE__ */ new Set(), W = { ...W, ...e }, be(document.styleSheets), new MutationObserver((i) => {
1812
1812
  for (const n of i)
1813
1813
  if (n.type === "childList" && (n != null && n.addedNodes)) {
1814
1814
  for (const r of n.addedNodes)
@@ -1824,20 +1824,20 @@ const Q = (e) => {
1824
1824
  childList: !0,
1825
1825
  subtree: !0
1826
1826
  });
1827
- }, Lr = "0.2.64";
1827
+ }, Mr = "0.2.65";
1828
1828
  export {
1829
- Rr as Analytics,
1829
+ Er as Analytics,
1830
1830
  q as BaseLogger,
1831
- Er as Gmap,
1831
+ Ir as Gmap,
1832
1832
  O as SDKConfig,
1833
1833
  A as SDKLogger,
1834
- Lr as VERSION,
1835
- tt as _clone,
1834
+ Mr as VERSION,
1835
+ nt as _clone,
1836
1836
  $ as _get,
1837
1837
  re as _merge,
1838
1838
  Z as _set,
1839
- Ir as createI18n,
1840
- Zi as ensureScheme,
1839
+ Cr as createI18n,
1840
+ Xi as ensureScheme,
1841
1841
  Bi as inBrowser,
1842
1842
  T as inNode,
1843
1843
  se as isArray,
@@ -1851,53 +1851,54 @@ export {
1851
1851
  it as isNull,
1852
1852
  st as isNullOrUndefined,
1853
1853
  Ui as isNumber,
1854
- nt as isObject,
1854
+ oe as isObject,
1855
1855
  Wi as isObjectOf,
1856
1856
  Vi as isString,
1857
1857
  qi as isTruthy,
1858
1858
  rt as isUndefined,
1859
- Ji as secureScheme,
1860
- Xi as useActivityRepository,
1859
+ Ji as objectPropsAre,
1860
+ Zi as secureScheme,
1861
+ Yi as useActivityRepository,
1861
1862
  Zn as useAnalyticsHublerApplication,
1862
- kr as useAnalyticsIdentify,
1863
+ Rr as useAnalyticsIdentify,
1863
1864
  Xn as useAnalyticsProfile,
1864
1865
  Yn as useAnalyticsRecruitment,
1865
1866
  ei as useAnalyticsVisualBuilder,
1866
- Or as useAssetUrls,
1867
+ Tr as useAssetUrls,
1867
1868
  z as useAuthentication,
1868
1869
  Jn as useAuthorization,
1869
- Pr as useAuthorizationStore,
1870
- Ar as useCanAccessEstablishmentMiddleware,
1871
- Yi as useCandidateRepository,
1872
- er as useCommentRepository,
1873
- tr as useContractTypeRepository,
1870
+ kr as useAuthorizationStore,
1871
+ Pr as useCanAccessEstablishmentMiddleware,
1872
+ er as useCandidateRepository,
1873
+ tr as useCommentRepository,
1874
+ nr as useContractTypeRepository,
1874
1875
  ct as useCookieStorage,
1875
- nr as useCvbankRepository,
1876
- ir as useCvthequeRepository,
1877
- rr as useDiplomaRepository,
1878
- sr as useDocumentRepository,
1879
- Tr as useDomainUrls,
1880
- or as useEmailHistoryRepository,
1881
- ar as useEmailRepository,
1882
- cr as useEmailTemplateRepository,
1883
- ur as useEstablishmentCareerRepository,
1884
- me as useEstablishmentRepository,
1885
- dr as useFeatureFlagRepository,
1876
+ ir as useCvbankRepository,
1877
+ rr as useCvthequeRepository,
1878
+ sr as useDiplomaRepository,
1879
+ or as useDocumentRepository,
1880
+ $r as useDomainUrls,
1881
+ ar as useEmailHistoryRepository,
1882
+ cr as useEmailRepository,
1883
+ ur as useEmailTemplateRepository,
1884
+ dr as useEstablishmentCareerRepository,
1885
+ fe as useEstablishmentRepository,
1886
+ lr as useFeatureFlagRepository,
1886
1887
  di as useI18n,
1887
- lr as useJobRepository,
1888
- mr as useLabelRepository,
1889
- Cr as useLocaleTimeAgo,
1890
- fr as useOfferRepository,
1888
+ mr as useJobRepository,
1889
+ fr as useLabelRepository,
1890
+ Sr as useLocaleTimeAgo,
1891
+ pr as useOfferRepository,
1891
1892
  g as usePrivateRequest,
1892
- Sr as useQSAction,
1893
- pr as useRecruiterRepository,
1894
- hr as useRecruitmentRepository,
1895
- yr as useRegisterRepository,
1896
- gr as useRegistrationRepository,
1893
+ Or as useQSAction,
1894
+ hr as useRecruiterRepository,
1895
+ yr as useRecruitmentRepository,
1896
+ gr as useRegisterRepository,
1897
+ br as useRegistrationRepository,
1897
1898
  k as useRequest,
1898
- br as useSpecialityRepository,
1899
- wr as useTagRepository,
1900
- vr as useTalentRepository,
1901
- $r as useUndefinedCssClasses,
1902
- fe as useUserRepository
1899
+ wr as useSpecialityRepository,
1900
+ vr as useTagRepository,
1901
+ Ar as useTalentRepository,
1902
+ Lr as useUndefinedCssClasses,
1903
+ pe as useUserRepository
1903
1904
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hublo/mstaff-client-sdk",
3
- "version": "0.2.65",
3
+ "version": "0.2.66",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"