PageSourceSearch

https://g-fittings.shop/theme/803ab9860c25598b685e9ec56d2a1b53/js/…/gfit-eori-number.js?1791551246

js g-fittings.shop collected 2026-10-09 17:44:24 UTC 12,088 bytes, 3 lines download raw bytes

1(()=>{"use strict";var e={156:e=>{var t=function(e){var t;return!!e&&"object"==typeof e&&"[object RegExp]"!==(t=Object.prototype.toString.call(e))&&"[object Date]"!==t&&e.$$typeof!==r},r="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function i(e,t){return!1!==t.clone&&t.isMergeableObject(e)?a(Array.isArray(e)?[]:{},e,t):e}function n(e,t,r){return e.concat(t).map(function(e){return i(e,r)})}function s(e){return Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[])}function o(e,t){try{return t in e}catch(e){return!1}}function a(e,r,l){(l=l||{}).arrayMerge=l.arrayMerge||n,l.isMergeableObject=l.isMergeableObject||t,l.cloneUnlessOtherwiseSpecified=i;var u,c,d=Array.isArray(r);return d!==Array.isArray(e)?i(r,l):d?l.arrayMerge(e,r,l):(c={},(u=l).isMergeableObject(e)&&s(e).forEach(function(t){c[t]=i(e[t],u)}),s(r).forEach(function(t){(!o(e,t)||Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))&&(o(e,t)&&u.isMergeableObject(r[t])?c[t]=(function(e,t){if(!t.customMerge)return a;var r=t.customMerge(e);return"function"==typeof r?r:a})(t,u)(e[t],r[t],u):c[t]=i(r[t],u))}),c)}a.all=function(e,t){if(!Array.isArray(e))throw Error("first argument should be an array");return e.reduce(function(e,r){return a(e,r,t)},{})},e.exports=a},707:(e,t,r)=>{r.d(t,{A:()=>i});class i{static ucFirst(e){return e.charAt(0).toUpperCase()+e.slice(1)}static lcFirst(e){return e.charAt(0).toLowerCase()+e.slice(1)}static toDashCase(e){return e.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase()}static toLowerCamelCase(e,t){let r=i.toUpperCamelCase(e,t);return i.lcFirst(r)}static toUpperCamelCase(e,t){return t?e.split(t).map(e=>i.ucFirst(e.toLowerCase())).join(""):i.ucFirst(e.toLowerCase())}static parsePrimitive(e){try{return/^\d+(.|,)\d+$/.test(e)&&(e=e.replace(",",".")),JSON.parse(e)}catch(t){return e.toString()}}}},737:(e,t,r)=>{r.d(t,{A:()=>a});var i=r(156),n=r.n(i),s=r(707);class o{constructor(e=document){this._el=e,e.$emitter=this,this._listeners=[]}publish(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=new CustomEvent(e,{detail:t,cancelable:r});return this.el.dispatchEvent(i),i}subscribe(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this,n=e.split("."),s=r.scope?t.bind(r.scope):t;if(r.once&&!0===r.once){let t=s;s=function(r){i.unsubscribe(e),t(r)}}return this.el.addEventListener(n[0],s),this.listeners.push({splitEventName:n,opts:r,cb:s}),!0}unsubscribe(e){let t=e.split(".");return this.listeners=this.listeners.reduce((e,r)=>([...r.splitEventName].sort().toString()===t.sort().toString()?this.el.removeEventListener(r.splitEventName[0],r.cb):e.push(r),e),[]),!0}reset(){return this.listeners.forEach(e=>{this.el.removeEventListener(e.splitEventName[0],e.cb)}),this.listeners=[],!0}get el(){return this._el}set el(e){this._el=e}get listeners(){return this._listeners}set listeners(e){this._listeners=e}}class a{constructor(e,t={},r=!1){if(!(e instanceof Node)){console.warn(`There is no valid element given while trying to create a plugin instance for "${r}".`);return}this.el=e,this.$emitter=new o(this.el),this._pluginName=this._getPluginName(r),this.options=this._mergeOptions(t),this._initialized=!1,this._registerInstance(),this._init()}init(){console.warn(`The "init" method for the plugin "${this._pluginName}" is not defined. The plugin will not be initialized.`)}update(){}_init(){this._initialized||(this.init(),this._initialized=!0)}_update(){this._initialized&&this.update()}_mergeOptions(e){let t=[this.constructor.options,this.options,e];return t.push(this._getConfigFromDataAttribute()),t.push(this._getOptionsFromDataAttribute()),n().all(t.filter(e=>e instanceof Object&&!(e instanceof Array)).map(e=>e||{}))}_getConfigFromDataAttribute(){let e={};if("function"!=typeof this.el.getAttribute)return e;let t=s.A.toDashCase(this._pluginName),r=this.el.getAttribute(`data-${t}-config`);return r?window.PluginConfigManager.get(this._pluginName,r):e}_getOptionsFromDataAttribute(){let e={};if("function"!=typeof this.el.getAttribute)return e;let t=s.A.toDashCase(this._pluginName),r=this.el.getAttribute(`data-${t}-options`);if(r)try{return JSON.parse(r)}catch(e){console.error(`The data attribute "data-${t}-options" could not be parsed to json: ${e.message}`)}return e}_registerInstance(){window.PluginManager.getPluginInstancesFromElement(this.el).set(this._pluginName,this),window.PluginManager.getPlugin(this._pluginName,!1).get("instances").push(this)}_getPluginName(e){return e||(e=this.constructor.name),e}}}},t={};function r(i){var n=t[i];if(void 0!==n)return n.exports;var s=t[i]={exports:{}};return e[i](s,s.exports,r),s.exports}r.m=e,r.n=e=>
1{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var i in t)r.o(t,i)&&!r.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((t,i)=>(r.f[i](e,t),t),[])),r.u=e=>"./js/gfit-eori-number/gfit-eori-number.form-field-toggle.plugin.67e009.js",r.miniCssF=e=>{},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={};r.l=(t,i,n,s)=>{if(e[t]){e[t].push(i);return}if(void 0!==n)for(var o,a,l=document.getElementsByTagName("script"),u=0;u<l.length;u++){var c=l[u];if(c.getAttribute("src")==t){o=c;break}}o||(a=!0,(o=document.createElement("script")).charset="utf-8",o.timeout=120,r.nc&&o.setAttribute("nonce",r.nc),o.src=t),e[t]=[i];var d=(r,i)=>{o.onerror=o.onload=null,clearTimeout(p);var n=e[t];if(delete e[t],o.parentNode&&o.parentNode.removeChild(o),n&&n.forEach(e=>e(i)),r)return r(i)},p=setTimeout(d.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=d.bind(null,o.onerror),o.onload=d.bind(null,o.onload),a&&document.head.appendChild(o)}})(),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{r.g.importScripts&&(e=r.g.location+"");var e,t=r.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var i=t.getElementsByTagName("script");if(i.length)for(var n=i.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=i[n--].src}if(!e)throw Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e+"../../"})(),(()=>{var e={91395:0};r.f.j=(t,i)=>{var n=r.o(e,t)?e[t]:void 0;if(0!==n){if(n)i.push(n[2]);else{var s=new Promise((r,i)=>n=e[t]=[r,i]);i.push(n[2]=s);var o=r.p+r.u(t),a=Error();r.l(o,i=>{if(r.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var s=i&&("load"===i.type?"missing":i.type),o=i&&i.target&&i.target.src;a.message="Loading chunk "+t+" failed.\n("+s+": "+o+")",a.name="ChunkLoadError",a.type=s,a.request=o,n[1](a)}},"chunk-"+t,t)}}};var t=(t,i)=>{var n,s,[o,a,l]=i,u=0;if(o.some(t=>0!==e[t])){for(n in a)r.o(a,n)&&(r.m[n]=a[n]);l&&l(r)}for(t&&t(i);u<o.length;u++)s=o[u],r.o(e,s)&&e[s]&&e[s][0](),e[s]=0},i=self.webpackChunk=self.webpackChunk||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})();var i=r(737);class n{constructor(){this._request=null,this._errorHandlingInternal=!1}get(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"application/json",i=this._createPreparedRequest("GET",e,r);return this._sendRequest(i,null,t)}post(e,t,r){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";i=this._getContentType(t,i);let n=this._createPreparedRequest("POST",e,i);return this._sendRequest(n,t,r)}delete(e,t,r){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";i=this._getContentType(t,i);let n=this._createPreparedRequest("DELETE",e,i);return this._sendRequest(n,t,r)}patch(e,t,r){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";i=this._getContentType(t,i);let n=this._createPreparedRequest("PATCH",e,i);return this._sendRequest(n,t,r)}
1abort(){if(this._request)return this._request.abort()}setErrorHandlingInternal(e){this._errorHandlingInternal=e}_registerOnLoaded(e,t){t&&(!0===this._errorHandlingInternal?(e.addEventListener("load",()=>{t(e.responseText,e)}),e.addEventListener("abort",()=>{console.warn(`the request to ${e.responseURL} was aborted`)}),e.addEventListener("error",()=>{console.warn(`the request to ${e.responseURL} failed with status ${e.status}`)}),e.addEventListener("timeout",()=>{console.warn(`the request to ${e.responseURL} timed out`)})):e.addEventListener("loadend",()=>{t(e.responseText,e)}))}_sendRequest(e,t,r){return this._registerOnLoaded(e,r),e.send(t),e}_getContentType(e,t){return e instanceof FormData&&(t=!1),t}_createPreparedRequest(e,t,r){return this._request=new XMLHttpRequest,this._request.open(e,t),this._request.setRequestHeader("X-Requested-With","XMLHttpRequest"),r&&this._request.setRequestHeader("Content-type",r),this._request}}let s="loader",o={BEFORE:"before",INNER:"inner"};class a{constructor(e,t=o.BEFORE){this.parent=e instanceof Element?e:document.body.querySelector(e),this.position=t}create(){if(!this.exists()){if(this.position===o.INNER){this._previousHTML=this.parent.innerHTML,this.parent.innerHTML=a.getTemplate();return}this.parent.insertAdjacentHTML(this._getPosition(),a.getTemplate())}}remove(){if(this.position===o.INNER){this.parent.innerHTML=this._previousHTML;return}this.parent.querySelectorAll(`.${s}`).forEach(e=>e.remove())}exists(){return this.parent.querySelectorAll(`.${s}`).length>0}_getPosition(){return this.position===o.BEFORE?"afterbegin":"beforeend"}static getTemplate(){return`<div class="${s}" role="status">
2                    <span class="visually-hidden">Loading...</span>
3                </div>`}static SELECTOR_CLASS(){return s}}class l extends i.A{static #e=this.options={countryIds:[],eoriCheckUrl:null};init(){let e;let t=this,r=new n,i=this.el,s=this.el.parentNode.querySelector(".invalid-eori-number"),o=this.el.parentNode.querySelector(".gfit-loading-indicator"),l=this.el.closest(".form-group"),u=this.el.closest("form"),c=u.querySelector('button[type="submit"]');if(!c){let e=this.el.closest(".address-manager-modal");e&&(c=e.querySelector('button[type="submit"]'))}if(!c)return;let d=c.disabled,p=this.el.closest(".country-and-state-form-elements").querySelector('[name$="[countryId]"]'),h=null,g=!0,f=!1,m=null;function b(){let e=t.el.value;if(e!==m){g=!1;let i=new URL(t.options.eoriCheckUrl);i.searchParams.append("eori-number",e),r.get(i.toString(),t=>{m=e,g=JSON.parse(t).valid,f=!1,_(),l.classList.add("was-validated"),v()},"application/json")}else f=!1,_(),v()}function v(){let e=p.options[p.selectedIndex].value;t.options.countryIds&&t.options.countryIds.includes(e)?(l.style.display="initial",i.classList.add("gfit-should-be-required"),i.required=!0,i.removeAttribute("disabled")):(l.style.display="none",i.classList.remove("gfit-should-be-required"),i.required=!1,i.setAttribute("disabled","disabled"),t.el.value=null),g||f?(s.style.display="none",i.classList.contains("is-invalid")&&i.classList.remove("is-invalid")):(s.style.display="initial",i.classList.contains("is-invalid")||i.classList.add("is-invalid")),g?c.disabled=d:c.disabled=!0}function y(){h||(h=new a(o)).create()}function _(){h&&(h.remove(),h=null)}p.addEventListener("change",v),i.addEventListener("input",function(){if(0===t.el.value.length){g=!0,v();return}e&&(clearTimeout(e),e=null),f=!0,y(),v(),e=setTimeout(b,250)}),i.addEventListener("blur",function(){if(0===t.el.value.length){g=!0,v();return}e&&(clearTimeout(e),e=null),f=!0,y(),v(),b()}),u.addEventListener("submit",function(e){(!g||f)&&e.preventDefault()}),v()}}window.PluginManager.register("GfitEoriNumberPlugin",l,"[data-gfit-eori-number-plugin]"),window.PluginManager.override("FormFieldToggle",()=>r.e(84940).then(r.bind(r,940)),"[data-form-field-toggle]")})();

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.