PageSourceSearch

https://hazketo.com/cdn/shop/t/31/assets/googlemaps-js-api-loader.lib.js?v=103621046827594995431788276935

js hazketo.com collected 2026-09-24 14:01:10 UTC 5,774 bytes, 1 lines download raw bytes

1function e(e,t,i,r){return new(i||(i=Promise))((function(t,s){function o(e){try{a(r.next(e))}catch(e){s(e)}}function n(e){try{a(r.throw(e))}catch(e){s(e)}}function a(e){var r;e.done?t(e.value):(r=e.value,r instanceof i?r:new i((function(e){e(r)}))).then(o,n)}a((r=r.apply(e,[])).next())}))}function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}"function"==typeof SuppressedError&&SuppressedError;var i=t((function e(t,i){if(t===i)return!0;if(t&&i&&"object"==typeof t&&"object"==typeof i){if(t.constructor!==i.constructor)return!1;var r,s,o;if(Array.isArray(t)){if((r=t.length)!=i.length)return!1;for(s=r;0!=s--;)if(!e(t[s],i[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===i.source&&t.flags===i.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===i.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===i.toString();if((r=(o=Object.keys(t)).length)!==Object.keys(i).length)return!1;for(s=r;0!=s--;)if(!Object.prototype.hasOwnProperty.call(i,o[s]))return!1;for(s=r;0!=s--;){var n=o[s];if(!e(t[n],i[n]))return!1}return!0}return t!=t&&i!=i}));const r="__googleMapsScriptId";var s;!function(e){e[e.INITIALIZED=0]="INITIALIZED",e[e.LOADING=1]="LOADING",e[e.SUCCESS=2]="SUCCESS",e[e.FAILURE=3]="FAILURE"}(s||(s={}));class o{constructor({apiKey:e,authReferrerPolicy:t,channel:s,client:n,id:a=r,language:l,libraries:h=[],mapIds:c,nonce:u,region:d,retries:g=3,url:p="https://maps.googleapis.com/maps/api/js",version:f}){if(this.callbacks=[],this.done=!1,this.loading=!1,this.errors=[],this.apiKey=e,this.authReferrerPolicy=t,this.channel=s,this.client=n,this.id=a||r,this.language=l,this.libraries=h,this.mapIds=c,this.nonce=u,this.region=d,this.retries=g,this.url=p,this.version=f,o.instance){if(!i(this.options,o.instance.options))throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(o.instance.options)}`);return o.instance}o.instance=this}get options(){return{version:this.version,apiKey:this.apiKey,channel:this.channel,client:this.client,id:this.id,libraries:this.libraries,language:this.language,region:this.region,mapIds:this.mapIds,nonce:this.nonce,url:this.url,authReferrerPolicy:this.authReferrerPolicy}}get status(){return this.errors.length?s.FAILURE:this.done?s.SUCCESS:this.loading?s.LOADING:s.INITIALIZED}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){let e=this.url;return e+="?callback=__googleMapsCallback&loading=async",this.apiKey&&(e+=`&key=${this.apiKey}`),this.channel&&(e+=`&channel=${this.channel}`),this.client&&(e+=`&client=${this.client}`),this.libraries.length>0&&(e+=`&libraries=${this.libraries.join(",")}`),this.language&&(e+=`&language=${this.language}`),this.region&&(e+=`&region=${this.region}`),this.version&&(e+=`&v=${this.version}`),this.mapIds&&(e+=`&map_ids=${this.mapIds.join(",")}`),this.authReferrerPolicy&&(e+=`&auth_referrer_policy=${this.authReferrerPolicy}`),e}deleteScript(){const e=document.getElementById(this.id);e&&e.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise(((e,t)=>{this.loadCallback((i=>{i?t(i.error):e(window.google)}))}))}importLibrary(e){return this.execute(),google.maps.importLibrary(e)}loadCallback(e){this.callbacks.push(e),this.execute()}setScript(){var t,i;if(document.getElementById(this.id))return void this.callback();const r={key:this.apiKey,channel:this.channel,client:this.client,libraries:this.libraries.length&&this.libraries,v:this.version,mapIds:this.mapIds,language:this.language,region:this.region,authReferrerPolicy:this.authReferrerPolicy};Object.keys(r).forEach((e=>!r[e]&&delete r[e])),(null===(i=null===(t=null===window||void 0===window?void 0:window.google)||void 0===t?void 0:t.maps)||void 0===i?void 0:i.importLibrary)||(t=>{let i,r,s,o="The Google Maps JavaScript API",n="google",a="importLibrary",l="__ib__",h=document,c=window;c=c[n]||(c[n]={});const u=c.maps||(c.maps={}),d=new Set,g=new URLSearchParams,p=()=>i||(i=new Promise(((a,c)=>e(this,0,void 0,(function*(){var e;
1for(s in yield r=h.createElement("script"),r.id=this.id,g.set("libraries",[...d]+""),t)g.set(s.replace(/[A-Z]/g,(e=>"_"+e[0].toLowerCase())),t[s]);g.set("callback",n+".maps."+l),r.src=this.url+"?"+g,u[l]=a,r.onerror=()=>i=c(Error(o+" could not load.")),r.nonce=this.nonce||(null===(e=h.querySelector("script[nonce]"))||void 0===e?void 0:e.nonce)||"",h.head.append(r)})))));u[a]?console.warn(o+" only loads once. Ignoring:",t):u[a]=(e,...t)=>d.add(e)&&p().then((()=>u[a](e,...t)))})(r);const s=this.libraries.map((e=>this.importLibrary(e)));s.length||s.push(this.importLibrary("core")),Promise.all(s).then((()=>this.callback()),(e=>{const t=new ErrorEvent("error",{error:e});this.loadErrorCallback(t)}))}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(e){if(this.errors.push(e),this.errors.length<=this.retries){const e=this.errors.length*Math.pow(2,this.errors.length);console.error(`Failed to load Google Maps script, retrying in ${e} ms.`),setTimeout((()=>{this.deleteScript(),this.setScript()}),e)}else this.onerrorEvent=e,this.callback()}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach((e=>{e(this.onerrorEvent)})),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),!this.loading)if(this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version)return console.warn("Google Maps already loaded outside @googlemaps/js-api-loader. This may result in undesirable behavior as options and script parameters may not match."),void this.callback();this.loading=!0,this.setScript()}}}export{o as Loader};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.