PageSourceSearch

https://www.marhabaservices.com/on/demandware.static/Sites-dnata-U…/v1790215282271/js/app/global/LoadMore.js

js marhabaservices.com collected 2026-09-24 23:14:15 UTC 9,217 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkapp_dnata=self.webpackChunkapp_dnata||[]).push([[5922],{17110:function(t,e,r){r.d(e,{R:function(){return j}});var n=r(4008),o=r(5036),i=r(7471);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function u(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||c(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t,e){if(t){if("string"==typeof t)return l(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(t,e):void 0}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var f={},s={},y={OK:200,VALIDATION_ERROR:400,AUTHENTIFICATION_ERROR:401,INTERNAL_ERROR:500};function d(t){var e={};if(t instanceof Headers){var r,n=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=c(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(t.entries());try{for(n.s();!(r=n.n()).done;){var o=u(r.value,2),i=o[0],a=o[1];e[i]=a}}catch(t){n.e(t)}finally{n.f()}}else e=t;return e}function p(t,e){return t+JSON.stringify(e)}function b(t,e){var r=p(t,e);delete s[r]}function h(t){var e=t.errorMessage,r=new Error(e);throw r.errorMessage=e,r.data=t,r}function v(t){if(t.ok)return t;var e=t.statusText,r=t.status;if(y.AUTHENTIFICATION_ERROR,r===y.VALIDATION_ERROR)return t.json().then(h);"5"==="".concat(r).charAt(0)&&function(t){var e=t.headers.get("content-type");e&&e.includes("application/json")&&t.json().then(function(t){n.Event.emit("globalMessage.show",{type:"error",content:t.errorMessage})})}(t);var o=new Error(e);throw o.errorMessage=e,o.response=t,o.status=r,o}function m(t){var e=t.headers.get("content-type");if(e){if(e.includes("application/json"))return t.json();if(e.includes("text/html"))return t.text()}return t}function g(t){if("object"===a(t)&&!1===t.success)throw t;return t}function w(t){return"object"===a(t)&&t.redirectUrl&&(window.location.href=t.redirectUrl),t}function j(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.headers=Object.assign({},d(e.headers),f),e.method=e.method||"GET",e.credentials="same-origin",e.body&&"object"===a(e.body))if(e.body instanceof HTMLElement){var r=new i.A(e.body);e.body=r.getSerializedData()}else e.body=o.d.serialize(e.body);var n=function(t,e){var r=p(t,e);return s[r]}(t,e);if(n)return n;var u=new URL(t,document.location.origin);u.searchParams.append("ajax","true");var c=fetch(u.toString(),e).then(v).then(m).then(w).then(g).then(function(r){return b(t,e),r}).catch(function(r){return b(t,e),Promise.reject(r)});return function(t,e,r){var n=p(t,e);s[n]=r}(t,e,c),c}},7471:function(t,e,r){r.d(e,{A:function(){return u}});var n=r(5036);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,a(n.key),n)}}function a(t){var e=function(t,e){if("object"!=o(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}
1(t,"string");return"symbol"==o(e)?e:e+""}var u=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.form=e,this.ignoredFields=/^(?:button|image|reset|file)$/i},e=[{key:"getFields",value:function(){return this.form.elements}},{key:"getData",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e={};t||(t=this.getFields());for(var r=0;r<t.length;r++){var n=t[r];if(!n.disabled&&n.name&&!this.ignoredFields.test(n.type)&&("radio"!==n.type||n.checked)){var o=n.name,i=n.value;"checkbox"===n.type&&(i=n.checked),e[o]=i}}return e}},{key:"getSerializedData",value:function(){var t=this.getData();return n.d.serialize(t)}}],r=[{key:"submitHiddenForm",value:function(t){var e=document.createElement("form");for(var r in e.style.display="none",e.id="hiddenForm",e.setAttribute("method","POST"),e.setAttribute("action",t.url),t.params)if(t.params.hasOwnProperty(r)){var n=document.createElement("input");n.setAttribute("type","hidden"),n.setAttribute("name",r),n.setAttribute("value",t.params[r]),e.appendChild(n)}document.body.append(e),e.submit()}}],e&&i(t.prototype,e),r&&i(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}()},5036:function(t,e,r){r.d(e,{d:function(){return n}});var n={serialize:function(t){var e=[];for(var r in t){var n=encodeURIComponent(r)+"="+encodeURIComponent(t[r]);e.push(n)}return 0!==e.length?e.join("&"):""}}},16228:function(t,e,r){r.r(e),r.d(e,{default:function(){return d}});var n=r(70491),o=r(17110),i=r(20058);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function u(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,c(n.key),n)}}function c(t){var e=function(t,e){if("object"!=a(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==a(e)?e:e+""}function l(t,e,r){return e=s(e),function(t,e){if(e&&("object"==a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,f()?Reflect.construct(e,r||[],s(t).constructor):e.apply(t,r))}function f(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(f=function(){return!!t})()}
1function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},s(t)}function y(t,e){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},y(t,e)}var d=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),l(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&y(t,e)}(e,t),r=e,(n=[{key:"initCache",value:function(){this.selectors.loadMoreBlock=this.element.querySelector(".js-loadmore-block"),this.selectors.loadMoreBlock&&(this.selectors.loadMoreLink=this.selectors.loadMoreBlock.querySelector(".js-loadmore-link"),this.state.loadMoreUrl=this.selectors.loadMoreLink.href)}},{key:"bindEvents",value:function(){(0,i.on)("list:update",this.element,this.listUpdateAction.bind(this)),this.loadMoreLinkEvent()}},{key:"loadMoreLinkEvent",value:function(){this.selectors.loadMoreBlock&&(0,i.on)("click",this.selectors.loadMoreLink,this.loadMoreAction.bind(this))}},{key:"listUpdateAction",value:function(){this.initCache(),this.loadMoreLinkEvent()}},{key:"loadMoreAction",value:function(t){var e=this;t.preventDefault(),(0,o.R)(this.state.loadMoreUrl).then(function(t){e.selectors.loadMoreBlock.remove(),e.element.innerHTML+=t,history.replaceState({},null,e.state.loadMoreUrl),e.listUpdateAction()})}}])&&u(r.prototype,n),a&&u(r,a),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,a}(n.A)}}]);

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.