{"version":3,"file":"/js/blocks/feature-carousel/script.js","mappings":"m2CAEAA,SACEC,iBACA,oBACA,WAECD,SACEE,iBAAiB,4BACjBC,SACA,SAACC,GAEA,IAAMC,EAAU,CACfC,KAAM,WACNC,QAAQ,EACRC,QAAS,EACTC,IAAK,IAGAC,EAAc,IAAIC,EAAAA,EACvBP,EAASQ,cAAc,8BAA6BC,EAAA,GAEhDR,IAGHS,QAEIC,EAAa,IAAIJ,EAAAA,EACtBP,EAASQ,cAAc,6BAA4BC,EAAAA,EAAA,GAE/CR,GAAO,IACVW,kBAAmB,KAMnBF,QAEFJ,EAAYO,GACX,OACA,SAACC,GACAH,EAAWI,GAAGD,EAAEE,UACjB,IAGDL,EAAWE,GACV,OACA,SAACC,GACAR,EAAYS,GAAGD,EAAEE,UAClB,GAGF,GAGH,G","sources":["webpack://wp-plugin-cirrus-blocks/./blocks/feature-carousel/script.js"],"sourcesContent":["import Glide from '@glidejs/glide'\n\ndocument\n\t.addEventListener(\n\t\t\"DOMContentLoaded\",\n\t\t() => {\n\n\t\t\tdocument\n\t\t\t\t.querySelectorAll(\".cirrus-feature-carousel\")\n\t\t\t\t.forEach(\n\t\t\t\t\t(carousel) => {\n\n\t\t\t\t\t\tconst options = {\n\t\t\t\t\t\t\ttype: \"carousel\",\n\t\t\t\t\t\t\trewind: false,\n\t\t\t\t\t\t\tperView: 1,\n\t\t\t\t\t\t\tgap: 20,\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst imageSlider = new Glide(\n\t\t\t\t\t\t\tcarousel.querySelector('[data-name=\"image-slider\"]'),\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t...options,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t)\n\t\t\t\t\t\t\t.mount()\n\n\t\t\t\t\t\tconst textSlider = new Glide(\n\t\t\t\t\t\t\tcarousel.querySelector('[data-name=\"text-slider\"]'),\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t...options,\n\t\t\t\t\t\t\t\tanimationDuration: 0,\n\t\t\t\t\t\t\t\t// classes: {\n\t\t\t\t\t\t\t\t// \tactiveSlide: 'glide__slide--active animate__animated animate__fadeIn',\n\t\t\t\t\t\t\t\t// },\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t)\n\t\t\t\t\t\t\t.mount()\n\n\t\t\t\t\t\timageSlider.on(\n\t\t\t\t\t\t\t'run',\n\t\t\t\t\t\t\t(e) => {\n\t\t\t\t\t\t\t\ttextSlider.go(e.direction)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\ttextSlider.on(\n\t\t\t\t\t\t\t'run',\n\t\t\t\t\t\t\t(e) => {\n\t\t\t\t\t\t\t\timageSlider.go(e.direction)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t}\n\t);"],"names":["document","addEventListener","querySelectorAll","forEach","carousel","options","type","rewind","perView","gap","imageSlider","Glide","querySelector","_objectSpread","mount","textSlider","animationDuration","on","e","go","direction"],"sourceRoot":""}