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e;AACf;AACA,oBAAoB,sBAAsB;AAC1C;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;UCfA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;UAEA;UACA;;;;;WCzBA;WACA;WACA;WACA;WACA,+BAA+B,wCAAwC;WACvE;WACA;WACA;WACA;WACA,iBAAiB,qBAAqB;WACtC;WACA;WACA,kBAAkB,qBAAqB;WACvC;WACA;WACA,KAAK;WACL;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;WC3BA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM,qBAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;;;;;UEjDA;UACA;UACA;UACA;UACA","sources":["webpack:///./modales/src/edit.js","webpack:///./modales/src/index.js","webpack:///./modales/src/save.js","webpack:///./modales/src/script.js","webpack:///./modales/src/editor.css?1096","webpack:///./modales/src/style.css?4bc5","webpack:///external window [\"wp\",\"blockEditor\"]","webpack:///external window [\"wp\",\"blocks\"]","webpack:///external window [\"wp\",\"components\"]","webpack:///external window [\"wp\",\"element\"]","webpack:///external window [\"wp\",\"i18n\"]","webpack:///./node_modules/@babel/runtime/helpers/esm/extends.js","webpack:///webpack/bootstrap","webpack:///webpack/runtime/chunk loaded","webpack:///webpack/runtime/compat get default export","webpack:///webpack/runtime/define property getters","webpack:///webpack/runtime/hasOwnProperty shorthand","webpack:///webpack/runtime/make namespace object","webpack:///webpack/runtime/jsonp chunk loading","webpack:///webpack/before-startup","webpack:///webpack/startup","webpack:///webpack/after-startup"],"sourcesContent":["import { __ } from '@wordpress/i18n';\r\nimport { useBlockProps, InnerBlocks, InspectorControls } from '@wordpress/block-editor';\r\nimport{Panel, PanelBody, PanelRow, TextControl, FormToggle} from \"@wordpress/components\"\r\nimport { useEffect} from \"@wordpress/element\";\r\n\r\nexport default function Edit(props){\r\n const { attributes, setAttributes, clientId} = props;\r\n const { blockId, pageLoad, timeToLoad, classRelated } = attributes;\r\n \r\n return(\r\n <> \r\n \r\n \r\n \r\n setAttributes({\r\n timeToLoad: newTimeToLoad,\r\n })}\r\n min={1}\r\n />\r\n setAttributes({\r\n classRelated: NewClassRelated,\r\n })}\r\n />\r\n Nota: para mejor funcionamiento del popup anclarlo con su clase respectiva y agregarlos al final de todos los bloques\r\n \r\n \r\n \r\n
\r\n Contenido de modal\r\n \r\n
\r\n \r\n \r\n )\r\n}\r\n\r\n","import {registerBlockType} from \"@wordpress/blocks\";\r\n\r\nimport meta from \"../block.json\";\r\nimport Edit from \"./edit\";\r\nimport save from \"./save\";\r\n\r\nimport \"./editor.css\";\r\nimport \"./style.css\";\r\nimport \"./script\";\r\n\r\nregisterBlockType(meta, {\r\n edit: Edit,\r\n save: save\r\n});\r\n\r\n","import { __ } from '@wordpress/i18n';\r\nimport { InnerBlocks } from '@wordpress/block-editor';\r\n\r\n\r\nexport default function save(props){\r\n\r\n const { attributes} = props;\r\n const { blockId, pageLoad, timeToLoad, classRelated } = attributes;\r\n\r\n return(\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n );\r\n\r\n \r\n}\r\n\r\n","\nconst modalDatos =(getModals)=>{\n\n getModals.forEach(modal =>{\n const getTriggerClass = modal.dataset.set;\n const getTriggerTime = modal.dataset.auto\n\n if(getTriggerClass != ''){\n\n const allModalTriggers = document.querySelectorAll(`.${getTriggerClass}`);\n letShowModals(allModalTriggers, modal);\n \n }\n\n if(getTriggerTime != ''){\n modalSetTime(getTriggerTime, modal)\n }\n \n })\n\n}\n\nconst letShowModals = (allModalTriggers, modal) =>{\n\n allModalTriggers.forEach(trigger =>{\n\n trigger.addEventListener('click', event =>{\n modal.classList.add('has-show-modal');\n })\n })\n\n}\n\n\nconst modalSetTime = (getTriggerTime, modal)=>{\n let getConfirmation = localStorage.getItem(\"motalWasTrigged\");\n \n if(getConfirmation == null){\n\n let modalIsTrigged = true;\n localStorage.setItem('motalWasTrigged', modalIsTrigged);\n \n setTimeout(() => {\n modal.classList.add('has-show-modal');\n }, getTriggerTime)\n }\n}\n\n\n\nconst closeModal =(getModals)=>{\n const getClosers = document.querySelectorAll('.dashicons-no-alt');\n console.log(getModals);\n \n getClosers.forEach(closer =>{\n closer.addEventListener('click', event=>{\n \n getModals.forEach(modal =>{\n \n if(modal.classList.contains('has-show-modal')){\n modal.classList.remove('has-show-modal');\n }\n\n })\n \n })\n })\n}\n\n\nwindow.addEventListener('load', (event) => {\n\n const getModals = document.querySelectorAll('.modal-contents');\n modalDatos(getModals);\n closeModal(getModals);\n\n});\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","module.exports = window[\"wp\"][\"blockEditor\"];","module.exports = window[\"wp\"][\"blocks\"];","module.exports = window[\"wp\"][\"components\"];","module.exports = window[\"wp\"][\"element\"];","module.exports = window[\"wp\"][\"i18n\"];","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n return _extends.apply(this, arguments);\n}","// 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// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (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 = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t\"index\": 0,\n\t\"./style-index\": 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = globalThis[\"webpackChunk\"] = globalThis[\"webpackChunk\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [\"./style-index\"], () => (__webpack_require__(\"./modales/src/index.js\")))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n",""],"names":["__","useBlockProps","InnerBlocks","InspectorControls","Panel","PanelBody","PanelRow","TextControl","FormToggle","useEffect","Edit","props","attributes","setAttributes","clientId","blockId","pageLoad","timeToLoad","classRelated","newTimeToLoad","NewClassRelated","registerBlockType","meta","save","edit","modalDatos","getModals","forEach","modal","getTriggerClass","dataset","set","getTriggerTime","auto","allModalTriggers","document","querySelectorAll","letShowModals","modalSetTime","trigger","addEventListener","event","classList","add","getConfirmation","localStorage","getItem","modalIsTrigged","setItem","setTimeout","closeModal","getClosers","console","log","closer","contains","remove","window"],"sourceRoot":""}