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AC5BA,CACR,ECNAR,EAAoBU,EAAI,SAASN,EAASQ,GACzC,IAAI,IAAIpF,KAAOoF,EACXZ,EAAoBa,EAAED,EAAYpF,KAASwE,EAAoBa,EAAET,EAAS5E,IAC5EsF,OAAOC,eAAeX,EAAS5E,EAAK,CAAEwF,YAAY,EAAMC,IAAKL,EAAWpF,IAG3E,ECPAwE,EAAoBa,EAAI,SAASK,EAAKC,GAAQ,OAAOL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,EAAO,E,oDCMtG,SAAWnG,GACR,IAAMuG,EAAgBvG,EAAE,iBAClBwG,EAAqBxG,EAAE,uBAE7B,SAASyG,IACNzG,EAAE,YAAY0G,YAAY,YAC7B,CAEA1G,EAAEwE,QAAQ9C,GAAG,SAAU+E,GAEvBF,EAAc7E,GAAG,SAAS,WACvB,IAAMiF,EAAS3G,EAAEI,MAAMwG,QAAQ,iBAAiBtC,KAAK,YACrDqC,EAAOE,SAAS,UAEhBC,YAAW,WACRH,EAAOE,SAAS,KACnB,GAAG,GACN,IAEAL,EAAmB9E,GAAG,QAAS+E,EACjC,CApBD,CAoBGxG,O","sources":["webpack://iadecco/./src/js/carousel/index.js","webpack://iadecco/./src/js/contact-form/index.js","webpack://iadecco/./src/js/datepicker/index.js","webpack://iadecco/./src/js/select2-country/index.js","webpack://iadecco/webpack/bootstrap","webpack://iadecco/webpack/runtime/compat get default export","webpack://iadecco/webpack/runtime/define property getters","webpack://iadecco/webpack/runtime/hasOwnProperty shorthand","webpack://iadecco/./src/js/main.js"],"sourcesContent":["(function ($) {\r\n class PageCarousel {\r\n constructor() {\r\n this.initiateCarousel();\r\n console.log('heyy!!!');\r\n }\r\n\r\n initiateCarousel() {\r\n if($('.banner-carousel') && $('.banner-carousel').length) {\r\n $('.banner-carousel').slick({\r\n autoplay: true,\r\n autoplaySpeed: 2000,\r\n slidesToScroll: 1,\r\n prevArrow: $('.btn-banner-prev'),\r\n nextArrow: $('.btn-banner-next'),\r\n });\r\n }\r\n\r\n $('.page-carousel').slick({\r\n autoplay: false,\r\n autoplaySpeed: 2000,\r\n slidesToShow: 3,\r\n slidesToScroll: 1,\r\n prevArrow: $('.btn-prev'),\r\n nextArrow: $('.btn-next'),\r\n responsive: [\r\n {\r\n breakpoint: 576,\r\n settings: {\r\n slidesToScroll: 1,\r\n slidesToShow: 1\r\n }\r\n },\r\n {\r\n breakpoint: 768,\r\n settings: {\r\n slidesToScroll: 1,\r\n slidesToShow: 2\r\n }\r\n }\r\n ]\r\n });\r\n }\r\n }\r\n\r\n new PageCarousel();\r\n})(jQuery);","function emailIsValid(email) {\r\n const regex = /\\S+@\\S+\\.\\S/;\r\n return regex.test(email);\r\n}\r\n\r\nfunction isPhoneNumber(str) {\r\n const regex = /^\\d+$/;\r\n return regex.test(str);\r\n}\r\n\r\n(function ($) {\r\n class ContactForm {\r\n constructor() {\r\n this.initiateContactForm();\r\n }\r\n\r\n initiateContactForm() {\r\n const contactForm = $('#contact_form');\r\n\r\n if (contactForm && contactForm.length) {\r\n contactForm.on('click', '#contact_form_submit', this.validateForm);\r\n }\r\n }\r\n\r\n validateForm(event) {\r\n event.preventDefault();\r\n\r\n const nameContact = $('#name_contact') ? $('#name_contact').val() : '';\r\n const emailContact = $('#email_contact') ? $('#email_contact').val() : '';\r\n const subject = $('#subject') ? $('#subject').val() : '';\r\n const phoneNumber = $('#phone_number') ? $('#phone_number').val() : '';\r\n const message = $('#messageInput') ? $('#messageInput').val() : '';\r\n\r\n // const emailValid = this.emailIsValid(emailContact);\r\n\r\n // console.log(emailValid);\r\n\r\n const validationMessages = [];\r\n\r\n if (nameContact.length === 0) {\r\n validationMessages.push('Please enter a valid name.');\r\n }\r\n\r\n if (emailContact.length === 0 || !emailIsValid(emailContact)) {\r\n validationMessages.push('Please enter a email address.');\r\n }\r\n\r\n if (subject.length === 0) {\r\n validationMessages.push('Please enter a subject.');\r\n }\r\n\r\n if (phoneNumber.length === 0 || !isPhoneNumber(phoneNumber)) {\r\n validationMessages.push('Please enter a phone number in digits only.');\r\n }\r\n\r\n if (phoneNumber.length < 10) {\r\n validationMessages.push('Phone number must equal or more than 10 digits.');\r\n }\r\n\r\n if (message.length === 0) {\r\n validationMessages.push('Please enter a message.');\r\n }\r\n\r\n if (validationMessages.length === 0) {\r\n $('#contact_form').submit();\r\n } else {\r\n const parentMessage = $('#validation-message-container');\r\n parentMessage.html('');\r\n\r\n validationMessages.forEach((message, index) => {\r\n $('
').appendTo(parentMessage);\r\n });\r\n }\r\n }\r\n\r\n }\r\n\r\n class QuickContactForm {\r\n constructor() {\r\n this.initiateQuickContactForm();\r\n }\r\n\r\n initiateQuickContactForm() {\r\n const quickForm = $('#quickMessageForm');\r\n\r\n if (quickForm && quickForm.length) {\r\n quickForm.validate({\r\n rules: {\r\n quick_name: {\r\n required: true,\r\n minlength: 3\r\n },\r\n quick_email: {\r\n required: true,\r\n email: true\r\n },\r\n quick_message: {\r\n required: true,\r\n minlength: 10\r\n },\r\n },\r\n submitHandler: function (form) {\r\n form.submit();\r\n }\r\n });\r\n }\r\n }\r\n\r\n }\r\n\r\n new ContactForm();\r\n new QuickContactForm();\r\n})(jQuery);","(function ($) {\r\n class DatePickerIADECCO {\r\n constructor() {\r\n this.initiateDatePicker();\r\n }\r\n \r\n initiateDatePicker() {\r\n if($('.iadecco_datepicker') && $('.iadecco_datepicker').length) {\r\n $('.iadecco_datepicker').datepicker({dateFormat: 'yy-mm-dd'});\r\n }\r\n \r\n }\r\n }\r\n \r\n new DatePickerIADECCO();\r\n })(jQuery);","(function ($) {\r\n\r\n\r\n class Select2OCD {\r\n constructor() {\r\n this.initiateSelect();\r\n }\r\n\r\n initiateSelect() {\r\n if ($('#langState') && $('#langState').length) {\r\n // var options = [\r\n // { id: 'US', text: 'EN' },\r\n // { id: 'ID', text: 'ID' }\r\n // ]\r\n\r\n $('#langState').select2({\r\n placeholder: '-Select Language-',\r\n templateResult: this.formatState,\r\n // data: options,\r\n templateSelection: this.formatState,\r\n // minimumResultsForSearch: Infinity,\r\n width: '80px'\r\n });\r\n\r\n // console.log($('#langState').find(':selected').data('url'));\r\n\r\n $('#langState').on('select2:select', function (event) {\r\n var url = $('#langState').find(':selected').data('url');\r\n\r\n window.location.href = url;\r\n\r\n // console.log(event);\r\n // if (event?.params?.data) {\r\n // if (event.params.data.id?.toLowerCase() === 'us') {\r\n // window.location.href = 'http://localhost/iadecco/';\r\n // return false;\r\n // }\r\n\r\n // window.location.href = 'http://localhost/iadecco/' + event.params.data.id?.toLowerCase();\r\n // }\r\n\r\n });\r\n }\r\n }\r\n\r\n formatState(state) {\r\n if (!state.id) {\r\n return state.text;\r\n }\r\n\r\n var $country = $('' + state.text + '');\r\n\r\n return $country;\r\n }\r\n\r\n\r\n\r\n formatStateSelection(state) {\r\n if (!state.id) {\r\n return state.text;\r\n }\r\n\r\n var $country = $('');\r\n\r\n return $country;\r\n }\r\n }\r\n\r\n new Select2OCD();\r\n})(jQuery);","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","import \"../sass/main.scss\";\r\nimport \"./carousel\";\r\nimport \"./datepicker\";\r\nimport \"./contact-form\";\r\nimport \"./select2-country\";\r\n\r\n(function ($) {\r\n const buttonToggler = $('.menu-toggler');\r\n const buttonCloseToggler = $('.navlist__btn-close');\r\n\r\n function removeTogglerMenu() {\r\n $('.navlist').removeClass('active in');\r\n }\r\n\r\n $(window).on('resize', removeTogglerMenu);\r\n\r\n buttonToggler.on('click', function () {\r\n const target = $(this).closest('.header__main').find('.navlist');\r\n target.addClass('active');\r\n\r\n setTimeout(function () {\r\n target.addClass('in');\r\n }, 20);\r\n });\r\n\r\n buttonCloseToggler.on('click', removeTogglerMenu);\r\n})(jQuery);"],"names":["$","jQuery","PageCarousel","_classCallCheck","this","initiateCarousel","console","log","key","value","length","slick","autoplay","autoplaySpeed","slidesToScroll","prevArrow","nextArrow","slidesToShow","responsive","breakpoint","settings","ContactForm","QuickContactForm","initiateContactForm","_createClass","contactForm","on","validateForm","event","preventDefault","nameContact","val","emailContact","subject","phoneNumber","message","validationMessages","push","test","submit","parentMessage","html","forEach","index","appendTo","initiateQuickContactForm","quickForm","validate","rules","quick_name","required","minlength","quick_email","email","quick_message","submitHandler","form","DatePickerIADECCO","initiateDatePicker","datepicker","dateFormat","Select2OCD","initiateSelect","select2","placeholder","templateResult","formatState","templateSelection","width","url","find","data","window","location","href","state","id","toLowerCase","text","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","__webpack_modules__","n","getter","__esModule","d","a","definition","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","buttonToggler","buttonCloseToggler","removeTogglerMenu","removeClass","target","closest","addClass","setTimeout"],"sourceRoot":""}