@wikicasa-dev/utilities 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -0
- package/dist/utilities.cjs +4 -4
- package/dist/utilities.iife.js +2 -2
- package/dist/utilities.mjs +57 -51
- package/dist/utils/DateUtils.d.ts +1 -0
- package/package.json +2 -5
- package/src/custom/constants.ts +3 -0
- package/src/custom/icons.ts +63 -0
- package/src/custom/leaflet_map.ts +946 -0
- package/src/index.ts +173 -0
- package/src/services/agencyAPI.ts +105 -0
- package/src/services/geographyAPI.ts +129 -0
- package/src/services/insightsAPI.ts +20 -0
- package/src/services/mailAPI.ts +89 -0
- package/src/services/placesAPI.ts +72 -0
- package/src/services/portfolioCustomerAPI.ts +16 -0
- package/src/services/publicUserAPI.ts +216 -0
- package/src/services/realEstateAPI.ts +133 -0
- package/src/services/requestAPI.ts +40 -0
- package/src/services/servicesUtils.ts +27 -0
- package/src/services/statisticsAPI.ts +84 -0
- package/src/services/valuationAPI.ts +45 -0
- package/src/services/wikicasaPro.ts +25 -0
- package/src/utils/AppRedirectUtils.ts +26 -0
- package/src/utils/ArrayUtils.ts +2 -0
- package/src/utils/ColorUtils.ts +11 -0
- package/src/utils/CookieUtils.ts +43 -0
- package/src/utils/CurrencyUtils.ts +18 -0
- package/src/utils/DOMUtils.ts +28 -0
- package/src/utils/DateUtils.ts +9 -0
- package/src/utils/DeviceDetectionUtils.ts +17 -0
- package/src/utils/EmailUtils.ts +45 -0
- package/src/utils/FavoriteUtils.ts +19 -0
- package/src/utils/FunctionUtils.ts +29 -0
- package/src/utils/GAEvents.ts +414 -0
- package/src/utils/GAutocompleteUtils.ts +70 -0
- package/src/utils/GenericUtils.ts +37 -0
- package/src/utils/LazyLoadingBg.ts +18 -0
- package/src/utils/MapUtils.ts +118 -0
- package/src/utils/NumberUtils.ts +90 -0
- package/src/utils/ObjectUtils.ts +34 -0
- package/src/utils/ObserverUtils.ts +32 -0
- package/src/utils/PermissionUtils.ts +41 -0
- package/src/utils/RESB_UrlBuilder.ts +99 -0
- package/src/utils/RequestUtils.ts +20 -0
- package/src/utils/StringUtils.ts +67 -0
- package/src/utils/URLBuilderUtils.ts +21 -0
- package/src/utils/URLPagesFactory.ts +20 -0
- package/src/vite-env.d.ts +1 -0
- package/tsconfig.json +38 -0
- package/vite.config.ts +42 -0
package/dist/utilities.iife.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var utilities=function(c){"use strict";const B=window._baseURLIt,m=e=>{const t=`errorMessage: ${e.message}
|
|
2
2
|
`;e.response?console.error(`${t} errorCode: ${e.response.status} \\n ${e.request.data}`):e.request?console.error(`${t}
|
|
3
|
-
${e.request}`):console.error(t)};function _e(e,t){return function(){return e.apply(t,arguments)}}const{toString:wt}=Object.prototype,{getPrototypeOf:ae}=Object,W=(e=>t=>{const n=wt.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),P=e=>(e=e.toLowerCase(),t=>W(t)===e),H=e=>t=>typeof t===e,{isArray:U}=Array,k=H("undefined");function vt(e){return e!==null&&!k(e)&&e.constructor!==null&&!k(e.constructor)&&R(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Pe=P("ArrayBuffer");function bt(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Pe(e.buffer),t}const At=H("string"),R=H("function"),$e=H("number"),J=e=>e!==null&&typeof e=="object",Et=e=>e===!0||e===!1,x=e=>{if(W(e)!=="object")return!1;const t=ae(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},St=P("Date"),Rt=P("File"),_t=P("Blob"),Pt=P("FileList"),$t=e=>J(e)&&R(e.pipe),Ct=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||R(e.append)&&((t=W(e))==="formdata"||t==="object"&&R(e.toString)&&e.toString()==="[object FormData]"))},Ot=P("URLSearchParams"),Nt=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function D(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),U(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const i=n?Object.getOwnPropertyNames(e):Object.keys(e),s=i.length;let u;for(r=0;r<s;r++)u=i[r],t.call(null,e[u],u,e)}}function Ce(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const Oe=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Ne=e=>!k(e)&&e!==Oe;function ce(){const{caseless:e}=Ne(this)&&this||{},t={},n=(r,o)=>{const i=e&&Ce(t,o)||o;x(t[i])&&x(r)?t[i]=ce(t[i],r):x(r)?t[i]=ce({},r):U(r)?t[i]=r.slice():t[i]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&D(arguments[r],n);return t}const Tt=(e,t,n,{allOwnKeys:r}={})=>(D(t,(o,i)=>{n&&R(o)?e[i]=_e(o,n):e[i]=o},{allOwnKeys:r}),e),Lt=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Ut=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},It=(e,t,n,r)=>{let o,i,s;const u={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],(!r||r(s,e,t))&&!u[s]&&(t[s]=e[s],u[s]=!0);e=n!==!1&&ae(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Ft=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Mt=e=>{if(!e)return null;if(U(e))return e;let t=e.length;if(!$e(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Bt=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ae(Uint8Array)),kt=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},Dt=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Gt=P("HTMLFormElement"),qt=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Te=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),jt=P("RegExp"),Le=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};D(n,(o,i)=>{t(o,i,e)!==!1&&(r[i]=o)}),Object.defineProperties(e,r)},zt=e=>{Le(e,(t,n)=>{if(R(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(R(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Vt=(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return U(e)?r(e):r(String(e).split(t)),n},Wt=()=>{},Ht=(e,t)=>(e=+e,Number.isFinite(e)?e:t),ue="abcdefghijklmnopqrstuvwxyz",Ue="0123456789",Ie={DIGIT:Ue,ALPHA:ue,ALPHA_DIGIT:ue+ue.toUpperCase()+Ue},Jt=(e=16,t=Ie.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function xt(e){return!!(e&&R(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Kt=e=>{const t=new Array(10),n=(r,o)=>{if(J(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const i=U(r)?[]:{};return D(r,(s,u)=>{const h=n(s,o+1);!k(h)&&(i[u]=h)}),t[o]=void 0,i}}return r};return n(e,0)},Qt=P("AsyncFunction"),a={isArray:U,isArrayBuffer:Pe,isBuffer:vt,isFormData:Ct,isArrayBufferView:bt,isString:At,isNumber:$e,isBoolean:Et,isObject:J,isPlainObject:x,isUndefined:k,isDate:St,isFile:Rt,isBlob:_t,isRegExp:jt,isFunction:R,isStream:$t,isURLSearchParams:Ot,isTypedArray:Bt,isFileList:Pt,forEach:D,merge:ce,extend:Tt,trim:Nt,stripBOM:Lt,inherits:Ut,toFlatObject:It,kindOf:W,kindOfTest:P,endsWith:Ft,toArray:Mt,forEachEntry:kt,matchAll:Dt,isHTMLForm:Gt,hasOwnProperty:Te,hasOwnProp:Te,reduceDescriptors:Le,freezeMethods:zt,toObjectSet:Vt,toCamelCase:qt,noop:Wt,toFiniteNumber:Ht,findKey:Ce,global:Oe,isContextDefined:Ne,ALPHABET:Ie,generateString:Jt,isSpecCompliantForm:xt,toJSONObject:Kt,isAsyncFn:Qt,isThenable:e=>e&&(J(e)||R(e))&&R(e.then)&&R(e.catch)};function w(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}a.inherits(w,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:a.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Fe=w.prototype,Me={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Me[e]={value:e}}),Object.defineProperties(w,Me),Object.defineProperty(Fe,"isAxiosError",{value:!0}),w.from=(e,t,n,r,o,i)=>{const s=Object.create(Fe);return a.toFlatObject(e,s,function(h){return h!==Error.prototype},u=>u!=="isAxiosError"),w.call(s,e.message,t,n,r,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const Xt=null;function le(e){return a.isPlainObject(e)||a.isArray(e)}function Be(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function ke(e,t,n){return e?e.concat(t).map(function(o,i){return o=Be(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function Zt(e){return a.isArray(e)&&!e.some(le)}const Yt=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function K(e,t,n){if(!a.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=a.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,N){return!a.isUndefined(N[g])});const r=n.metaTokens,o=n.visitor||d,i=n.dots,s=n.indexes,h=(n.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(t);if(!a.isFunction(o))throw new TypeError("visitor must be a function");function l(p){if(p===null)return"";if(a.isDate(p))return p.toISOString();if(!h&&a.isBlob(p))throw new w("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(p)||a.isTypedArray(p)?h&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function d(p,g,N){let _=p;if(p&&!N&&typeof p=="object"){if(a.endsWith(g,"{}"))g=r?g:g.slice(0,-2),p=JSON.stringify(p);else if(a.isArray(p)&&Zt(p)||(a.isFileList(p)||a.endsWith(g,"[]"))&&(_=a.toArray(p)))return g=Be(g),_.forEach(function(ie,Po){!(a.isUndefined(ie)||ie===null)&&t.append(s===!0?ke([g],Po,i):s===null?g:g+"[]",l(ie))}),!1}return le(p)?!0:(t.append(ke(N,g,i),l(p)),!1)}const y=[],A=Object.assign(Yt,{defaultVisitor:d,convertValue:l,isVisitable:le});function v(p,g){if(!a.isUndefined(p)){if(y.indexOf(p)!==-1)throw Error("Circular reference detected in "+g.join("."));y.push(p),a.forEach(p,function(_,M){(!(a.isUndefined(_)||_===null)&&o.call(t,_,a.isString(M)?M.trim():M,g,A))===!0&&v(_,g?g.concat(M):[M])}),y.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return v(e),t}function De(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function de(e,t){this._pairs=[],e&&K(e,this,t)}const Ge=de.prototype;Ge.append=function(t,n){this._pairs.push([t,n])},Ge.toString=function(t){const n=t?function(r){return t.call(this,r,De)}:De;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function en(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function qe(e,t,n){if(!t)return e;const r=n&&n.encode||en,o=n&&n.serialize;let i;if(o?i=o(t,n):i=a.isURLSearchParams(t)?t.toString():new de(t,n).toString(r),i){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class tn{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){a.forEach(this.handlers,function(r){r!==null&&t(r)})}}const je=tn,ze={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},nn=typeof URLSearchParams<"u"?URLSearchParams:de,rn=typeof FormData<"u"?FormData:null,on=typeof Blob<"u"?Blob:null,sn=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),an=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),$={isBrowser:!0,classes:{URLSearchParams:nn,FormData:rn,Blob:on},isStandardBrowserEnv:sn,isStandardBrowserWebWorkerEnv:an,protocols:["http","https","file","blob","url","data"]};function cn(e,t){return K(e,new $.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,i){return $.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function un(e){return a.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function ln(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}function Ve(e){function t(n,r,o,i){let s=n[i++];const u=Number.isFinite(+s),h=i>=n.length;return s=!s&&a.isArray(o)?o.length:s,h?(a.hasOwnProp(o,s)?o[s]=[o[s],r]:o[s]=r,!u):((!o[s]||!a.isObject(o[s]))&&(o[s]=[]),t(n,r,o[s],i)&&a.isArray(o[s])&&(o[s]=ln(o[s])),!u)}if(a.isFormData(e)&&a.isFunction(e.entries)){const n={};return a.forEachEntry(e,(r,o)=>{t(un(r),o,n,0)}),n}return null}const dn={"Content-Type":void 0};function fn(e,t,n){if(a.isString(e))try{return(t||JSON.parse)(e),a.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Q={transitional:ze,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=a.isObject(t);if(i&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return o&&o?JSON.stringify(Ve(t)):t;if(a.isArrayBuffer(t)||a.isBuffer(t)||a.isStream(t)||a.isFile(t)||a.isBlob(t))return t;if(a.isArrayBufferView(t))return t.buffer;if(a.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let u;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return cn(t,this.formSerializer).toString();if((u=a.isFileList(t))||r.indexOf("multipart/form-data")>-1){const h=this.env&&this.env.FormData;return K(u?{"files[]":t}:t,h&&new h,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),fn(t)):t}],transformResponse:[function(t){const n=this.transitional||Q.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(t&&a.isString(t)&&(r&&!this.responseType||o)){const s=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(u){if(s)throw u.name==="SyntaxError"?w.from(u,w.ERR_BAD_RESPONSE,this,null,this.response):u}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:$.classes.FormData,Blob:$.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};a.forEach(["delete","get","head"],function(t){Q.headers[t]={}}),a.forEach(["post","put","patch"],function(t){Q.headers[t]=a.merge(dn)});const fe=Q,hn=a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),pn=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
3
|
+
${e.request}`):console.error(t)};function _e(e,t){return function(){return e.apply(t,arguments)}}const{toString:wt}=Object.prototype,{getPrototypeOf:ae}=Object,W=(e=>t=>{const n=wt.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),P=e=>(e=e.toLowerCase(),t=>W(t)===e),H=e=>t=>typeof t===e,{isArray:U}=Array,k=H("undefined");function vt(e){return e!==null&&!k(e)&&e.constructor!==null&&!k(e.constructor)&&R(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Pe=P("ArrayBuffer");function bt(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Pe(e.buffer),t}const At=H("string"),R=H("function"),$e=H("number"),J=e=>e!==null&&typeof e=="object",Et=e=>e===!0||e===!1,x=e=>{if(W(e)!=="object")return!1;const t=ae(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},St=P("Date"),Rt=P("File"),_t=P("Blob"),Pt=P("FileList"),$t=e=>J(e)&&R(e.pipe),Ct=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||R(e.append)&&((t=W(e))==="formdata"||t==="object"&&R(e.toString)&&e.toString()==="[object FormData]"))},Ot=P("URLSearchParams"),Nt=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function D(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),U(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const i=n?Object.getOwnPropertyNames(e):Object.keys(e),s=i.length;let u;for(r=0;r<s;r++)u=i[r],t.call(null,e[u],u,e)}}function Ce(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const Oe=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Ne=e=>!k(e)&&e!==Oe;function ce(){const{caseless:e}=Ne(this)&&this||{},t={},n=(r,o)=>{const i=e&&Ce(t,o)||o;x(t[i])&&x(r)?t[i]=ce(t[i],r):x(r)?t[i]=ce({},r):U(r)?t[i]=r.slice():t[i]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&D(arguments[r],n);return t}const Tt=(e,t,n,{allOwnKeys:r}={})=>(D(t,(o,i)=>{n&&R(o)?e[i]=_e(o,n):e[i]=o},{allOwnKeys:r}),e),Lt=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Ut=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},It=(e,t,n,r)=>{let o,i,s;const u={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],(!r||r(s,e,t))&&!u[s]&&(t[s]=e[s],u[s]=!0);e=n!==!1&&ae(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Ft=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Mt=e=>{if(!e)return null;if(U(e))return e;let t=e.length;if(!$e(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Bt=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ae(Uint8Array)),kt=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},Dt=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Gt=P("HTMLFormElement"),qt=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Te=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),jt=P("RegExp"),Le=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};D(n,(o,i)=>{t(o,i,e)!==!1&&(r[i]=o)}),Object.defineProperties(e,r)},zt=e=>{Le(e,(t,n)=>{if(R(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(R(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Vt=(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return U(e)?r(e):r(String(e).split(t)),n},Wt=()=>{},Ht=(e,t)=>(e=+e,Number.isFinite(e)?e:t),ue="abcdefghijklmnopqrstuvwxyz",Ue="0123456789",Ie={DIGIT:Ue,ALPHA:ue,ALPHA_DIGIT:ue+ue.toUpperCase()+Ue},Jt=(e=16,t=Ie.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function xt(e){return!!(e&&R(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Kt=e=>{const t=new Array(10),n=(r,o)=>{if(J(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const i=U(r)?[]:{};return D(r,(s,u)=>{const h=n(s,o+1);!k(h)&&(i[u]=h)}),t[o]=void 0,i}}return r};return n(e,0)},Qt=P("AsyncFunction"),a={isArray:U,isArrayBuffer:Pe,isBuffer:vt,isFormData:Ct,isArrayBufferView:bt,isString:At,isNumber:$e,isBoolean:Et,isObject:J,isPlainObject:x,isUndefined:k,isDate:St,isFile:Rt,isBlob:_t,isRegExp:jt,isFunction:R,isStream:$t,isURLSearchParams:Ot,isTypedArray:Bt,isFileList:Pt,forEach:D,merge:ce,extend:Tt,trim:Nt,stripBOM:Lt,inherits:Ut,toFlatObject:It,kindOf:W,kindOfTest:P,endsWith:Ft,toArray:Mt,forEachEntry:kt,matchAll:Dt,isHTMLForm:Gt,hasOwnProperty:Te,hasOwnProp:Te,reduceDescriptors:Le,freezeMethods:zt,toObjectSet:Vt,toCamelCase:qt,noop:Wt,toFiniteNumber:Ht,findKey:Ce,global:Oe,isContextDefined:Ne,ALPHABET:Ie,generateString:Jt,isSpecCompliantForm:xt,toJSONObject:Kt,isAsyncFn:Qt,isThenable:e=>e&&(J(e)||R(e))&&R(e.then)&&R(e.catch)};function w(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}a.inherits(w,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:a.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Fe=w.prototype,Me={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Me[e]={value:e}}),Object.defineProperties(w,Me),Object.defineProperty(Fe,"isAxiosError",{value:!0}),w.from=(e,t,n,r,o,i)=>{const s=Object.create(Fe);return a.toFlatObject(e,s,function(h){return h!==Error.prototype},u=>u!=="isAxiosError"),w.call(s,e.message,t,n,r,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const Xt=null;function le(e){return a.isPlainObject(e)||a.isArray(e)}function Be(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function ke(e,t,n){return e?e.concat(t).map(function(o,i){return o=Be(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function Zt(e){return a.isArray(e)&&!e.some(le)}const Yt=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function K(e,t,n){if(!a.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=a.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,N){return!a.isUndefined(N[g])});const r=n.metaTokens,o=n.visitor||d,i=n.dots,s=n.indexes,h=(n.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(t);if(!a.isFunction(o))throw new TypeError("visitor must be a function");function l(p){if(p===null)return"";if(a.isDate(p))return p.toISOString();if(!h&&a.isBlob(p))throw new w("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(p)||a.isTypedArray(p)?h&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function d(p,g,N){let _=p;if(p&&!N&&typeof p=="object"){if(a.endsWith(g,"{}"))g=r?g:g.slice(0,-2),p=JSON.stringify(p);else if(a.isArray(p)&&Zt(p)||(a.isFileList(p)||a.endsWith(g,"[]"))&&(_=a.toArray(p)))return g=Be(g),_.forEach(function(ie,$o){!(a.isUndefined(ie)||ie===null)&&t.append(s===!0?ke([g],$o,i):s===null?g:g+"[]",l(ie))}),!1}return le(p)?!0:(t.append(ke(N,g,i),l(p)),!1)}const y=[],A=Object.assign(Yt,{defaultVisitor:d,convertValue:l,isVisitable:le});function v(p,g){if(!a.isUndefined(p)){if(y.indexOf(p)!==-1)throw Error("Circular reference detected in "+g.join("."));y.push(p),a.forEach(p,function(_,M){(!(a.isUndefined(_)||_===null)&&o.call(t,_,a.isString(M)?M.trim():M,g,A))===!0&&v(_,g?g.concat(M):[M])}),y.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return v(e),t}function De(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function de(e,t){this._pairs=[],e&&K(e,this,t)}const Ge=de.prototype;Ge.append=function(t,n){this._pairs.push([t,n])},Ge.toString=function(t){const n=t?function(r){return t.call(this,r,De)}:De;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function en(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function qe(e,t,n){if(!t)return e;const r=n&&n.encode||en,o=n&&n.serialize;let i;if(o?i=o(t,n):i=a.isURLSearchParams(t)?t.toString():new de(t,n).toString(r),i){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class tn{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){a.forEach(this.handlers,function(r){r!==null&&t(r)})}}const je=tn,ze={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},nn=typeof URLSearchParams<"u"?URLSearchParams:de,rn=typeof FormData<"u"?FormData:null,on=typeof Blob<"u"?Blob:null,sn=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),an=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),$={isBrowser:!0,classes:{URLSearchParams:nn,FormData:rn,Blob:on},isStandardBrowserEnv:sn,isStandardBrowserWebWorkerEnv:an,protocols:["http","https","file","blob","url","data"]};function cn(e,t){return K(e,new $.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,i){return $.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function un(e){return a.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function ln(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}function Ve(e){function t(n,r,o,i){let s=n[i++];const u=Number.isFinite(+s),h=i>=n.length;return s=!s&&a.isArray(o)?o.length:s,h?(a.hasOwnProp(o,s)?o[s]=[o[s],r]:o[s]=r,!u):((!o[s]||!a.isObject(o[s]))&&(o[s]=[]),t(n,r,o[s],i)&&a.isArray(o[s])&&(o[s]=ln(o[s])),!u)}if(a.isFormData(e)&&a.isFunction(e.entries)){const n={};return a.forEachEntry(e,(r,o)=>{t(un(r),o,n,0)}),n}return null}const dn={"Content-Type":void 0};function fn(e,t,n){if(a.isString(e))try{return(t||JSON.parse)(e),a.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Q={transitional:ze,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=a.isObject(t);if(i&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return o&&o?JSON.stringify(Ve(t)):t;if(a.isArrayBuffer(t)||a.isBuffer(t)||a.isStream(t)||a.isFile(t)||a.isBlob(t))return t;if(a.isArrayBufferView(t))return t.buffer;if(a.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let u;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return cn(t,this.formSerializer).toString();if((u=a.isFileList(t))||r.indexOf("multipart/form-data")>-1){const h=this.env&&this.env.FormData;return K(u?{"files[]":t}:t,h&&new h,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),fn(t)):t}],transformResponse:[function(t){const n=this.transitional||Q.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(t&&a.isString(t)&&(r&&!this.responseType||o)){const s=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(u){if(s)throw u.name==="SyntaxError"?w.from(u,w.ERR_BAD_RESPONSE,this,null,this.response):u}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:$.classes.FormData,Blob:$.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};a.forEach(["delete","get","head"],function(t){Q.headers[t]={}}),a.forEach(["post","put","patch"],function(t){Q.headers[t]=a.merge(dn)});const fe=Q,hn=a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),pn=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
4
4
|
`).forEach(function(s){o=s.indexOf(":"),n=s.substring(0,o).trim().toLowerCase(),r=s.substring(o+1).trim(),!(!n||t[n]&&hn[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},We=Symbol("internals");function G(e){return e&&String(e).trim().toLowerCase()}function X(e){return e===!1||e==null?e:a.isArray(e)?e.map(X):String(e)}function mn(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const yn=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function he(e,t,n,r,o){if(a.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!a.isString(t)){if(a.isString(r))return t.indexOf(r)!==-1;if(a.isRegExp(r))return r.test(t)}}function gn(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function wn(e,t){const n=a.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,i,s){return this[r].call(this,t,o,i,s)},configurable:!0})})}class Z{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function i(u,h,l){const d=G(h);if(!d)throw new Error("header name must be a non-empty string");const y=a.findKey(o,d);(!y||o[y]===void 0||l===!0||l===void 0&&o[y]!==!1)&&(o[y||h]=X(u))}const s=(u,h)=>a.forEach(u,(l,d)=>i(l,d,h));return a.isPlainObject(t)||t instanceof this.constructor?s(t,n):a.isString(t)&&(t=t.trim())&&!yn(t)?s(pn(t),n):t!=null&&i(n,t,r),this}get(t,n){if(t=G(t),t){const r=a.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return mn(o);if(a.isFunction(n))return n.call(this,o,r);if(a.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=G(t),t){const r=a.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||he(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function i(s){if(s=G(s),s){const u=a.findKey(r,s);u&&(!n||he(r,r[u],u,n))&&(delete r[u],o=!0)}}return a.isArray(t)?t.forEach(i):i(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const i=n[r];(!t||he(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const n=this,r={};return a.forEach(this,(o,i)=>{const s=a.findKey(r,i);if(s){n[s]=X(o),delete n[i];return}const u=t?gn(i):String(i).trim();u!==i&&delete n[i],n[u]=X(o),r[u]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return a.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&a.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
5
|
-
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[We]=this[We]={accessors:{}}).accessors,o=this.prototype;function i(s){const u=G(s);r[u]||(wn(o,s),r[u]=!0)}return a.isArray(t)?t.forEach(i):i(t),this}}Z.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),a.freezeMethods(Z.prototype),a.freezeMethods(Z);const O=Z;function pe(e,t){const n=this||fe,r=t||n,o=O.from(r.headers);let i=r.data;return a.forEach(e,function(u){i=u.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function He(e){return!!(e&&e.__CANCEL__)}function q(e,t,n){w.call(this,e??"canceled",w.ERR_CANCELED,t,n),this.name="CanceledError"}a.inherits(q,w,{__CANCEL__:!0});function vn(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new w("Request failed with status code "+n.status,[w.ERR_BAD_REQUEST,w.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const bn=$.isStandardBrowserEnv?function(){return{write:function(n,r,o,i,s,u){const h=[];h.push(n+"="+encodeURIComponent(r)),a.isNumber(o)&&h.push("expires="+new Date(o).toGMTString()),a.isString(i)&&h.push("path="+i),a.isString(s)&&h.push("domain="+s),u===!0&&h.push("secure"),document.cookie=h.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function An(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function En(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function Je(e,t){return e&&!An(t)?En(e,t):t}const Sn=$.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function o(i){let s=i;return t&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=o(window.location.href),function(s){const u=a.isString(s)?o(s):s;return u.protocol===r.protocol&&u.host===r.host}}():function(){return function(){return!0}}();function Rn(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function _n(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,s;return t=t!==void 0?t:1e3,function(h){const l=Date.now(),d=r[i];s||(s=l),n[o]=h,r[o]=l;let y=i,A=0;for(;y!==o;)A+=n[y++],y=y%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),l-s<t)return;const v=d&&l-d;return v?Math.round(A*1e3/v):void 0}}function xe(e,t){let n=0;const r=_n(50,250);return o=>{const i=o.loaded,s=o.lengthComputable?o.total:void 0,u=i-n,h=r(u),l=i<=s;n=i;const d={loaded:i,total:s,progress:s?i/s:void 0,bytes:u,rate:h||void 0,estimated:h&&s&&l?(s-i)/h:void 0,event:o};d[t?"download":"upload"]=!0,e(d)}}const Y={http:Xt,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){let o=e.data;const i=O.from(e.headers).normalize(),s=e.responseType;let u;function h(){e.cancelToken&&e.cancelToken.unsubscribe(u),e.signal&&e.signal.removeEventListener("abort",u)}a.isFormData(o)&&($.isStandardBrowserEnv||$.isStandardBrowserWebWorkerEnv?i.setContentType(!1):i.setContentType("multipart/form-data;",!1));let l=new XMLHttpRequest;if(e.auth){const v=e.auth.username||"",p=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(v+":"+p))}const d=Je(e.baseURL,e.url);l.open(e.method.toUpperCase(),qe(d,e.params,e.paramsSerializer),!0),l.timeout=e.timeout;function y(){if(!l)return;const v=O.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),g={data:!s||s==="text"||s==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:v,config:e,request:l};vn(function(_){n(_),h()},function(_){r(_),h()},g),l=null}if("onloadend"in l?l.onloadend=y:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(y)},l.onabort=function(){l&&(r(new w("Request aborted",w.ECONNABORTED,e,l)),l=null)},l.onerror=function(){r(new w("Network Error",w.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let p=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const g=e.transitional||ze;e.timeoutErrorMessage&&(p=e.timeoutErrorMessage),r(new w(p,g.clarifyTimeoutError?w.ETIMEDOUT:w.ECONNABORTED,e,l)),l=null},$.isStandardBrowserEnv){const v=(e.withCredentials||Sn(d))&&e.xsrfCookieName&&bn.read(e.xsrfCookieName);v&&i.set(e.xsrfHeaderName,v)}o===void 0&&i.setContentType(null),"setRequestHeader"in l&&a.forEach(i.toJSON(),function(p,g){l.setRequestHeader(g,p)}),a.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),s&&s!=="json"&&(l.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&l.addEventListener("progress",xe(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&l.upload&&l.upload.addEventListener("progress",xe(e.onUploadProgress)),(e.cancelToken||e.signal)&&(u=v=>{l&&(r(!v||v.type?new q(null,e,l):v),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(u),e.signal&&(e.signal.aborted?u():e.signal.addEventListener("abort",u)));const A=Rn(d);if(A&&$.protocols.indexOf(A)===-1){r(new w("Unsupported protocol "+A+":",w.ERR_BAD_REQUEST,e));return}l.send(o||null)})}};a.forEach(Y,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Pn={getAdapter:e=>{e=a.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let o=0;o<t&&(n=e[o],!(r=a.isString(n)?Y[n.toLowerCase()]:n));o++);if(!r)throw r===!1?new w(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(a.hasOwnProp(Y,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`);if(!a.isFunction(r))throw new TypeError("adapter is not a function");return r},adapters:Y};function me(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new q(null,e)}function Ke(e){return me(e),e.headers=O.from(e.headers),e.data=pe.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Pn.getAdapter(e.adapter||fe.adapter)(e).then(function(r){return me(e),r.data=pe.call(e,e.transformResponse,r),r.headers=O.from(r.headers),r},function(r){return He(r)||(me(e),r&&r.response&&(r.response.data=pe.call(e,e.transformResponse,r.response),r.response.headers=O.from(r.response.headers))),Promise.reject(r)})}const Qe=e=>e instanceof O?e.toJSON():e;function I(e,t){t=t||{};const n={};function r(l,d,y){return a.isPlainObject(l)&&a.isPlainObject(d)?a.merge.call({caseless:y},l,d):a.isPlainObject(d)?a.merge({},d):a.isArray(d)?d.slice():d}function o(l,d,y){if(a.isUndefined(d)){if(!a.isUndefined(l))return r(void 0,l,y)}else return r(l,d,y)}function i(l,d){if(!a.isUndefined(d))return r(void 0,d)}function s(l,d){if(a.isUndefined(d)){if(!a.isUndefined(l))return r(void 0,l)}else return r(void 0,d)}function u(l,d,y){if(y in t)return r(l,d);if(y in e)return r(void 0,l)}const h={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:u,headers:(l,d)=>o(Qe(l),Qe(d),!0)};return a.forEach(Object.keys(Object.assign({},e,t)),function(d){const y=h[d]||o,A=y(e[d],t[d],d);a.isUndefined(A)&&y!==u||(n[d]=A)}),n}const Xe="1.4.0",ye={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ye[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Ze={};ye.transitional=function(t,n,r){function o(i,s){return"[Axios v"+Xe+"] Transitional option '"+i+"'"+s+(r?". "+r:"")}return(i,s,u)=>{if(t===!1)throw new w(o(s," has been removed"+(n?" in "+n:"")),w.ERR_DEPRECATED);return n&&!Ze[s]&&(Ze[s]=!0,console.warn(o(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,s,u):!0}};function $n(e,t,n){if(typeof e!="object")throw new w("options must be an object",w.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],s=t[i];if(s){const u=e[i],h=u===void 0||s(u,i,e);if(h!==!0)throw new w("option "+i+" must be "+h,w.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new w("Unknown option "+i,w.ERR_BAD_OPTION)}}const ge={assertOptions:$n,validators:ye},T=ge.validators;class ee{constructor(t){this.defaults=t,this.interceptors={request:new je,response:new je}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=I(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&ge.assertOptions(r,{silentJSONParsing:T.transitional(T.boolean),forcedJSONParsing:T.transitional(T.boolean),clarifyTimeoutError:T.transitional(T.boolean)},!1),o!=null&&(a.isFunction(o)?n.paramsSerializer={serialize:o}:ge.assertOptions(o,{encode:T.function,serialize:T.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s;s=i&&a.merge(i.common,i[n.method]),s&&a.forEach(["delete","get","head","post","put","patch","common"],p=>{delete i[p]}),n.headers=O.concat(s,i);const u=[];let h=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(h=h&&g.synchronous,u.unshift(g.fulfilled,g.rejected))});const l=[];this.interceptors.response.forEach(function(g){l.push(g.fulfilled,g.rejected)});let d,y=0,A;if(!h){const p=[Ke.bind(this),void 0];for(p.unshift.apply(p,u),p.push.apply(p,l),A=p.length,d=Promise.resolve(n);y<A;)d=d.then(p[y++],p[y++]);return d}A=u.length;let v=n;for(y=0;y<A;){const p=u[y++],g=u[y++];try{v=p(v)}catch(N){g.call(this,N);break}}try{d=Ke.call(this,v)}catch(p){return Promise.reject(p)}for(y=0,A=l.length;y<A;)d=d.then(l[y++],l[y++]);return d}getUri(t){t=I(this.defaults,t);const n=Je(t.baseURL,t.url);return qe(n,t.params,t.paramsSerializer)}}a.forEach(["delete","get","head","options"],function(t){ee.prototype[t]=function(n,r){return this.request(I(r||{},{method:t,url:n,data:(r||{}).data}))}}),a.forEach(["post","put","patch"],function(t){function n(r){return function(i,s,u){return this.request(I(u||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}ee.prototype[t]=n(),ee.prototype[t+"Form"]=n(!0)});const te=ee;class we{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(o=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const s=new Promise(u=>{r.subscribe(u),i=u}).then(o);return s.cancel=function(){r.unsubscribe(i)},s},t(function(i,s,u){r.reason||(r.reason=new q(i,s,u),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new we(function(o){t=o}),cancel:t}}}const Cn=we;function On(e){return function(n){return e.apply(null,n)}}function Nn(e){return a.isObject(e)&&e.isAxiosError===!0}const ve={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ve).forEach(([e,t])=>{ve[t]=e});const Tn=ve;function Ye(e){const t=new te(e),n=_e(te.prototype.request,t);return a.extend(n,te.prototype,t,{allOwnKeys:!0}),a.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Ye(I(e,o))},n}const b=Ye(fe);b.Axios=te,b.CanceledError=q,b.CancelToken=Cn,b.isCancel=He,b.VERSION=Xe,b.toFormData=K,b.AxiosError=w,b.Cancel=b.CanceledError,b.all=function(t){return Promise.all(t)},b.spread=On,b.isAxiosError=Nn,b.mergeConfig=I,b.AxiosHeaders=O,b.formToJSON=e=>Ve(a.isHTMLForm(e)?new FormData(e):e),b.HttpStatusCode=Tn,b.default=b;const f=b;function et(e,t){if(e)for(const n in e)t[n]=e[n]}function Ln(e){return!e||!Object.keys(e).length}function be(e){if(!e)return null;for(const t in e){const n=e[t];if(n&&(Array.isArray(n)||Object.keys(n).length>0))return JSON.parse(JSON.stringify(e))}return{...e}}const tt=`${B}/rest/agency`,Un=async e=>{try{return(await f.post(`${tt}/agencyContacts`,e)).data}catch(t){throw m(t),t}},In=async(e,t)=>{try{return(await f.get(`/rest/agency/getAgencyByIDLang/${e}/${t}`)).data}catch(n){throw m(n),n}},Fn=async e=>{try{return(await f.post("/rest/agency/sendMutuo",e)).data}catch(t){throw m(t),t}},Mn=async e=>{try{return(await f.post(`${tt}/getAgencyListForInfoWindow`,e)).data}catch(t){throw m(t),t}};let ne;const Bn=new Uint8Array(16);function kn(){if(!ne&&(ne=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ne))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ne(Bn)}const E=[];for(let e=0;e<256;++e)E.push((e+256).toString(16).slice(1));function Dn(e,t=0){return(E[e[t+0]]+E[e[t+1]]+E[e[t+2]]+E[e[t+3]]+"-"+E[e[t+4]]+E[e[t+5]]+"-"+E[e[t+6]]+E[e[t+7]]+"-"+E[e[t+8]]+E[e[t+9]]+"-"+E[e[t+10]]+E[e[t+11]]+E[e[t+12]]+E[e[t+13]]+E[e[t+14]]+E[e[t+15]]).toLowerCase()}const nt={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function rt(e,t,n){if(nt.randomUUID&&!t&&!e)return nt.randomUUID();e=e||{};const r=e.random||(e.rng||kn)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let o=0;o<16;++o)t[n+o]=r[o];return t}return Dn(r)}const j=(e,t={})=>{if(Object.keys(t).length===0)throw"The params object can't be empty";const n=new URL(e);for(const r in t)n.searchParams.append(r,`${t[r]}`);return n},L=`${B}/rest/geography`;let z=rt();const Gn=async(e,t,n=[])=>{z||(z=rt());const r=new URL(`${L}/placesAddressAutocomplete`),o=n.length,i=n.reduce((h,l,d)=>o===1?l:d===o-1?h:h+=`${l}|`,""),s=j(r,{query:e,radius:t,sessionToken:z,types:i}),u=await f.get(s.toString());if(u.data.status!=="OK")throw new Error("There was an error in the request");return u.data.predictions},ot=async e=>{const t=new URL(`${L}/getPlacesDetails`),n=j(t,{placeId:e,sessionToken:z}),r=await f.get(n.toString());if(z="",r.data.status!=="OK")throw new Error("There was an error in the request");return r.data.result},st=async(e,t)=>{const n=new URL(`${L}/guessCityPlace/${e}/${t}`);return(await f.get(n.toString())).data},qn=async e=>{if(e==null)throw new Error("The id can't be null");return(await f.get(`${L}/getPlaceFromPlaceID/${e}`)).data},jn=async e=>{try{return(await f.get(`${L}/getCountryPolygonJson/${e}`)).data}catch(t){throw m(t),t}},zn=async e=>{try{return(await f.get(`${L}/getRegionPolygonJson/${e}`)).data}catch(t){throw m(t),t}},Vn=async e=>{try{return(await f.get(`${L}/getCityPolygonJson/${e}`)).data}catch(t){throw m(t),t}},Wn=async e=>{try{return(await f.get(`${L}/getProvincePolygonJson/${e}`)).data}catch(t){throw m(t),t}},Hn="/rest/insights",Jn=async e=>{try{return(await f.post(`${Hn}/getTransactionsGraphData`,e)).data}catch(t){throw m(t),t}},V=`${B}/rest/mail`,xn=async e=>{try{return(await f.post(`${V}/infoPremium`,e)).data}catch(t){throw m(t),t}},Kn=async e=>{try{return(await f.post(`${V}/sendBrochurePremium`,e)).data}catch(t){throw m(t),t}},Qn=async e=>{try{return(await f.post(`${V}/submitJobApplication`,e,{headers:{"Content-Type":"multipart/form-data"}})).data}catch(t){throw m(t),t}},Xn=async e=>{try{return(await f.post(`${V}/sendBrochureMR`,e)).data}catch(t){throw m(t),t}},Zn=async e=>{try{return(await f.post(`${V}/infoMR`,e)).data}catch(t){throw m(t),t}},Yn=window._baseURLIt,re="/ws",er=async(e,t=[],n="")=>{try{return n||(n=""),(await f.get(`${re}/places?query=${e}&type=${t.join(",")}${n?`&provinceID=${n}`:""}`)).data}catch(r){throw m(r),r}};function tr(e,t="C,P,Z,L,I,R,A"){return new Promise(n=>{f.get(`${re}/places?query=${e}&type=${t}`).then(r=>{r!=null&&r.data||n([]),n(r==null?void 0:r.data)})})}function nr(e){return new Promise(t=>{f.get(`${re}/zones?cityID=${e}`).then(n=>{if(!(n!=null&&n.data)){t([]);return}t(n==null?void 0:n.data)})})}const rr=async e=>{try{return(await f.get(j(new URL(`${Yn}${re}/districts`),{zoneID:e}).toString())).data}catch(t){throw m(t),t}},or=async e=>{try{return(await f.post(`/rest/portfolioCustomer/updateNewsletterConsent/?email=${e}`)).data}catch(t){throw m(t),t}};var Ae=(e=>(e[e.SELLING=0]="SELLING",e[e.SALE=1]="SALE",e[e.RENT=2]="RENT",e[e.AUCTION=3]="AUCTION",e))(Ae||{});const it={priceFrom:"PrezzoMinimo",priceTo:"PrezzoMassimo",sqMfrom:"SuperficieMinima",sqMto:"SuperficieMassima",roomsFrom:"NumeroMinimoLocali",roomsTo:"NumeroMassimoLocali",bathroomsFrom:"NumeroMinimoBagni",bathroomsTo:"NumeroMassimoBagni",conditionType:"StatoImmobile",energyClassFilter:"ClasseEnergetica",floor:"Piano",excludeAuctions:"EscludiAste",shortRentOnly:"SoloAffittiBrevi",excludeBareOwnership:"EscludiNudaProprieta",onlyPublicUser:"DaPrivato",balcony:"Balcone",terrace:"Terrazzo",balconyTerrace:"BalconeTerrazzo",boxCarSpot:"BoxPostoAuto",carSpot:"PostoAuto",box:"Box",lift:"Ascensore",privateGarden:"GiardinoPrivato",publicGarden:"GiardinoPubblico",cellar:"Cantina",airConditioning:"AriaCondizionata",furnished:"Arredato",publicTransport:"Trasporti",school:"Istruzione",market:"Supermercati",hospital:"Ospedali",pharmacy:"Farmacie",charging:"Ricarica",post:"UfficioPostale",bank:"Banche",swimmingPoolPrivate:"PiscinaPrivata",swimmingPoolPublic:"PiscinaCondominiale",luxury:"Lusso",discounted:"Sconto",filterOrderId:"Ordinamento"},Ee={sale:"Vendita",rent:"Affitto",auctionType:"Asta",bareOwnershipType:"NudaProprieta",typologyIdList:"Tipologia",filterOrderId:"Ordinamento"};function sr(){return{sale:!0,rent:!1,contractType:window._contractDefault,excludeAuctions:!1,shortRentOnly:!1,excludeBareOwnership:!1,macroTypologyId:window._macroTypologyDefault,listingTypologyId:0,listingTypologyURL:window._listingTypologyURLDefault,listingTypologyIdList:[0],typologyIdList:window._typologyIdListDefault,onlyVisible:!0,subscriptionTypes:window._subscriptionTypesDefault}}function ir(){return{active:!0,hourly:!1,latitude:0,longitude:0,saveSearchParameterId:null,searchBean:sr(),title:""}}const S=`${window._baseURLIt}/rest/publicUser`,ar=async()=>{try{return(await f.get(`${S}/getMenuInfo`)).data}catch(e){throw m(e),null}},cr=async()=>{try{return(await f.get(`${S}/getUser`)).data}catch(e){throw m(e),null}},ur=async e=>{try{return(await f.get(`${S}/getMarketingConsent?email=${e}`)).data}catch(t){return m(t),!1}},lr=async()=>{try{return(await f.post(`${S}/deleteAllUserSaveSearch`)).data}catch(e){throw m(e),null}},dr=async e=>{try{return(await f.post(`${S}/deleteUserSaveSearchParam/${e}`)).data}catch(t){throw m(t),null}},fr=async()=>{try{return(await f.get(`${S}/getFavouriteIdList`)).data}catch(e){return m(e),[]}},hr=async e=>{try{return(await f.post(`${S}/addUserFavourite/${e}`)).data}catch(t){return m(t),!1}},pr=async e=>{try{return(await f.post(`${S}/deleteUserFavourite/${e}`)).data}catch(t){return m(t),!1}},mr=async(e,t)=>{if(t===" "||t===" ")return!1;try{return(await f.post(`${S}/updateFavouriteNote`,{realEstateId:e,note:t})).data}catch(n){return m(n),!1}},yr=async()=>{try{return(await f.post(`${S}/deleteAllUserFavourite`)).data}catch(e){return m(e),!1}},gr=async e=>{try{return e?(await f.post(`${S}/refreshUserFirebaseToken?token=${e}`),!0):!1}catch{return!1}},wr=async e=>{try{return await f.delete(`${S}/deleteUserFirebaseToken?token=${e}`),!0}catch{return!1}},vr=async e=>{const{email:t,marketingConsent:n}=e;try{return await f.post(`${S}/updateMarketingConsent?email=${t}&marketingConsent=${n}`,e),!0}catch(r){return m(r),!1}},br=async(e=0,t=10)=>{try{return(await f.get(`${S}/getPublicUserSavedSearchBeanList/${e}/${t}`)).data}catch(n){return m(n),[]}},Ar=async e=>{try{return(await f.post(`${S}/updatePublicUserSavedSearchBean/`,e)).data}catch(t){return m(t),ir()}},Er=async()=>{try{return(await f.get(`${S}/getPublicUserSaveSearchCount`)).data}catch(e){return m(e),0}},oe=window._baseURLIt,at=`${oe}/rest/realEstate`,Sr=async e=>{try{return(await f.post(`${oe}/rest/publicUser/getRealEstateNotes/${e}`)).data}catch(t){return m(t),""}},Rr=async(e,t,n,r,o=!1)=>{if(!e||!r)throw`Email or resb are not valid, ${e}, ${r}`;return await f.post(`${at}/saveSearch?email=${e}&title=${t}&hourly=${n}&pushNotifications=${o}`,r)},_r=async(e,t,n=!1)=>{try{const r="Ricerca salvata";return(await f.post(`${at}/saveSearch?email=${e}&title=${r}&pushNotifications=${n}`,t)).data}catch(r){throw m(r),r}},Pr=async e=>{var r;const t=be(e);return t.polygonForDB&&(t.polygonFromMap=t.polygonForDB||""),(r=t==null?void 0:t.listingTypologyIdList)!=null&&r.includes(15)&&(t.conditionType=5),await(await f.post("/rest/realEstate/countRealEstateES",t)).data},$r=async e=>{try{return(await f.post(`${oe}/rest/realEstate/getRealEstateListForInfoWindow/${window._locale}`,e)).data}catch(t){return m(t),null}},Cr=async()=>{if(!window._serializedSearchBean)return[];const e=be(JSON.parse(window._serializedSearchBean));delete e.latitude,delete e.longitude;try{return(await f.post(`${oe}/rest/realEstate/getMapMarkers`,e,{headers:{"Content-Type":"application/json",Accept:"application/json"}})).data}catch(t){throw m(t),[]}},ct=`${B}/rest/request`,Or=async e=>(await f.post(`${ct}/sendSuggestion`,e)).data,Nr=async e=>{try{return(await f.post("/rest/request/addRequestGeneric",e)).data}catch(t){throw m(t),t}},Tr=async e=>(await f.post(`${ct}/sendWidgetRequest`,e)).data,F="/rest/statistics",Lr=async e=>{try{return await f.post(`${F}/updateViewListing/W`,e),!0}catch(t){return m(t),!1}},Ur=async e=>{try{return f.post(`${F}/updateRealEstateSearch`,e),!0}catch(t){return m(t),!1}},Ir=async(e,t)=>{try{return(await f.post(t?`${F}/updatePhoneView/${e}/${t}/W`:`/rest/statistics/updatePhoneView/${e}/W`)).data}catch(n){throw m(n),n}},Fr=async e=>{try{const t=await f.post(`${F}/getPlaceTrendData?sale=${!0}`,e),n=await f.post(`${F}/getPlaceTrendData?sale=${!1}`,e);return Promise.all([t,n])}catch(t){throw m(t),t}},Mr=async(e,t={contract:"sale",macroTypologyId:1})=>{try{return(await f.post(`${F}/getAveragePriceGraphData/${t.contract}/${t.macroTypologyId}`,e)).data}catch(n){throw m(n),n}},Br="/rest/wikicasaPro",kr=async(e,t,n=void 0,r=void 0)=>{if(!t)throw new Error("The token can't be null");try{let o={token:t};n&&(o={...o,conditionTypeId:n}),r!=null&&(o={...o,floor:r});const i=j(new URL(`${B}${Br}/evaluateRealEstateWidget`),o),s=await f.post(i.toString(),e);return s.data.valid=!!s.data.valid,s.data}catch(o){throw m(o),o}},Dr="/rest/wikicasaPro",Gr=async(e,t,n,r=0)=>{try{return(await f.post(`${Dr}/userValuationWithPhotoFeedback/?email=${e}&token=${t}&feedback=${n}${r>0?"&userFeedbackValue="+r:""}`)).data}catch(o){throw m(o),o}},qr=(e="Banner")=>{var t;if(window.navigator.userAgent.includes("iPhone"))window.navigator.userAgent.match(/firefox|fxios/i)||window.location.replace("wikicasa://"),setTimeout(()=>{window.location.replace("https://apps.apple.com/it/app/wikicasa/id1626038379")},500);else if(window.navigator.userAgent.includes("Android")){const n="intent://wikicasa.it/#Intent;scheme=https;package=it.wikicasa.wikicasa_app;end";window.location.replace(n)}window.dataLayer.push({event_name:"open_store",event_location:e,OS:(t=window.navigator)==null?void 0:t.userAgent})},jr=e=>!(e!=null&&e.length);function zr(e,t){e=e.replace("#","");const n=parseInt(e.substring(0,2),16),r=parseInt(e.substring(2,4),16),o=parseInt(e.substring(4,6),16);return`rgba(${n}, ${r}, ${o}, ${t})`}/*! js-cookie v3.0.5 | MIT */function se(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var Vr={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Se(e,t){function n(o,i,s){if(!(typeof document>"u")){s=se({},t,s),typeof s.expires=="number"&&(s.expires=new Date(Date.now()+s.expires*864e5)),s.expires&&(s.expires=s.expires.toUTCString()),o=encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var u="";for(var h in s)s[h]&&(u+="; "+h,s[h]!==!0&&(u+="="+s[h].split(";")[0]));return document.cookie=o+"="+e.write(i,o)+u}}function r(o){if(!(typeof document>"u"||arguments.length&&!o)){for(var i=document.cookie?document.cookie.split("; "):[],s={},u=0;u<i.length;u++){var h=i[u].split("="),l=h.slice(1).join("=");try{var d=decodeURIComponent(h[0]);if(s[d]=e.read(l,d),o===d)break}catch{}}return o?s[o]:s}}return Object.create({set:n,get:r,remove:function(o,i){n(o,"",se({},i,{expires:-1}))},withAttributes:function(o){return Se(this.converter,se({},this.attributes,o))},withConverter:function(o){return Se(se({},this.converter,o),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}Se(Vr,{path:"/"});function Wr(e,t,n=30,r=!0){const o=new Date;o.setTime(o.getTime()+864e5*n);const i=typeof t!="string"?JSON.stringify(t):t,s=r?btoa(encodeURIComponent(i)):i;document.cookie=e+"="+s+";path=/;expires="+o.toUTCString()}function Hr(e){try{const t=document.cookie.match("(^|;) ?"+e+"=([^;]*)(;|$)");return t?t[2]:null}catch(t){return console.error(t),null}}function Jr(e){try{const t=document.cookie.match("(^|;) ?"+e+"=([^;]*)(;|$)");return t?JSON.parse(decodeURIComponent(atob(t[2]))):null}catch(t){return console.error(t),ut(e),null}}function ut(e){(void 0)(e)}const xr=(e,t,n="it-IT")=>{if(e===void 0)return"0";const r={style:"currency",currency:"EUR",maximumFractionDigits:0};return et(t,r),new Intl.NumberFormat(n,r).format(e)},Kr=()=>/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,Qr=()=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),Xr=()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent),lt=e=>{const t=document.querySelector(e);if(!t)throw new Error(`No element found with the id: ${e}`);return t},Zr=e=>{typeof e=="string"?lt(e).textContent="":e.textContent=""},Yr=(e,t="block")=>{e&&(e.style.display=t)},eo=e=>{e&&(e.style.display="none")},to=e=>e.includes("@gmail");async function no(e){const t=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-256",t);return Array.from(new Uint8Array(n)).map(i=>i.toString(16).padStart(2,"0")).join("")}const ro=e=>{const t=e.split("@");if(t.length<2)throw new Error("The email has nothing before the '@' symbol");const n=t[0];let r="";for(const o of n)if(o!=="."){if(o==="+")break;r+=o}return`${r}@${t[1]}`},oo=e=>{if(!e||!e.trim())throw new Error("The email in null or empty");let t=e;return to(t)&&(t=ro(e)),no(t)},so=e=>{document.querySelectorAll(`a[class^=fav][data-id='${e}']`).forEach(n=>{n.classList.contains("fav-save")?n.style.display="none":n.classList.contains("fav-remove")&&(n.style.display="block")})},io=e=>{document.querySelectorAll(`a[class^=fav][data-id='${e}']`).forEach(n=>{n.classList.contains("fav-save")?n.style.display="block":n.classList.contains("fav-remove")&&(n.style.display="none")})},C=(e,t)=>e?{...e,...t}:{...t},ao={valuation:e=>{const t={event:"GAevent",eventCategory:"Valutazione immobile",eventAction:e.eventAction,eventLabel:"Pagina valutazione",event_name:e.eventAction==="Share"?"valuation_share":"valuation_share_modal",event_location:"Valutazione"};e.social&&(t.social=e.social),window.dataLayer.push(t)},request:e=>{window.dataLayer.push({event:"GAevent",eventCategory:e.id?"Richiesta specifica":"Richiesta agenzia",eventAction:"Invio richiesta",eventLabel:(e.franchise?`${e.franchise} / AG_${e.agencyId}`:`AG_${e.agencyId}`)+(e.id?` / WK_${e.id} (${e.pageName}: ${e.sale?"vendita":"affitto"} / ${e.premium?"premium":e.lite?"lite":"free"})`:` (${e.pageName}: ${e.premium?"premium":e.lite?"lite":"free"})`),franchise:e.franchise?e.franchise:void 0,agent_id:e.agentId?`${e.agentId}`:void 0,agent_email:e.agentEmail,product_price:e.productPrice,email:e.email,event_name:e.id?"specific_request_lead":"generic_request_lead",event_location:`${e.pageName}`,real_estate_id:e.id,product_id:`WK_${e.id}`,contract_type:e.id?e.auction?"auction":e.rent?"rent":"sale":void 0,price:e.price,typology_name:e.typologyName,agency_id:e.agencyId,agency_name:e.agencyName,franchise_id:e.franchise_id,franchise_name:e.franchise_name,subscription_type:e.premium?"premium":e.lite?"lite":"free",premium:e.premium})},mortgage:()=>{window.dataLayer.push({event:"GAevent",eventCategory:"Preventivo Mutuo",eventAction:"Invio richiesta",eventLabel:"Popup - Richiesta specifica",event_name:"mortgage_lead",event_location:"Modale Richiesta Specifica"})},mailAlertSave:()=>{window.dataLayer.push({event:"GAevent",eventCategory:"Mail alert",eventAction:"Ricerca salvata",eventLabel:"Popup - Richiesta specifica",event_name:"mail_alert_save",event_location:"Modale Richiesta Specifica"})},generic_request_lead:()=>{window.dataLayer.push({event:"GAevent",eventCategory:"Richiesta generica",eventAction:"Invio richiesta",eventLabel:"Popup - Richiesta specifica",event_name:"generic_request_lead",event_location:"Modale Richiesta Specifica"})},newsletter_subscribe:()=>{window.dataLayer.push({event:"GAevent",eventCategory:"Newsletter",eventAction:"Iscrizione",eventLabel:"Popup - Richiesta specifica",event_name:"newsletter_subscribe",event_location:"Modale Richiesta Specifica"})},phone_show:e=>{window.dataLayer.push({event:"GAevent",eventCategory:"Telefono",eventAction:"Mostra telefono",eventLabel:(e.franchise?`${e.franchise} / AG_${e.agencyId}`:`AG_${e.agencyId}`)+(e.id?` / WK_${e.id} (${e.pageName}: ${e.sale?"vendita":"affitto"} / ${e.premium?"premium":e.lite?"lite":"free"})`:` (${e.pageName}: ${e.premium?"premium":e.lite?"lite":"free"})`),franchise:e.franchise?e.franchise:void 0,product_id:e.id?`WK_${e.id}`:void 0,product_price:e.product_price,event_name:"phone_show",real_estate_id:`${e.id}`,contract_type:e.auction?"auction":e.rent&&!e.sale?"rent":"sale",price:e.price,typology_name:e.typologyName,agency_id:e.agencyId,agency_name:e==null?void 0:e.agencyName,franchise_id:e.franchise?e.franchise_id:"",franchise_name:e.franchise,premium:e.premium,subscription_type:e.premium?"premium":e.lite?"lite":"free",event_location:e.pageName})},public_user_login:()=>{window.dataLayer.push({event:"GAevent",eventCategory:"Utenti pubblici",eventAction:"Login",eventLabel:"Modale Login",event_name:"login",event_location:"login_modal"})},pushNotificationOpened:()=>{const e=C({event:"GAevent",eventCategory:"Mail alert",eventAction:"Apertura notifica push",eventLabel:"Notifica Push - Salva ricerca"},{event:"GAevent",event_name:"push_notification_opened",event_location:"Notifica Push - Android_or_Web"});window.dataLayer.push({event_location:"save_searches",...e})},public_user_sign_up:()=>{window.dataLayer.push(C({event:"GAevent",eventCategory:"Utenti pubblici",eventAction:"Registrazione",eventLabel:"Modale registrazione"},{event:"GAevent",event_name:"public_user_sign_up",event_location:"Modale Registrazione"}))},premium_info:()=>{window.dataLayer.push(C({event:"GAevent",eventCategory:"Premium",eventAction:"Richiesta Informazioni"},{event:"GAevent",event_name:"premium_info",event_location:"Pagina Premium"}))},valuation_complete:()=>{window.dataLayer.push(C({event:"GAevent",eventCategory:"Valutazione immobile",eventAction:"Invio richiesta",eventLabel:"Pagina valutazione"},{event:"GAevent",event_name:"valuation_complete",event_location:"Valutazione - Step 3"}))},valuation_lead:(e={isSelling:!1})=>{window.dataLayer.push(C(null,{event:"GAevent",event_name:"valuation_lead",event_location:"Valutazione - Step 3",valuation_type:e.isSelling?"selling":"valuation"}))},valuation_pdf_download:()=>{window.dataLayer.push(C({event:"GAevent",eventCategory:"Valutazione immobile",eventAction:"Download PDF",eventLabel:"Pagina valutazione"},{event:"GAevent",event_name:"valuation_pdf_download",event_location:"Valutazione"}))},error_request_409:()=>{window.dataLayer.push({event:"GAevent",eventCategory:"Richiesta Specifica",eventAction:"Errore Richiesta",eventLabel:"Richiesta gia effettuata - 409",event_name:"specific_request_error",event_location:"Modale Richiesta Specifica",code_error:"request_already_made_409"})},specific_request_interaction:e=>{const t=C(null,{event:"GAevent",event_name:"specific_request_interaction",event_location:e.pageName});window.dataLayer.push(t)},copy_avm_widget:()=>{window.dataLayer.push(C({event:"GAevent",eventCategory:"Widget AVM",eventAction:"Copia Widget AVM"},{event:"GAevent",event_name:"copy_avm_widget",event_location:"Pagina Widget AVM"}))},copy_trend_widget:()=>{window.dataLayer.push(C({event:"GAevent",eventCategory:"Widget Quotazioni",eventAction:"Copia Widget Quotazioni"},{event:"GAevent",event_name:"copy_trend_widget",event_location:"Pagina Widget Quotazioni"}))},send_avm_widget_request:()=>{window.dataLayer.push(C({event:"GAevent",eventCategory:"Widget AVM",eventAction:"Invio Richiesta Widget AVM"},{event:"GAevent",event_name:"send_request_avm_widget",event_location:"Pagina Widget AVM"}))}};function co(e,t){const n=ao[e];t?n(t):n()}function uo(e,t,n){return e.replace(new RegExp(t,"g"),n)}function dt(e){return e.charAt(0).toUpperCase()+e.slice(1)}function ft(e,t,n,r){const o=[];e&&e!=="ND"&&(t&&t!=="ND"&&t!=="0"?o.push(`${e} ${t}`):o.push(e)),n&&r?o.push(`${n} (${r})`):o.push(n);const i=o.filter(s=>!!s).join(", ");return dt(i)}function lo(e){if(!e)return"";const t=document.createElement("span");return t.innerHTML=e,t.textContent||""}function fo(e,t){const n=new RegExp(Object.keys(t).map(r=>r.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")).join("|"),"gi");return e.replace(n,function(r){return t[r.toLowerCase()]})}function ht(e){return e.replace(/[\uA78C\uA78B]/g,"'").replace(/[^\x00-\x7F]/g,"")}const pt=async(e,t)=>{const n={};for(let o=0;o<e.address_components.length;o++)e.address_components[o].types.indexOf("administrative_area_level_3")!==-1?n.city=e.address_components[o].long_name:e.address_components[o].types.indexOf("locality")!==-1?n.locality=e.address_components[o].long_name:e.address_components[o].types.indexOf("route")!==-1?n.streetName=e.address_components[o].long_name:e.address_components[o].types.indexOf("street_number")!==-1?n.streetNumber=e.address_components[o].long_name:e.address_components[o].types.indexOf("postal_code")!==-1&&(n.zip=e.address_components[o].long_name);n.latitude=e.geometry.location.lat,n.longitude=e.geometry.location.lng,n.address=ht(t),typeof n.streetNumber>"u"&&(n.streetNumber=null);let r=await st(n.latitude,n.longitude);if(delete r.city,delete r.locality,r={...r,...n},!r.streetNumber){const o=parseInt(r.address.split(",")[1]),i=parseInt(r.zip);o&&o!==i&&(r.streetNumber=o.toString())}return r},ho=async(e,t)=>{const n=await ot(e),r=await pt(n,t),o=r.streetName?ft(r.streetName,r.streetNumber||"",r.cityName):r.address;return{place:r,address:o}},po=(e,t)=>new Promise((n,r)=>{setTimeout(()=>{try{e&&e(),n()}catch{r()}},t)}),mt=(e,t)=>{t||(t=navigator.language);const n=Intl.NumberFormat(t).format(1111).replace(/\p{Number}/gu,""),r=Intl.NumberFormat(t).format(1.1).replace(/\p{Number}/gu,""),o=parseFloat(`${e}`.replace(new RegExp("\\"+n,"g"),"").replace(new RegExp("\\"+r),"."));return isNaN(o)?"":o},yt=(e,t)=>{if(e==null)return;if(e=parseFloat(`${e}`),isNaN(e))return"";const n={style:"currency",currency:"EUR"};let o={...{maximumFractionDigits:0}};return t!=null&&t.currency&&(o={...o,...n}),new Intl.NumberFormat(navigator.language,{...o}).format(e)};function mo(e,t=!1){return e==null?"":Re(t?Math.round(e):Math.floor(e),0)}function Re(e,t){return!e&&e!==0?"":e.toLocaleString("it-IT",{minimumFractionDigits:t,maximumFractionDigits:t})}function yo(e,t=2){return Re(e,t)}const go={formatFn:yt,unFormatFn:mt};function wo(e,t,n){const r=[].slice.call(document.querySelectorAll(e)),o=new IntersectionObserver((i,s)=>{for(let u=0;u<i.length;u++){const h=i[u];if(h.isIntersecting){const l=h.target;t(l,s),s.unobserve(l)}}},n);r.forEach(i=>{o.observe(i)})}let gt=!1;const vo=e=>{document.addEventListener("notification-permission-changed",e)},bo=()=>{!navigator.permissions||!navigator.permissions.query||(!gt&&navigator.permissions.query({name:"notifications"}).then(function(e){e.onchange=function(){document.dispatchEvent(new CustomEvent("notification-permission-changed",{detail:{permissionState:this.state}}))}}),gt=!0)};function Ao(e){return new Promise((t,n)=>f.post("/rest/request/addRequestGenericValuation",e,{headers:{"Content-Type":"application/json",dataType:"json"}}).then(()=>{t()}).catch(r=>n(r)))}function Eo(e,t,n,r,o,i,s){let u="/";return n&&(u+=(n==Ae.AUCTION?window._auctionLabel:n==Ae.RENT?window._rentLabel:window._saleLabel)+"-"),u+=`${t}/`,i&&(u+=`${i}/`),e&&(u+=`${e.replace(/^-+|-+$/g,"")}/`),r&&(u+=`${r.replace(/^_+|_+$/g,"")}/`),!r&&s&&(u+=`${s.replace(/^_+|_+$/g,"")}/`),o&&(u+=`${o.replace(/^_+|_+$/g,"")}/`),u}function So(e){const t=Object.keys(it).map(n=>e[n]?encodeURIComponent(it[n])+"="+encodeURIComponent(e[n]):null).filter(n=>n!==null);return t.length?`?${t.join("&")}`:""}function Ro(e){const t=Object.keys(Ee).map(n=>{if(e[n])if(Array.isArray(e[n])){const r=e[n],o=Ee[n];let i="";for(let s=0;s<r.length;s++)i+=encodeURIComponent(o)+"="+encodeURIComponent(r[s]),i+=s<r.length-1?"&":"";return i}else return encodeURIComponent(Ee[n])+"="+encodeURIComponent(e[n]);else return null}).filter(n=>n!==null);return t.length?`?${t.join("&")}`:""}const _o=e=>{const t=`${window._baseURL}`;switch(e){case"SAVED_SEARCHES":return`${t}/${window._privateURL}/${window._saveSearchesURL}`;default:throw new Error(`There is no matching URL for ${e}`)}};return c.addGenericRequest=Nr,c.addPermissionStateListener=bo,c.addUserFavorite=hr,c.appendQueryString=j,c.awaitableSetTimeout=po,c.buildParams=So,c.buildParamsForAgency=Ro,c.buildURL=Eo,c.capitalizeFirstLetter=dt,c.cleanASCII=ht,c.decodeCookie=Jr,c.decodeTextWithEntities=lo,c.deepCopy=be,c.deleteAllSaveSearch=lr,c.deleteSaveSearch=dr,c.deleteUserFavorite=pr,c.deleteUserFirebaseToken=wr,c.emptyElem=Zr,c.encodeCookie=Wr,c.evaluateRealEstateWidget=kr,c.formatAddress=ft,c.formatCurrency=xr,c.formatFloat=yo,c.formatInteger=mo,c.formatLocaleNumber=yt,c.formatNumber=Re,c.formatterNumberObj=go,c.getAgenciesData=Mn,c.getAgencyById=In,c.getCityPolygonJSON=Vn,c.getCookie=Hr,c.getCountryPolygonJSON=jn,c.getDistrictsByZoneId=rr,c.getFavourites=fr,c.getMapMarkers=Cr,c.getMarketingConsent=ur,c.getMenuInfo=ar,c.getPlace=tr,c.getPlaceFromGAutocomplete=ho,c.getPlaceFromPlaceID=qn,c.getPlaceTrendData=Fr,c.getPlacesAddressAutocomplete=Gn,c.getPlacesByQuery=er,c.getPlacesDetails=ot,c.getProvincePolygonJSON=Wn,c.getPublicUser=cr,c.getPublicUserSaveSearchList=br,c.getRealEstateCounter=Pr,c.getRealEstateNotes=Sr,c.getRealEstatesData=$r,c.getRegionPolygonJSON=zn,c.getSaleGraphData=Mr,c.getSavedSearchesCount=Er,c.getSingleElement=lt,c.getTransactionGraphData=Jn,c.getURLPage=_o,c.getZones=nr,c.googlePlaceConverter=pt,c.guessPlace=st,c.handleAxiosError=m,c.hashEmail=oo,c.hideElem=eo,c.isArrNullOrEmpty=jr,c.isEmptyObject=Ln,c.isMobile=Qr,c.isSafari=Xr,c.isiOSDevice=Kr,c.observeOnce=wo,c.onNotificationsPermissionChange=vo,c.parseLocaleNumber=mt,c.redirectToApp=qr,c.removeCookie=ut,c.removeFavourites=yr,c.replaceAll=uo,c.replaceAllTokens=fo,c.rgba=zr,c.saveSearch=Rr,c.saveSearchFromRequest=_r,c.saveUserFirebaseToken=gr,c.sendAgencyContactAsync=Un,c.sendBrochureMR=Xn,c.sendBrochureRequest=Kn,c.sendGAEvent=co,c.sendInfoMR=Zn,c.sendInfoPremium=xn,c.sendJobApplicationForm=Qn,c.sendMortgage=Fn,c.sendRequestGeneric=Ao,c.sendSuggestion=Or,c.sendWidgetRequest=Tr,c.shallowCopyObjectTo=et,c.showAddFavoritesIcon=io,c.showElem=Yr,c.showRemoveFavoritesIcons=so,c.updateMarketingConsent=vr,c.updateNewsletterConsent=or,c.updateNote=mr,c.updatePhoneView=Ir,c.updatePublicUserSavedSearchBean=Ar,c.updateRealEstateSearch=Ur,c.updateViewListing=Lr,c.userValuationWithPhotoFeedback=Gr,Object.defineProperty(c,Symbol.toStringTag,{value:"Module"}),c}({});
|
|
5
|
+
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[We]=this[We]={accessors:{}}).accessors,o=this.prototype;function i(s){const u=G(s);r[u]||(wn(o,s),r[u]=!0)}return a.isArray(t)?t.forEach(i):i(t),this}}Z.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),a.freezeMethods(Z.prototype),a.freezeMethods(Z);const O=Z;function pe(e,t){const n=this||fe,r=t||n,o=O.from(r.headers);let i=r.data;return a.forEach(e,function(u){i=u.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function He(e){return!!(e&&e.__CANCEL__)}function q(e,t,n){w.call(this,e??"canceled",w.ERR_CANCELED,t,n),this.name="CanceledError"}a.inherits(q,w,{__CANCEL__:!0});function vn(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new w("Request failed with status code "+n.status,[w.ERR_BAD_REQUEST,w.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const bn=$.isStandardBrowserEnv?function(){return{write:function(n,r,o,i,s,u){const h=[];h.push(n+"="+encodeURIComponent(r)),a.isNumber(o)&&h.push("expires="+new Date(o).toGMTString()),a.isString(i)&&h.push("path="+i),a.isString(s)&&h.push("domain="+s),u===!0&&h.push("secure"),document.cookie=h.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function An(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function En(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function Je(e,t){return e&&!An(t)?En(e,t):t}const Sn=$.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function o(i){let s=i;return t&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=o(window.location.href),function(s){const u=a.isString(s)?o(s):s;return u.protocol===r.protocol&&u.host===r.host}}():function(){return function(){return!0}}();function Rn(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function _n(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,s;return t=t!==void 0?t:1e3,function(h){const l=Date.now(),d=r[i];s||(s=l),n[o]=h,r[o]=l;let y=i,A=0;for(;y!==o;)A+=n[y++],y=y%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),l-s<t)return;const v=d&&l-d;return v?Math.round(A*1e3/v):void 0}}function xe(e,t){let n=0;const r=_n(50,250);return o=>{const i=o.loaded,s=o.lengthComputable?o.total:void 0,u=i-n,h=r(u),l=i<=s;n=i;const d={loaded:i,total:s,progress:s?i/s:void 0,bytes:u,rate:h||void 0,estimated:h&&s&&l?(s-i)/h:void 0,event:o};d[t?"download":"upload"]=!0,e(d)}}const Y={http:Xt,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){let o=e.data;const i=O.from(e.headers).normalize(),s=e.responseType;let u;function h(){e.cancelToken&&e.cancelToken.unsubscribe(u),e.signal&&e.signal.removeEventListener("abort",u)}a.isFormData(o)&&($.isStandardBrowserEnv||$.isStandardBrowserWebWorkerEnv?i.setContentType(!1):i.setContentType("multipart/form-data;",!1));let l=new XMLHttpRequest;if(e.auth){const v=e.auth.username||"",p=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(v+":"+p))}const d=Je(e.baseURL,e.url);l.open(e.method.toUpperCase(),qe(d,e.params,e.paramsSerializer),!0),l.timeout=e.timeout;function y(){if(!l)return;const v=O.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),g={data:!s||s==="text"||s==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:v,config:e,request:l};vn(function(_){n(_),h()},function(_){r(_),h()},g),l=null}if("onloadend"in l?l.onloadend=y:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(y)},l.onabort=function(){l&&(r(new w("Request aborted",w.ECONNABORTED,e,l)),l=null)},l.onerror=function(){r(new w("Network Error",w.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let p=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const g=e.transitional||ze;e.timeoutErrorMessage&&(p=e.timeoutErrorMessage),r(new w(p,g.clarifyTimeoutError?w.ETIMEDOUT:w.ECONNABORTED,e,l)),l=null},$.isStandardBrowserEnv){const v=(e.withCredentials||Sn(d))&&e.xsrfCookieName&&bn.read(e.xsrfCookieName);v&&i.set(e.xsrfHeaderName,v)}o===void 0&&i.setContentType(null),"setRequestHeader"in l&&a.forEach(i.toJSON(),function(p,g){l.setRequestHeader(g,p)}),a.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),s&&s!=="json"&&(l.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&l.addEventListener("progress",xe(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&l.upload&&l.upload.addEventListener("progress",xe(e.onUploadProgress)),(e.cancelToken||e.signal)&&(u=v=>{l&&(r(!v||v.type?new q(null,e,l):v),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(u),e.signal&&(e.signal.aborted?u():e.signal.addEventListener("abort",u)));const A=Rn(d);if(A&&$.protocols.indexOf(A)===-1){r(new w("Unsupported protocol "+A+":",w.ERR_BAD_REQUEST,e));return}l.send(o||null)})}};a.forEach(Y,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Pn={getAdapter:e=>{e=a.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let o=0;o<t&&(n=e[o],!(r=a.isString(n)?Y[n.toLowerCase()]:n));o++);if(!r)throw r===!1?new w(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(a.hasOwnProp(Y,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`);if(!a.isFunction(r))throw new TypeError("adapter is not a function");return r},adapters:Y};function me(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new q(null,e)}function Ke(e){return me(e),e.headers=O.from(e.headers),e.data=pe.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Pn.getAdapter(e.adapter||fe.adapter)(e).then(function(r){return me(e),r.data=pe.call(e,e.transformResponse,r),r.headers=O.from(r.headers),r},function(r){return He(r)||(me(e),r&&r.response&&(r.response.data=pe.call(e,e.transformResponse,r.response),r.response.headers=O.from(r.response.headers))),Promise.reject(r)})}const Qe=e=>e instanceof O?e.toJSON():e;function I(e,t){t=t||{};const n={};function r(l,d,y){return a.isPlainObject(l)&&a.isPlainObject(d)?a.merge.call({caseless:y},l,d):a.isPlainObject(d)?a.merge({},d):a.isArray(d)?d.slice():d}function o(l,d,y){if(a.isUndefined(d)){if(!a.isUndefined(l))return r(void 0,l,y)}else return r(l,d,y)}function i(l,d){if(!a.isUndefined(d))return r(void 0,d)}function s(l,d){if(a.isUndefined(d)){if(!a.isUndefined(l))return r(void 0,l)}else return r(void 0,d)}function u(l,d,y){if(y in t)return r(l,d);if(y in e)return r(void 0,l)}const h={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:u,headers:(l,d)=>o(Qe(l),Qe(d),!0)};return a.forEach(Object.keys(Object.assign({},e,t)),function(d){const y=h[d]||o,A=y(e[d],t[d],d);a.isUndefined(A)&&y!==u||(n[d]=A)}),n}const Xe="1.4.0",ye={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ye[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Ze={};ye.transitional=function(t,n,r){function o(i,s){return"[Axios v"+Xe+"] Transitional option '"+i+"'"+s+(r?". "+r:"")}return(i,s,u)=>{if(t===!1)throw new w(o(s," has been removed"+(n?" in "+n:"")),w.ERR_DEPRECATED);return n&&!Ze[s]&&(Ze[s]=!0,console.warn(o(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,s,u):!0}};function $n(e,t,n){if(typeof e!="object")throw new w("options must be an object",w.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],s=t[i];if(s){const u=e[i],h=u===void 0||s(u,i,e);if(h!==!0)throw new w("option "+i+" must be "+h,w.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new w("Unknown option "+i,w.ERR_BAD_OPTION)}}const ge={assertOptions:$n,validators:ye},T=ge.validators;class ee{constructor(t){this.defaults=t,this.interceptors={request:new je,response:new je}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=I(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&ge.assertOptions(r,{silentJSONParsing:T.transitional(T.boolean),forcedJSONParsing:T.transitional(T.boolean),clarifyTimeoutError:T.transitional(T.boolean)},!1),o!=null&&(a.isFunction(o)?n.paramsSerializer={serialize:o}:ge.assertOptions(o,{encode:T.function,serialize:T.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s;s=i&&a.merge(i.common,i[n.method]),s&&a.forEach(["delete","get","head","post","put","patch","common"],p=>{delete i[p]}),n.headers=O.concat(s,i);const u=[];let h=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(h=h&&g.synchronous,u.unshift(g.fulfilled,g.rejected))});const l=[];this.interceptors.response.forEach(function(g){l.push(g.fulfilled,g.rejected)});let d,y=0,A;if(!h){const p=[Ke.bind(this),void 0];for(p.unshift.apply(p,u),p.push.apply(p,l),A=p.length,d=Promise.resolve(n);y<A;)d=d.then(p[y++],p[y++]);return d}A=u.length;let v=n;for(y=0;y<A;){const p=u[y++],g=u[y++];try{v=p(v)}catch(N){g.call(this,N);break}}try{d=Ke.call(this,v)}catch(p){return Promise.reject(p)}for(y=0,A=l.length;y<A;)d=d.then(l[y++],l[y++]);return d}getUri(t){t=I(this.defaults,t);const n=Je(t.baseURL,t.url);return qe(n,t.params,t.paramsSerializer)}}a.forEach(["delete","get","head","options"],function(t){ee.prototype[t]=function(n,r){return this.request(I(r||{},{method:t,url:n,data:(r||{}).data}))}}),a.forEach(["post","put","patch"],function(t){function n(r){return function(i,s,u){return this.request(I(u||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}ee.prototype[t]=n(),ee.prototype[t+"Form"]=n(!0)});const te=ee;class we{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(o=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const s=new Promise(u=>{r.subscribe(u),i=u}).then(o);return s.cancel=function(){r.unsubscribe(i)},s},t(function(i,s,u){r.reason||(r.reason=new q(i,s,u),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new we(function(o){t=o}),cancel:t}}}const Cn=we;function On(e){return function(n){return e.apply(null,n)}}function Nn(e){return a.isObject(e)&&e.isAxiosError===!0}const ve={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ve).forEach(([e,t])=>{ve[t]=e});const Tn=ve;function Ye(e){const t=new te(e),n=_e(te.prototype.request,t);return a.extend(n,te.prototype,t,{allOwnKeys:!0}),a.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Ye(I(e,o))},n}const b=Ye(fe);b.Axios=te,b.CanceledError=q,b.CancelToken=Cn,b.isCancel=He,b.VERSION=Xe,b.toFormData=K,b.AxiosError=w,b.Cancel=b.CanceledError,b.all=function(t){return Promise.all(t)},b.spread=On,b.isAxiosError=Nn,b.mergeConfig=I,b.AxiosHeaders=O,b.formToJSON=e=>Ve(a.isHTMLForm(e)?new FormData(e):e),b.HttpStatusCode=Tn,b.default=b;const f=b;function et(e,t){if(e)for(const n in e)t[n]=e[n]}function Ln(e){return!e||!Object.keys(e).length}function be(e){if(!e)return null;for(const t in e){const n=e[t];if(n&&(Array.isArray(n)||Object.keys(n).length>0))return JSON.parse(JSON.stringify(e))}return{...e}}const tt=`${B}/rest/agency`,Un=async e=>{try{return(await f.post(`${tt}/agencyContacts`,e)).data}catch(t){throw m(t),t}},In=async(e,t)=>{try{return(await f.get(`/rest/agency/getAgencyByIDLang/${e}/${t}`)).data}catch(n){throw m(n),n}},Fn=async e=>{try{return(await f.post("/rest/agency/sendMutuo",e)).data}catch(t){throw m(t),t}},Mn=async e=>{try{return(await f.post(`${tt}/getAgencyListForInfoWindow`,e)).data}catch(t){throw m(t),t}};let ne;const Bn=new Uint8Array(16);function kn(){if(!ne&&(ne=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ne))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ne(Bn)}const E=[];for(let e=0;e<256;++e)E.push((e+256).toString(16).slice(1));function Dn(e,t=0){return(E[e[t+0]]+E[e[t+1]]+E[e[t+2]]+E[e[t+3]]+"-"+E[e[t+4]]+E[e[t+5]]+"-"+E[e[t+6]]+E[e[t+7]]+"-"+E[e[t+8]]+E[e[t+9]]+"-"+E[e[t+10]]+E[e[t+11]]+E[e[t+12]]+E[e[t+13]]+E[e[t+14]]+E[e[t+15]]).toLowerCase()}const nt={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function rt(e,t,n){if(nt.randomUUID&&!t&&!e)return nt.randomUUID();e=e||{};const r=e.random||(e.rng||kn)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let o=0;o<16;++o)t[n+o]=r[o];return t}return Dn(r)}const j=(e,t={})=>{if(Object.keys(t).length===0)throw"The params object can't be empty";const n=new URL(e);for(const r in t)n.searchParams.append(r,`${t[r]}`);return n},L=`${B}/rest/geography`;let z=rt();const Gn=async(e,t,n=[])=>{z||(z=rt());const r=new URL(`${L}/placesAddressAutocomplete`),o=n.length,i=n.reduce((h,l,d)=>o===1?l:d===o-1?h:h+=`${l}|`,""),s=j(r,{query:e,radius:t,sessionToken:z,types:i}),u=await f.get(s.toString());if(u.data.status!=="OK")throw new Error("There was an error in the request");return u.data.predictions},ot=async e=>{const t=new URL(`${L}/getPlacesDetails`),n=j(t,{placeId:e,sessionToken:z}),r=await f.get(n.toString());if(z="",r.data.status!=="OK")throw new Error("There was an error in the request");return r.data.result},st=async(e,t)=>{const n=new URL(`${L}/guessCityPlace/${e}/${t}`);return(await f.get(n.toString())).data},qn=async e=>{if(e==null)throw new Error("The id can't be null");return(await f.get(`${L}/getPlaceFromPlaceID/${e}`)).data},jn=async e=>{try{return(await f.get(`${L}/getCountryPolygonJson/${e}`)).data}catch(t){throw m(t),t}},zn=async e=>{try{return(await f.get(`${L}/getRegionPolygonJson/${e}`)).data}catch(t){throw m(t),t}},Vn=async e=>{try{return(await f.get(`${L}/getCityPolygonJson/${e}`)).data}catch(t){throw m(t),t}},Wn=async e=>{try{return(await f.get(`${L}/getProvincePolygonJson/${e}`)).data}catch(t){throw m(t),t}},Hn="/rest/insights",Jn=async e=>{try{return(await f.post(`${Hn}/getTransactionsGraphData`,e)).data}catch(t){throw m(t),t}},V=`${B}/rest/mail`,xn=async e=>{try{return(await f.post(`${V}/infoPremium`,e)).data}catch(t){throw m(t),t}},Kn=async e=>{try{return(await f.post(`${V}/sendBrochurePremium`,e)).data}catch(t){throw m(t),t}},Qn=async e=>{try{return(await f.post(`${V}/submitJobApplication`,e,{headers:{"Content-Type":"multipart/form-data"}})).data}catch(t){throw m(t),t}},Xn=async e=>{try{return(await f.post(`${V}/sendBrochureMR`,e)).data}catch(t){throw m(t),t}},Zn=async e=>{try{return(await f.post(`${V}/infoMR`,e)).data}catch(t){throw m(t),t}},Yn=window._baseURLIt,re="/ws",er=async(e,t=[],n="")=>{try{return n||(n=""),(await f.get(`${re}/places?query=${e}&type=${t.join(",")}${n?`&provinceID=${n}`:""}`)).data}catch(r){throw m(r),r}};function tr(e,t="C,P,Z,L,I,R,A"){return new Promise(n=>{f.get(`${re}/places?query=${e}&type=${t}`).then(r=>{r!=null&&r.data||n([]),n(r==null?void 0:r.data)})})}function nr(e){return new Promise(t=>{f.get(`${re}/zones?cityID=${e}`).then(n=>{if(!(n!=null&&n.data)){t([]);return}t(n==null?void 0:n.data)})})}const rr=async e=>{try{return(await f.get(j(new URL(`${Yn}${re}/districts`),{zoneID:e}).toString())).data}catch(t){throw m(t),t}},or=async e=>{try{return(await f.post(`/rest/portfolioCustomer/updateNewsletterConsent/?email=${e}`)).data}catch(t){throw m(t),t}};var Ae=(e=>(e[e.SELLING=0]="SELLING",e[e.SALE=1]="SALE",e[e.RENT=2]="RENT",e[e.AUCTION=3]="AUCTION",e))(Ae||{});const it={priceFrom:"PrezzoMinimo",priceTo:"PrezzoMassimo",sqMfrom:"SuperficieMinima",sqMto:"SuperficieMassima",roomsFrom:"NumeroMinimoLocali",roomsTo:"NumeroMassimoLocali",bathroomsFrom:"NumeroMinimoBagni",bathroomsTo:"NumeroMassimoBagni",conditionType:"StatoImmobile",energyClassFilter:"ClasseEnergetica",floor:"Piano",excludeAuctions:"EscludiAste",shortRentOnly:"SoloAffittiBrevi",excludeBareOwnership:"EscludiNudaProprieta",onlyPublicUser:"DaPrivato",balcony:"Balcone",terrace:"Terrazzo",balconyTerrace:"BalconeTerrazzo",boxCarSpot:"BoxPostoAuto",carSpot:"PostoAuto",box:"Box",lift:"Ascensore",privateGarden:"GiardinoPrivato",publicGarden:"GiardinoPubblico",cellar:"Cantina",airConditioning:"AriaCondizionata",furnished:"Arredato",publicTransport:"Trasporti",school:"Istruzione",market:"Supermercati",hospital:"Ospedali",pharmacy:"Farmacie",charging:"Ricarica",post:"UfficioPostale",bank:"Banche",swimmingPoolPrivate:"PiscinaPrivata",swimmingPoolPublic:"PiscinaCondominiale",luxury:"Lusso",discounted:"Sconto",filterOrderId:"Ordinamento"},Ee={sale:"Vendita",rent:"Affitto",auctionType:"Asta",bareOwnershipType:"NudaProprieta",typologyIdList:"Tipologia",filterOrderId:"Ordinamento"};function sr(){return{sale:!0,rent:!1,contractType:window._contractDefault,excludeAuctions:!1,shortRentOnly:!1,excludeBareOwnership:!1,macroTypologyId:window._macroTypologyDefault,listingTypologyId:0,listingTypologyURL:window._listingTypologyURLDefault,listingTypologyIdList:[0],typologyIdList:window._typologyIdListDefault,onlyVisible:!0,subscriptionTypes:window._subscriptionTypesDefault}}function ir(){return{active:!0,hourly:!1,latitude:0,longitude:0,saveSearchParameterId:null,searchBean:sr(),title:""}}const S=`${window._baseURLIt}/rest/publicUser`,ar=async()=>{try{return(await f.get(`${S}/getMenuInfo`)).data}catch(e){throw m(e),null}},cr=async()=>{try{return(await f.get(`${S}/getUser`)).data}catch(e){throw m(e),null}},ur=async e=>{try{return(await f.get(`${S}/getMarketingConsent?email=${e}`)).data}catch(t){return m(t),!1}},lr=async()=>{try{return(await f.post(`${S}/deleteAllUserSaveSearch`)).data}catch(e){throw m(e),null}},dr=async e=>{try{return(await f.post(`${S}/deleteUserSaveSearchParam/${e}`)).data}catch(t){throw m(t),null}},fr=async()=>{try{return(await f.get(`${S}/getFavouriteIdList`)).data}catch(e){return m(e),[]}},hr=async e=>{try{return(await f.post(`${S}/addUserFavourite/${e}`)).data}catch(t){return m(t),!1}},pr=async e=>{try{return(await f.post(`${S}/deleteUserFavourite/${e}`)).data}catch(t){return m(t),!1}},mr=async(e,t)=>{if(t===" "||t===" ")return!1;try{return(await f.post(`${S}/updateFavouriteNote`,{realEstateId:e,note:t})).data}catch(n){return m(n),!1}},yr=async()=>{try{return(await f.post(`${S}/deleteAllUserFavourite`)).data}catch(e){return m(e),!1}},gr=async e=>{try{return e?(await f.post(`${S}/refreshUserFirebaseToken?token=${e}`),!0):!1}catch{return!1}},wr=async e=>{try{return await f.delete(`${S}/deleteUserFirebaseToken?token=${e}`),!0}catch{return!1}},vr=async e=>{const{email:t,marketingConsent:n}=e;try{return await f.post(`${S}/updateMarketingConsent?email=${t}&marketingConsent=${n}`,e),!0}catch(r){return m(r),!1}},br=async(e=0,t=10)=>{try{return(await f.get(`${S}/getPublicUserSavedSearchBeanList/${e}/${t}`)).data}catch(n){return m(n),[]}},Ar=async e=>{try{return(await f.post(`${S}/updatePublicUserSavedSearchBean/`,e)).data}catch(t){return m(t),ir()}},Er=async()=>{try{return(await f.get(`${S}/getPublicUserSaveSearchCount`)).data}catch(e){return m(e),0}},oe=window._baseURLIt,at=`${oe}/rest/realEstate`,Sr=async e=>{try{return(await f.post(`${oe}/rest/publicUser/getRealEstateNotes/${e}`)).data}catch(t){return m(t),""}},Rr=async(e,t,n,r,o=!1)=>{if(!e||!r)throw`Email or resb are not valid, ${e}, ${r}`;return await f.post(`${at}/saveSearch?email=${e}&title=${t}&hourly=${n}&pushNotifications=${o}`,r)},_r=async(e,t,n=!1)=>{try{const r="Ricerca salvata";return(await f.post(`${at}/saveSearch?email=${e}&title=${r}&pushNotifications=${n}`,t)).data}catch(r){throw m(r),r}},Pr=async e=>{var r;const t=be(e);return t.polygonForDB&&(t.polygonFromMap=t.polygonForDB||""),(r=t==null?void 0:t.listingTypologyIdList)!=null&&r.includes(15)&&(t.conditionType=5),await(await f.post("/rest/realEstate/countRealEstateES",t)).data},$r=async e=>{try{return(await f.post(`${oe}/rest/realEstate/getRealEstateListForInfoWindow/${window._locale}`,e)).data}catch(t){return m(t),null}},Cr=async()=>{if(!window._serializedSearchBean)return[];const e=be(JSON.parse(window._serializedSearchBean));delete e.latitude,delete e.longitude;try{return(await f.post(`${oe}/rest/realEstate/getMapMarkers`,e,{headers:{"Content-Type":"application/json",Accept:"application/json"}})).data}catch(t){throw m(t),[]}},ct=`${B}/rest/request`,Or=async e=>(await f.post(`${ct}/sendSuggestion`,e)).data,Nr=async e=>{try{return(await f.post("/rest/request/addRequestGeneric",e)).data}catch(t){throw m(t),t}},Tr=async e=>(await f.post(`${ct}/sendWidgetRequest`,e)).data,F="/rest/statistics",Lr=async e=>{try{return await f.post(`${F}/updateViewListing/W`,e),!0}catch(t){return m(t),!1}},Ur=async e=>{try{return f.post(`${F}/updateRealEstateSearch`,e),!0}catch(t){return m(t),!1}},Ir=async(e,t)=>{try{return(await f.post(t?`${F}/updatePhoneView/${e}/${t}/W`:`/rest/statistics/updatePhoneView/${e}/W`)).data}catch(n){throw m(n),n}},Fr=async e=>{try{const t=await f.post(`${F}/getPlaceTrendData?sale=${!0}`,e),n=await f.post(`${F}/getPlaceTrendData?sale=${!1}`,e);return Promise.all([t,n])}catch(t){throw m(t),t}},Mr=async(e,t={contract:"sale",macroTypologyId:1})=>{try{return(await f.post(`${F}/getAveragePriceGraphData/${t.contract}/${t.macroTypologyId}`,e)).data}catch(n){throw m(n),n}},Br="/rest/wikicasaPro",kr=async(e,t,n=void 0,r=void 0)=>{if(!t)throw new Error("The token can't be null");try{let o={token:t};n&&(o={...o,conditionTypeId:n}),r!=null&&(o={...o,floor:r});const i=j(new URL(`${B}${Br}/evaluateRealEstateWidget`),o),s=await f.post(i.toString(),e);return s.data.valid=!!s.data.valid,s.data}catch(o){throw m(o),o}},Dr="/rest/wikicasaPro",Gr=async(e,t,n,r=0)=>{try{return(await f.post(`${Dr}/userValuationWithPhotoFeedback/?email=${e}&token=${t}&feedback=${n}${r>0?"&userFeedbackValue="+r:""}`)).data}catch(o){throw m(o),o}},qr=(e="Banner")=>{var t;if(window.navigator.userAgent.includes("iPhone"))window.navigator.userAgent.match(/firefox|fxios/i)||window.location.replace("wikicasa://"),setTimeout(()=>{window.location.replace("https://apps.apple.com/it/app/wikicasa/id1626038379")},500);else if(window.navigator.userAgent.includes("Android")){const n="intent://wikicasa.it/#Intent;scheme=https;package=it.wikicasa.wikicasa_app;end";window.location.replace(n)}window.dataLayer.push({event_name:"open_store",event_location:e,OS:(t=window.navigator)==null?void 0:t.userAgent})},jr=e=>!(e!=null&&e.length);function zr(e,t){e=e.replace("#","");const n=parseInt(e.substring(0,2),16),r=parseInt(e.substring(2,4),16),o=parseInt(e.substring(4,6),16);return`rgba(${n}, ${r}, ${o}, ${t})`}/*! js-cookie v3.0.5 | MIT */function se(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var Vr={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Se(e,t){function n(o,i,s){if(!(typeof document>"u")){s=se({},t,s),typeof s.expires=="number"&&(s.expires=new Date(Date.now()+s.expires*864e5)),s.expires&&(s.expires=s.expires.toUTCString()),o=encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var u="";for(var h in s)s[h]&&(u+="; "+h,s[h]!==!0&&(u+="="+s[h].split(";")[0]));return document.cookie=o+"="+e.write(i,o)+u}}function r(o){if(!(typeof document>"u"||arguments.length&&!o)){for(var i=document.cookie?document.cookie.split("; "):[],s={},u=0;u<i.length;u++){var h=i[u].split("="),l=h.slice(1).join("=");try{var d=decodeURIComponent(h[0]);if(s[d]=e.read(l,d),o===d)break}catch{}}return o?s[o]:s}}return Object.create({set:n,get:r,remove:function(o,i){n(o,"",se({},i,{expires:-1}))},withAttributes:function(o){return Se(this.converter,se({},this.attributes,o))},withConverter:function(o){return Se(se({},this.converter,o),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}Se(Vr,{path:"/"});function Wr(e,t,n=30,r=!0){const o=new Date;o.setTime(o.getTime()+864e5*n);const i=typeof t!="string"?JSON.stringify(t):t,s=r?btoa(encodeURIComponent(i)):i;document.cookie=e+"="+s+";path=/;expires="+o.toUTCString()}function Hr(e){try{const t=document.cookie.match("(^|;) ?"+e+"=([^;]*)(;|$)");return t?t[2]:null}catch(t){return console.error(t),null}}function Jr(e){try{const t=document.cookie.match("(^|;) ?"+e+"=([^;]*)(;|$)");return t?JSON.parse(decodeURIComponent(atob(t[2]))):null}catch(t){return console.error(t),ut(e),null}}function ut(e){(void 0)(e)}const xr=(e,t,n="it-IT")=>{if(e===void 0)return"0";const r={style:"currency",currency:"EUR",maximumFractionDigits:0};return et(t,r),new Intl.NumberFormat(n,r).format(e)};function Kr(e,t=!1){const n=e.getDate(),r=e.getMonth()+1,o=e.getFullYear();return t?`${("0"+n).slice(-2)}-${("0"+r).slice(-2)}-${o}`:`${o}-${("0"+r).slice(-2)}-${("0"+n).slice(-2)}`}const Qr=()=>/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,Xr=()=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),Zr=()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent),lt=e=>{const t=document.querySelector(e);if(!t)throw new Error(`No element found with the id: ${e}`);return t},Yr=e=>{typeof e=="string"?lt(e).textContent="":e.textContent=""},eo=(e,t="block")=>{e&&(e.style.display=t)},to=e=>{e&&(e.style.display="none")},no=e=>e.includes("@gmail");async function ro(e){const t=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-256",t);return Array.from(new Uint8Array(n)).map(i=>i.toString(16).padStart(2,"0")).join("")}const oo=e=>{const t=e.split("@");if(t.length<2)throw new Error("The email has nothing before the '@' symbol");const n=t[0];let r="";for(const o of n)if(o!=="."){if(o==="+")break;r+=o}return`${r}@${t[1]}`},so=e=>{if(!e||!e.trim())throw new Error("The email in null or empty");let t=e;return no(t)&&(t=oo(e)),ro(t)},io=e=>{document.querySelectorAll(`a[class^=fav][data-id='${e}']`).forEach(n=>{n.classList.contains("fav-save")?n.style.display="none":n.classList.contains("fav-remove")&&(n.style.display="block")})},ao=e=>{document.querySelectorAll(`a[class^=fav][data-id='${e}']`).forEach(n=>{n.classList.contains("fav-save")?n.style.display="block":n.classList.contains("fav-remove")&&(n.style.display="none")})},C=(e,t)=>e?{...e,...t}:{...t},co={valuation:e=>{const t={event:"GAevent",eventCategory:"Valutazione immobile",eventAction:e.eventAction,eventLabel:"Pagina valutazione",event_name:e.eventAction==="Share"?"valuation_share":"valuation_share_modal",event_location:"Valutazione"};e.social&&(t.social=e.social),window.dataLayer.push(t)},request:e=>{window.dataLayer.push({event:"GAevent",eventCategory:e.id?"Richiesta specifica":"Richiesta agenzia",eventAction:"Invio richiesta",eventLabel:(e.franchise?`${e.franchise} / AG_${e.agencyId}`:`AG_${e.agencyId}`)+(e.id?` / WK_${e.id} (${e.pageName}: ${e.sale?"vendita":"affitto"} / ${e.premium?"premium":e.lite?"lite":"free"})`:` (${e.pageName}: ${e.premium?"premium":e.lite?"lite":"free"})`),franchise:e.franchise?e.franchise:void 0,agent_id:e.agentId?`${e.agentId}`:void 0,agent_email:e.agentEmail,product_price:e.productPrice,email:e.email,event_name:e.id?"specific_request_lead":"generic_request_lead",event_location:`${e.pageName}`,real_estate_id:e.id,product_id:`WK_${e.id}`,contract_type:e.id?e.auction?"auction":e.rent?"rent":"sale":void 0,price:e.price,typology_name:e.typologyName,agency_id:e.agencyId,agency_name:e.agencyName,franchise_id:e.franchise_id,franchise_name:e.franchise_name,subscription_type:e.premium?"premium":e.lite?"lite":"free",premium:e.premium})},mortgage:()=>{window.dataLayer.push({event:"GAevent",eventCategory:"Preventivo Mutuo",eventAction:"Invio richiesta",eventLabel:"Popup - Richiesta specifica",event_name:"mortgage_lead",event_location:"Modale Richiesta Specifica"})},mailAlertSave:()=>{window.dataLayer.push({event:"GAevent",eventCategory:"Mail alert",eventAction:"Ricerca salvata",eventLabel:"Popup - Richiesta specifica",event_name:"mail_alert_save",event_location:"Modale Richiesta Specifica"})},generic_request_lead:()=>{window.dataLayer.push({event:"GAevent",eventCategory:"Richiesta generica",eventAction:"Invio richiesta",eventLabel:"Popup - Richiesta specifica",event_name:"generic_request_lead",event_location:"Modale Richiesta Specifica"})},newsletter_subscribe:()=>{window.dataLayer.push({event:"GAevent",eventCategory:"Newsletter",eventAction:"Iscrizione",eventLabel:"Popup - Richiesta specifica",event_name:"newsletter_subscribe",event_location:"Modale Richiesta Specifica"})},phone_show:e=>{window.dataLayer.push({event:"GAevent",eventCategory:"Telefono",eventAction:"Mostra telefono",eventLabel:(e.franchise?`${e.franchise} / AG_${e.agencyId}`:`AG_${e.agencyId}`)+(e.id?` / WK_${e.id} (${e.pageName}: ${e.sale?"vendita":"affitto"} / ${e.premium?"premium":e.lite?"lite":"free"})`:` (${e.pageName}: ${e.premium?"premium":e.lite?"lite":"free"})`),franchise:e.franchise?e.franchise:void 0,product_id:e.id?`WK_${e.id}`:void 0,product_price:e.product_price,event_name:"phone_show",real_estate_id:`${e.id}`,contract_type:e.auction?"auction":e.rent&&!e.sale?"rent":"sale",price:e.price,typology_name:e.typologyName,agency_id:e.agencyId,agency_name:e==null?void 0:e.agencyName,franchise_id:e.franchise?e.franchise_id:"",franchise_name:e.franchise,premium:e.premium,subscription_type:e.premium?"premium":e.lite?"lite":"free",event_location:e.pageName})},public_user_login:()=>{window.dataLayer.push({event:"GAevent",eventCategory:"Utenti pubblici",eventAction:"Login",eventLabel:"Modale Login",event_name:"login",event_location:"login_modal"})},pushNotificationOpened:()=>{const e=C({event:"GAevent",eventCategory:"Mail alert",eventAction:"Apertura notifica push",eventLabel:"Notifica Push - Salva ricerca"},{event:"GAevent",event_name:"push_notification_opened",event_location:"Notifica Push - Android_or_Web"});window.dataLayer.push({event_location:"save_searches",...e})},public_user_sign_up:()=>{window.dataLayer.push(C({event:"GAevent",eventCategory:"Utenti pubblici",eventAction:"Registrazione",eventLabel:"Modale registrazione"},{event:"GAevent",event_name:"public_user_sign_up",event_location:"Modale Registrazione"}))},premium_info:()=>{window.dataLayer.push(C({event:"GAevent",eventCategory:"Premium",eventAction:"Richiesta Informazioni"},{event:"GAevent",event_name:"premium_info",event_location:"Pagina Premium"}))},valuation_complete:()=>{window.dataLayer.push(C({event:"GAevent",eventCategory:"Valutazione immobile",eventAction:"Invio richiesta",eventLabel:"Pagina valutazione"},{event:"GAevent",event_name:"valuation_complete",event_location:"Valutazione - Step 3"}))},valuation_lead:(e={isSelling:!1})=>{window.dataLayer.push(C(null,{event:"GAevent",event_name:"valuation_lead",event_location:"Valutazione - Step 3",valuation_type:e.isSelling?"selling":"valuation"}))},valuation_pdf_download:()=>{window.dataLayer.push(C({event:"GAevent",eventCategory:"Valutazione immobile",eventAction:"Download PDF",eventLabel:"Pagina valutazione"},{event:"GAevent",event_name:"valuation_pdf_download",event_location:"Valutazione"}))},error_request_409:()=>{window.dataLayer.push({event:"GAevent",eventCategory:"Richiesta Specifica",eventAction:"Errore Richiesta",eventLabel:"Richiesta gia effettuata - 409",event_name:"specific_request_error",event_location:"Modale Richiesta Specifica",code_error:"request_already_made_409"})},specific_request_interaction:e=>{const t=C(null,{event:"GAevent",event_name:"specific_request_interaction",event_location:e.pageName});window.dataLayer.push(t)},copy_avm_widget:()=>{window.dataLayer.push(C({event:"GAevent",eventCategory:"Widget AVM",eventAction:"Copia Widget AVM"},{event:"GAevent",event_name:"copy_avm_widget",event_location:"Pagina Widget AVM"}))},copy_trend_widget:()=>{window.dataLayer.push(C({event:"GAevent",eventCategory:"Widget Quotazioni",eventAction:"Copia Widget Quotazioni"},{event:"GAevent",event_name:"copy_trend_widget",event_location:"Pagina Widget Quotazioni"}))},send_avm_widget_request:()=>{window.dataLayer.push(C({event:"GAevent",eventCategory:"Widget AVM",eventAction:"Invio Richiesta Widget AVM"},{event:"GAevent",event_name:"send_request_avm_widget",event_location:"Pagina Widget AVM"}))}};function uo(e,t){const n=co[e];t?n(t):n()}function lo(e,t,n){return e.replace(new RegExp(t,"g"),n)}function dt(e){return e.charAt(0).toUpperCase()+e.slice(1)}function ft(e,t,n,r){const o=[];e&&e!=="ND"&&(t&&t!=="ND"&&t!=="0"?o.push(`${e} ${t}`):o.push(e)),n&&r?o.push(`${n} (${r})`):o.push(n);const i=o.filter(s=>!!s).join(", ");return dt(i)}function fo(e){if(!e)return"";const t=document.createElement("span");return t.innerHTML=e,t.textContent||""}function ho(e,t){const n=new RegExp(Object.keys(t).map(r=>r.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")).join("|"),"gi");return e.replace(n,function(r){return t[r.toLowerCase()]})}function ht(e){return e.replace(/[\uA78C\uA78B]/g,"'").replace(/[^\x00-\x7F]/g,"")}const pt=async(e,t)=>{const n={};for(let o=0;o<e.address_components.length;o++)e.address_components[o].types.indexOf("administrative_area_level_3")!==-1?n.city=e.address_components[o].long_name:e.address_components[o].types.indexOf("locality")!==-1?n.locality=e.address_components[o].long_name:e.address_components[o].types.indexOf("route")!==-1?n.streetName=e.address_components[o].long_name:e.address_components[o].types.indexOf("street_number")!==-1?n.streetNumber=e.address_components[o].long_name:e.address_components[o].types.indexOf("postal_code")!==-1&&(n.zip=e.address_components[o].long_name);n.latitude=e.geometry.location.lat,n.longitude=e.geometry.location.lng,n.address=ht(t),typeof n.streetNumber>"u"&&(n.streetNumber=null);let r=await st(n.latitude,n.longitude);if(delete r.city,delete r.locality,r={...r,...n},!r.streetNumber){const o=parseInt(r.address.split(",")[1]),i=parseInt(r.zip);o&&o!==i&&(r.streetNumber=o.toString())}return r},po=async(e,t)=>{const n=await ot(e),r=await pt(n,t),o=r.streetName?ft(r.streetName,r.streetNumber||"",r.cityName):r.address;return{place:r,address:o}},mo=(e,t)=>new Promise((n,r)=>{setTimeout(()=>{try{e&&e(),n()}catch{r()}},t)}),mt=(e,t)=>{t||(t=navigator.language);const n=Intl.NumberFormat(t).format(1111).replace(/\p{Number}/gu,""),r=Intl.NumberFormat(t).format(1.1).replace(/\p{Number}/gu,""),o=parseFloat(`${e}`.replace(new RegExp("\\"+n,"g"),"").replace(new RegExp("\\"+r),"."));return isNaN(o)?"":o},yt=(e,t)=>{if(e==null)return;if(e=parseFloat(`${e}`),isNaN(e))return"";const n={style:"currency",currency:"EUR"};let o={...{maximumFractionDigits:0}};return t!=null&&t.currency&&(o={...o,...n}),new Intl.NumberFormat(navigator.language,{...o}).format(e)};function yo(e,t=!1){return e==null?"":Re(t?Math.round(e):Math.floor(e),0)}function Re(e,t){return!e&&e!==0?"":e.toLocaleString("it-IT",{minimumFractionDigits:t,maximumFractionDigits:t})}function go(e,t=2){return Re(e,t)}const wo={formatFn:yt,unFormatFn:mt};function vo(e,t,n){const r=[].slice.call(document.querySelectorAll(e)),o=new IntersectionObserver((i,s)=>{for(let u=0;u<i.length;u++){const h=i[u];if(h.isIntersecting){const l=h.target;t(l,s),s.unobserve(l)}}},n);r.forEach(i=>{o.observe(i)})}let gt=!1;const bo=e=>{document.addEventListener("notification-permission-changed",e)},Ao=()=>{!navigator.permissions||!navigator.permissions.query||(!gt&&navigator.permissions.query({name:"notifications"}).then(function(e){e.onchange=function(){document.dispatchEvent(new CustomEvent("notification-permission-changed",{detail:{permissionState:this.state}}))}}),gt=!0)};function Eo(e){return new Promise((t,n)=>f.post("/rest/request/addRequestGenericValuation",e,{headers:{"Content-Type":"application/json",dataType:"json"}}).then(()=>{t()}).catch(r=>n(r)))}function So(e,t,n,r,o,i,s){let u="/";return n&&(u+=(n==Ae.AUCTION?window._auctionLabel:n==Ae.RENT?window._rentLabel:window._saleLabel)+"-"),u+=`${t}/`,i&&(u+=`${i}/`),e&&(u+=`${e.replace(/^-+|-+$/g,"")}/`),r&&(u+=`${r.replace(/^_+|_+$/g,"")}/`),!r&&s&&(u+=`${s.replace(/^_+|_+$/g,"")}/`),o&&(u+=`${o.replace(/^_+|_+$/g,"")}/`),u}function Ro(e){const t=Object.keys(it).map(n=>e[n]?encodeURIComponent(it[n])+"="+encodeURIComponent(e[n]):null).filter(n=>n!==null);return t.length?`?${t.join("&")}`:""}function _o(e){const t=Object.keys(Ee).map(n=>{if(e[n])if(Array.isArray(e[n])){const r=e[n],o=Ee[n];let i="";for(let s=0;s<r.length;s++)i+=encodeURIComponent(o)+"="+encodeURIComponent(r[s]),i+=s<r.length-1?"&":"";return i}else return encodeURIComponent(Ee[n])+"="+encodeURIComponent(e[n]);else return null}).filter(n=>n!==null);return t.length?`?${t.join("&")}`:""}const Po=e=>{const t=`${window._baseURL}`;switch(e){case"SAVED_SEARCHES":return`${t}/${window._privateURL}/${window._saveSearchesURL}`;default:throw new Error(`There is no matching URL for ${e}`)}};return c.addGenericRequest=Nr,c.addPermissionStateListener=Ao,c.addUserFavorite=hr,c.appendQueryString=j,c.awaitableSetTimeout=mo,c.buildParams=Ro,c.buildParamsForAgency=_o,c.buildURL=So,c.capitalizeFirstLetter=dt,c.cleanASCII=ht,c.decodeCookie=Jr,c.decodeTextWithEntities=fo,c.deepCopy=be,c.deleteAllSaveSearch=lr,c.deleteSaveSearch=dr,c.deleteUserFavorite=pr,c.deleteUserFirebaseToken=wr,c.emptyElem=Yr,c.encodeCookie=Wr,c.evaluateRealEstateWidget=kr,c.formatAddress=ft,c.formatCurrency=xr,c.formatDate=Kr,c.formatFloat=go,c.formatInteger=yo,c.formatLocaleNumber=yt,c.formatNumber=Re,c.formatterNumberObj=wo,c.getAgenciesData=Mn,c.getAgencyById=In,c.getCityPolygonJSON=Vn,c.getCookie=Hr,c.getCountryPolygonJSON=jn,c.getDistrictsByZoneId=rr,c.getFavourites=fr,c.getMapMarkers=Cr,c.getMarketingConsent=ur,c.getMenuInfo=ar,c.getPlace=tr,c.getPlaceFromGAutocomplete=po,c.getPlaceFromPlaceID=qn,c.getPlaceTrendData=Fr,c.getPlacesAddressAutocomplete=Gn,c.getPlacesByQuery=er,c.getPlacesDetails=ot,c.getProvincePolygonJSON=Wn,c.getPublicUser=cr,c.getPublicUserSaveSearchList=br,c.getRealEstateCounter=Pr,c.getRealEstateNotes=Sr,c.getRealEstatesData=$r,c.getRegionPolygonJSON=zn,c.getSaleGraphData=Mr,c.getSavedSearchesCount=Er,c.getSingleElement=lt,c.getTransactionGraphData=Jn,c.getURLPage=Po,c.getZones=nr,c.googlePlaceConverter=pt,c.guessPlace=st,c.handleAxiosError=m,c.hashEmail=so,c.hideElem=to,c.isArrNullOrEmpty=jr,c.isEmptyObject=Ln,c.isMobile=Xr,c.isSafari=Zr,c.isiOSDevice=Qr,c.observeOnce=vo,c.onNotificationsPermissionChange=bo,c.parseLocaleNumber=mt,c.redirectToApp=qr,c.removeCookie=ut,c.removeFavourites=yr,c.replaceAll=lo,c.replaceAllTokens=ho,c.rgba=zr,c.saveSearch=Rr,c.saveSearchFromRequest=_r,c.saveUserFirebaseToken=gr,c.sendAgencyContactAsync=Un,c.sendBrochureMR=Xn,c.sendBrochureRequest=Kn,c.sendGAEvent=uo,c.sendInfoMR=Zn,c.sendInfoPremium=xn,c.sendJobApplicationForm=Qn,c.sendMortgage=Fn,c.sendRequestGeneric=Eo,c.sendSuggestion=Or,c.sendWidgetRequest=Tr,c.shallowCopyObjectTo=et,c.showAddFavoritesIcon=ao,c.showElem=eo,c.showRemoveFavoritesIcons=io,c.updateMarketingConsent=vr,c.updateNewsletterConsent=or,c.updateNote=mr,c.updatePhoneView=Ir,c.updatePublicUserSavedSearchBean=Ar,c.updateRealEstateSearch=Ur,c.updateViewListing=Lr,c.userValuationWithPhotoFeedback=Gr,Object.defineProperty(c,Symbol.toStringTag,{value:"Module"}),c}({});
|
package/dist/utilities.mjs
CHANGED
|
@@ -2116,18 +2116,23 @@ const _o = (e, t, n = "it-IT") => {
|
|
|
2116
2116
|
maximumFractionDigits: 0
|
|
2117
2117
|
};
|
|
2118
2118
|
return Sn(t, r), new Intl.NumberFormat(n, r).format(e);
|
|
2119
|
-
}
|
|
2119
|
+
};
|
|
2120
|
+
function So(e, t = !1) {
|
|
2121
|
+
const n = e.getDate(), r = e.getMonth() + 1, o = e.getFullYear();
|
|
2122
|
+
return t ? `${("0" + n).slice(-2)}-${("0" + r).slice(-2)}-${o}` : `${o}-${("0" + r).slice(-2)}-${("0" + n).slice(-2)}`;
|
|
2123
|
+
}
|
|
2124
|
+
const Ro = () => /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, $o = () => /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
|
|
2120
2125
|
navigator.userAgent
|
|
2121
|
-
),
|
|
2126
|
+
), Oo = () => /^((?!chrome|android).)*safari/i.test(navigator.userAgent), Dn = (e) => {
|
|
2122
2127
|
const t = document.querySelector(e);
|
|
2123
2128
|
if (!t)
|
|
2124
2129
|
throw new Error(`No element found with the id: ${e}`);
|
|
2125
2130
|
return t;
|
|
2126
|
-
},
|
|
2131
|
+
}, Po = (e) => {
|
|
2127
2132
|
typeof e == "string" ? Dn(e).textContent = "" : e.textContent = "";
|
|
2128
|
-
},
|
|
2133
|
+
}, Co = (e, t = "block") => {
|
|
2129
2134
|
e && (e.style.display = t);
|
|
2130
|
-
},
|
|
2135
|
+
}, To = (e) => {
|
|
2131
2136
|
e && (e.style.display = "none");
|
|
2132
2137
|
}, qn = (e) => e.includes("@gmail");
|
|
2133
2138
|
async function jn(e) {
|
|
@@ -2147,16 +2152,16 @@ const Gn = (e) => {
|
|
|
2147
2152
|
r += o;
|
|
2148
2153
|
}
|
|
2149
2154
|
return `${r}@${t[1]}`;
|
|
2150
|
-
},
|
|
2155
|
+
}, Lo = (e) => {
|
|
2151
2156
|
if (!e || !e.trim())
|
|
2152
2157
|
throw new Error("The email in null or empty");
|
|
2153
2158
|
let t = e;
|
|
2154
2159
|
return qn(t) && (t = Gn(e)), jn(t);
|
|
2155
|
-
},
|
|
2160
|
+
}, No = (e) => {
|
|
2156
2161
|
document.querySelectorAll(`a[class^=fav][data-id='${e}']`).forEach((n) => {
|
|
2157
2162
|
n.classList.contains("fav-save") ? n.style.display = "none" : n.classList.contains("fav-remove") && (n.style.display = "block");
|
|
2158
2163
|
});
|
|
2159
|
-
},
|
|
2164
|
+
}, Uo = (e) => {
|
|
2160
2165
|
document.querySelectorAll(`a[class^=fav][data-id='${e}']`).forEach((n) => {
|
|
2161
2166
|
n.classList.contains("fav-save") ? n.style.display = "block" : n.classList.contains("fav-remove") && (n.style.display = "none");
|
|
2162
2167
|
});
|
|
@@ -2447,11 +2452,11 @@ const Gn = (e) => {
|
|
|
2447
2452
|
copy_trend_widget: ar,
|
|
2448
2453
|
send_avm_widget_request: cr
|
|
2449
2454
|
};
|
|
2450
|
-
function
|
|
2455
|
+
function xo(e, t) {
|
|
2451
2456
|
const n = ur[e];
|
|
2452
2457
|
t ? n(t) : n();
|
|
2453
2458
|
}
|
|
2454
|
-
function
|
|
2459
|
+
function Io(e, t, n) {
|
|
2455
2460
|
return e.replace(new RegExp(t, "g"), n);
|
|
2456
2461
|
}
|
|
2457
2462
|
function lr(e) {
|
|
@@ -2463,13 +2468,13 @@ function dr(e, t, n, r) {
|
|
|
2463
2468
|
const i = o.filter((s) => !!s).join(", ");
|
|
2464
2469
|
return lr(i);
|
|
2465
2470
|
}
|
|
2466
|
-
function
|
|
2471
|
+
function Fo(e) {
|
|
2467
2472
|
if (!e)
|
|
2468
2473
|
return "";
|
|
2469
2474
|
const t = document.createElement("span");
|
|
2470
2475
|
return t.innerHTML = e, t.textContent || "";
|
|
2471
2476
|
}
|
|
2472
|
-
function
|
|
2477
|
+
function Bo(e, t) {
|
|
2473
2478
|
const n = new RegExp(
|
|
2474
2479
|
Object.keys(t).map((r) => r.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&")).join("|"),
|
|
2475
2480
|
"gi"
|
|
@@ -2494,10 +2499,10 @@ const pr = async (e, t) => {
|
|
|
2494
2499
|
o && o !== i && (r.streetNumber = o.toString());
|
|
2495
2500
|
}
|
|
2496
2501
|
return r;
|
|
2497
|
-
},
|
|
2502
|
+
}, Mo = async (e, t) => {
|
|
2498
2503
|
const n = await Cn(e), r = await pr(n, t), o = r.streetName ? dr(r.streetName, r.streetNumber || "", r.cityName) : r.address;
|
|
2499
2504
|
return { place: r, address: o };
|
|
2500
|
-
},
|
|
2505
|
+
}, ko = (e, t) => new Promise((n, r) => {
|
|
2501
2506
|
setTimeout(() => {
|
|
2502
2507
|
try {
|
|
2503
2508
|
e && e(), n();
|
|
@@ -2527,7 +2532,7 @@ const pr = async (e, t) => {
|
|
|
2527
2532
|
...o
|
|
2528
2533
|
}).format(e);
|
|
2529
2534
|
};
|
|
2530
|
-
function
|
|
2535
|
+
function Do(e, t = !1) {
|
|
2531
2536
|
return e == null ? "" : st(t ? Math.round(e) : Math.floor(e), 0);
|
|
2532
2537
|
}
|
|
2533
2538
|
function st(e, t) {
|
|
@@ -2540,14 +2545,14 @@ function st(e, t) {
|
|
|
2540
2545
|
}
|
|
2541
2546
|
);
|
|
2542
2547
|
}
|
|
2543
|
-
function
|
|
2548
|
+
function qo(e, t = 2) {
|
|
2544
2549
|
return st(e, t);
|
|
2545
2550
|
}
|
|
2546
|
-
const
|
|
2551
|
+
const jo = {
|
|
2547
2552
|
formatFn: mr,
|
|
2548
2553
|
unFormatFn: hr
|
|
2549
2554
|
};
|
|
2550
|
-
function
|
|
2555
|
+
function Go(e, t, n) {
|
|
2551
2556
|
const r = [].slice.call(document.querySelectorAll(e)), o = new IntersectionObserver(
|
|
2552
2557
|
(i, s) => {
|
|
2553
2558
|
for (let c = 0; c < i.length; c++) {
|
|
@@ -2565,9 +2570,9 @@ function jo(e, t, n) {
|
|
|
2565
2570
|
});
|
|
2566
2571
|
}
|
|
2567
2572
|
let xe = !1;
|
|
2568
|
-
const
|
|
2573
|
+
const zo = (e) => {
|
|
2569
2574
|
document.addEventListener("notification-permission-changed", e);
|
|
2570
|
-
},
|
|
2575
|
+
}, Vo = () => {
|
|
2571
2576
|
!navigator.permissions || !navigator.permissions.query || (!xe && navigator.permissions.query({ name: "notifications" }).then(function(e) {
|
|
2572
2577
|
e.onchange = function() {
|
|
2573
2578
|
document.dispatchEvent(
|
|
@@ -2578,7 +2583,7 @@ const Go = (e) => {
|
|
|
2578
2583
|
};
|
|
2579
2584
|
}), xe = !0);
|
|
2580
2585
|
};
|
|
2581
|
-
function
|
|
2586
|
+
function Ho(e) {
|
|
2582
2587
|
return new Promise(
|
|
2583
2588
|
(t, n) => f.post("/rest/request/addRequestGenericValuation", e, {
|
|
2584
2589
|
headers: { "Content-Type": "application/json", dataType: "json" }
|
|
@@ -2587,15 +2592,15 @@ function Vo(e) {
|
|
|
2587
2592
|
}).catch((r) => n(r))
|
|
2588
2593
|
);
|
|
2589
2594
|
}
|
|
2590
|
-
function
|
|
2595
|
+
function Wo(e, t, n, r, o, i, s) {
|
|
2591
2596
|
let c = "/";
|
|
2592
2597
|
return n && (c += (n == me.AUCTION ? window._auctionLabel : n == me.RENT ? window._rentLabel : window._saleLabel) + "-"), c += `${t}/`, i && (c += `${i}/`), e && (c += `${e.replace(/^-+|-+$/g, "")}/`), r && (c += `${r.replace(/^_+|_+$/g, "")}/`), !r && s && (c += `${s.replace(/^_+|_+$/g, "")}/`), o && (c += `${o.replace(/^_+|_+$/g, "")}/`), c;
|
|
2593
2598
|
}
|
|
2594
|
-
function
|
|
2599
|
+
function Jo(e) {
|
|
2595
2600
|
const t = Object.keys(Ue).map((n) => e[n] ? encodeURIComponent(Ue[n]) + "=" + encodeURIComponent(e[n]) : null).filter((n) => n !== null);
|
|
2596
2601
|
return t.length ? `?${t.join("&")}` : "";
|
|
2597
2602
|
}
|
|
2598
|
-
function
|
|
2603
|
+
function Ko(e) {
|
|
2599
2604
|
const t = Object.keys(le).map((n) => {
|
|
2600
2605
|
if (e[n])
|
|
2601
2606
|
if (Array.isArray(e[n])) {
|
|
@@ -2611,7 +2616,7 @@ function Jo(e) {
|
|
|
2611
2616
|
}).filter((n) => n !== null);
|
|
2612
2617
|
return t.length ? `?${t.join("&")}` : "";
|
|
2613
2618
|
}
|
|
2614
|
-
const
|
|
2619
|
+
const Qo = (e) => {
|
|
2615
2620
|
const t = `${window._baseURL}`;
|
|
2616
2621
|
switch (e) {
|
|
2617
2622
|
case "SAVED_SEARCHES":
|
|
@@ -2622,32 +2627,33 @@ const Ko = (e) => {
|
|
|
2622
2627
|
};
|
|
2623
2628
|
export {
|
|
2624
2629
|
ao as addGenericRequest,
|
|
2625
|
-
|
|
2630
|
+
Vo as addPermissionStateListener,
|
|
2626
2631
|
zr as addUserFavorite,
|
|
2627
2632
|
re as appendQueryString,
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2633
|
+
ko as awaitableSetTimeout,
|
|
2634
|
+
Jo as buildParams,
|
|
2635
|
+
Ko as buildParamsForAgency,
|
|
2636
|
+
Wo as buildURL,
|
|
2632
2637
|
lr as capitalizeFirstLetter,
|
|
2633
2638
|
fr as cleanASCII,
|
|
2634
2639
|
Eo as decodeCookie,
|
|
2635
|
-
|
|
2640
|
+
Fo as decodeTextWithEntities,
|
|
2636
2641
|
et as deepCopy,
|
|
2637
2642
|
qr as deleteAllSaveSearch,
|
|
2638
2643
|
jr as deleteSaveSearch,
|
|
2639
2644
|
Vr as deleteUserFavorite,
|
|
2640
2645
|
Kr as deleteUserFirebaseToken,
|
|
2641
|
-
|
|
2646
|
+
Po as emptyElem,
|
|
2642
2647
|
bo as encodeCookie,
|
|
2643
2648
|
mo as evaluateRealEstateWidget,
|
|
2644
2649
|
dr as formatAddress,
|
|
2645
2650
|
_o as formatCurrency,
|
|
2646
|
-
|
|
2647
|
-
|
|
2651
|
+
So as formatDate,
|
|
2652
|
+
qo as formatFloat,
|
|
2653
|
+
Do as formatInteger,
|
|
2648
2654
|
mr as formatLocaleNumber,
|
|
2649
2655
|
st as formatNumber,
|
|
2650
|
-
|
|
2656
|
+
jo as formatterNumberObj,
|
|
2651
2657
|
br as getAgenciesData,
|
|
2652
2658
|
gr as getAgencyById,
|
|
2653
2659
|
Rr as getCityPolygonJSON,
|
|
@@ -2659,7 +2665,7 @@ export {
|
|
|
2659
2665
|
Dr as getMarketingConsent,
|
|
2660
2666
|
Mr as getMenuInfo,
|
|
2661
2667
|
xr as getPlace,
|
|
2662
|
-
|
|
2668
|
+
Mo as getPlaceFromGAutocomplete,
|
|
2663
2669
|
Er as getPlaceFromPlaceID,
|
|
2664
2670
|
po as getPlaceTrendData,
|
|
2665
2671
|
Ar as getPlacesAddressAutocomplete,
|
|
@@ -2676,26 +2682,26 @@ export {
|
|
|
2676
2682
|
Yr as getSavedSearchesCount,
|
|
2677
2683
|
Dn as getSingleElement,
|
|
2678
2684
|
Or as getTransactionGraphData,
|
|
2679
|
-
|
|
2685
|
+
Qo as getURLPage,
|
|
2680
2686
|
Ir as getZones,
|
|
2681
2687
|
pr as googlePlaceConverter,
|
|
2682
2688
|
Tn as guessPlace,
|
|
2683
2689
|
h as handleAxiosError,
|
|
2684
|
-
|
|
2685
|
-
|
|
2690
|
+
Lo as hashEmail,
|
|
2691
|
+
To as hideElem,
|
|
2686
2692
|
go as isArrNullOrEmpty,
|
|
2687
2693
|
yr as isEmptyObject,
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2694
|
+
$o as isMobile,
|
|
2695
|
+
Oo as isSafari,
|
|
2696
|
+
Ro as isiOSDevice,
|
|
2697
|
+
Go as observeOnce,
|
|
2698
|
+
zo as onNotificationsPermissionChange,
|
|
2693
2699
|
hr as parseLocaleNumber,
|
|
2694
2700
|
wo as redirectToApp,
|
|
2695
2701
|
kn as removeCookie,
|
|
2696
2702
|
Wr as removeFavourites,
|
|
2697
|
-
|
|
2698
|
-
|
|
2703
|
+
Io as replaceAll,
|
|
2704
|
+
Bo as replaceAllTokens,
|
|
2699
2705
|
vo as rgba,
|
|
2700
2706
|
to as saveSearch,
|
|
2701
2707
|
no as saveSearchFromRequest,
|
|
@@ -2703,18 +2709,18 @@ export {
|
|
|
2703
2709
|
wr as sendAgencyContactAsync,
|
|
2704
2710
|
Lr as sendBrochureMR,
|
|
2705
2711
|
Cr as sendBrochureRequest,
|
|
2706
|
-
|
|
2712
|
+
xo as sendGAEvent,
|
|
2707
2713
|
Nr as sendInfoMR,
|
|
2708
2714
|
Pr as sendInfoPremium,
|
|
2709
2715
|
Tr as sendJobApplicationForm,
|
|
2710
2716
|
vr as sendMortgage,
|
|
2711
|
-
|
|
2717
|
+
Ho as sendRequestGeneric,
|
|
2712
2718
|
io as sendSuggestion,
|
|
2713
2719
|
co as sendWidgetRequest,
|
|
2714
2720
|
Sn as shallowCopyObjectTo,
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2721
|
+
Uo as showAddFavoritesIcon,
|
|
2722
|
+
Co as showElem,
|
|
2723
|
+
No as showRemoveFavoritesIcons,
|
|
2718
2724
|
Qr as updateMarketingConsent,
|
|
2719
2725
|
Br as updateNewsletterConsent,
|
|
2720
2726
|
Hr as updateNote,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function formatDate(date: Date, display?: boolean): string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wikicasa-dev/utilities",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Wikicasa frontend utilities",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/utilities.cjs",
|
|
@@ -12,9 +12,6 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"types": "./dist/index.d.ts",
|
|
15
|
-
"files": [
|
|
16
|
-
"dist"
|
|
17
|
-
],
|
|
18
15
|
"repository": {
|
|
19
16
|
"type": "git",
|
|
20
17
|
"url": "git+https://matteocarniglia@bitbucket.org/wikicasa/wikicasa-fe.git"
|
|
@@ -48,7 +45,7 @@
|
|
|
48
45
|
"leaflet-draw": "^1.0.4",
|
|
49
46
|
"leaflet-freedraw": "^2.13.3",
|
|
50
47
|
"uuid": "^9.0.0",
|
|
51
|
-
"@wikicasa-dev/types": "^0.0.
|
|
48
|
+
"@wikicasa-dev/types": "^0.0.10"
|
|
52
49
|
},
|
|
53
50
|
"scripts": {
|
|
54
51
|
"dev": "vite",
|