mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
1 line
7.2 KiB
JSON
1 line
7.2 KiB
JSON
{"ast":null,"code":"import _asyncToGenerator from \"C:/Users/eudes.inacio/GabineteDigital/gabinete-digital-fo/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";\n/**\n * When hardwareBackButton: false in config,\n * we need to make sure we also block the default\n * webview behavior. If we don't then it will be\n * possible for users to navigate backward while\n * an overlay is still open. Additionally, it will\n * give the appearance that the hardwareBackButton\n * config is not working as the page transition\n * will still happen.\n */\nconst blockHardwareBackButton = () => {\n document.addEventListener('backbutton', () => {}); // tslint:disable-line\n};\n\nconst startHardwareBackButton = () => {\n const doc = document;\n let busy = false;\n doc.addEventListener('backbutton', () => {\n if (busy) {\n return;\n }\n let index = 0;\n let handlers = [];\n const ev = new CustomEvent('ionBackButton', {\n bubbles: false,\n detail: {\n register(priority, handler) {\n handlers.push({\n priority,\n handler,\n id: index++\n });\n }\n }\n });\n doc.dispatchEvent(ev);\n const executeAction = /*#__PURE__*/function () {\n var _ref = _asyncToGenerator(function* (handlerRegister) {\n try {\n if (handlerRegister && handlerRegister.handler) {\n const result = handlerRegister.handler(processHandlers);\n if (result != null) {\n yield result;\n }\n }\n } catch (e) {\n console.error(e);\n }\n });\n return function executeAction(_x) {\n return _ref.apply(this, arguments);\n };\n }();\n const processHandlers = () => {\n if (handlers.length > 0) {\n let selectedHandler = {\n priority: Number.MIN_SAFE_INTEGER,\n handler: () => undefined,\n id: -1\n };\n handlers.forEach(handler => {\n if (handler.priority >= selectedHandler.priority) {\n selectedHandler = handler;\n }\n });\n busy = true;\n handlers = handlers.filter(handler => handler.id !== selectedHandler.id);\n executeAction(selectedHandler).then(() => busy = false);\n }\n };\n processHandlers();\n });\n};\nconst OVERLAY_BACK_BUTTON_PRIORITY = 100;\nconst MENU_BACK_BUTTON_PRIORITY = 99; // 1 less than overlay priority since menu is displayed behind overlays\n\nexport { MENU_BACK_BUTTON_PRIORITY, OVERLAY_BACK_BUTTON_PRIORITY, blockHardwareBackButton, startHardwareBackButton };","map":{"version":3,"names":["blockHardwareBackButton","document","addEventListener","startHardwareBackButton","doc","busy","index","handlers","ev","CustomEvent","bubbles","detail","register","priority","handler","push","id","dispatchEvent","executeAction","_ref","_asyncToGenerator","handlerRegister","result","processHandlers","e","console","error","_x","apply","arguments","length","selectedHandler","Number","MIN_SAFE_INTEGER","undefined","forEach","filter","then","OVERLAY_BACK_BUTTON_PRIORITY","MENU_BACK_BUTTON_PRIORITY"],"sources":["C:/Users/eudes.inacio/GabineteDigital/gabinete-digital-fo/node_modules/@ionic/core/dist/esm/hardware-back-button-4a6b37fb.js"],"sourcesContent":["/**\n * When hardwareBackButton: false in config,\n * we need to make sure we also block the default\n * webview behavior. If we don't then it will be\n * possible for users to navigate backward while\n * an overlay is still open. Additionally, it will\n * give the appearance that the hardwareBackButton\n * config is not working as the page transition\n * will still happen.\n */\nconst blockHardwareBackButton = () => {\n document.addEventListener('backbutton', () => { }); // tslint:disable-line\n};\nconst startHardwareBackButton = () => {\n const doc = document;\n let busy = false;\n doc.addEventListener('backbutton', () => {\n if (busy) {\n return;\n }\n let index = 0;\n let handlers = [];\n const ev = new CustomEvent('ionBackButton', {\n bubbles: false,\n detail: {\n register(priority, handler) {\n handlers.push({ priority, handler, id: index++ });\n }\n }\n });\n doc.dispatchEvent(ev);\n const executeAction = async (handlerRegister) => {\n try {\n if (handlerRegister && handlerRegister.handler) {\n const result = handlerRegister.handler(processHandlers);\n if (result != null) {\n await result;\n }\n }\n }\n catch (e) {\n console.error(e);\n }\n };\n const processHandlers = () => {\n if (handlers.length > 0) {\n let selectedHandler = {\n priority: Number.MIN_SAFE_INTEGER,\n handler: () => undefined,\n id: -1\n };\n handlers.forEach(handler => {\n if (handler.priority >= selectedHandler.priority) {\n selectedHandler = handler;\n }\n });\n busy = true;\n handlers = handlers.filter(handler => handler.id !== selectedHandler.id);\n executeAction(selectedHandler).then(() => busy = false);\n }\n };\n processHandlers();\n });\n};\nconst OVERLAY_BACK_BUTTON_PRIORITY = 100;\nconst MENU_BACK_BUTTON_PRIORITY = 99; // 1 less than overlay priority since menu is displayed behind overlays\n\nexport { MENU_BACK_BUTTON_PRIORITY, OVERLAY_BACK_BUTTON_PRIORITY, blockHardwareBackButton, startHardwareBackButton };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMA,uBAAuB,GAAGA,CAAA,KAAM;EACpCC,QAAQ,CAACC,gBAAgB,CAAC,YAAY,EAAE,MAAM,CAAE,CAAC,CAAC,CAAC,CAAC;AACtD,CAAC;;AACD,MAAMC,uBAAuB,GAAGA,CAAA,KAAM;EACpC,MAAMC,GAAG,GAAGH,QAAQ;EACpB,IAAII,IAAI,GAAG,KAAK;EAChBD,GAAG,CAACF,gBAAgB,CAAC,YAAY,EAAE,MAAM;IACvC,IAAIG,IAAI,EAAE;MACR;IACF;IACA,IAAIC,KAAK,GAAG,CAAC;IACb,IAAIC,QAAQ,GAAG,EAAE;IACjB,MAAMC,EAAE,GAAG,IAAIC,WAAW,CAAC,eAAe,EAAE;MAC1CC,OAAO,EAAE,KAAK;MACdC,MAAM,EAAE;QACNC,QAAQA,CAACC,QAAQ,EAAEC,OAAO,EAAE;UAC1BP,QAAQ,CAACQ,IAAI,CAAC;YAAEF,QAAQ;YAAEC,OAAO;YAAEE,EAAE,EAAEV,KAAK;UAAG,CAAC,CAAC;QACnD;MACF;IACF,CAAC,CAAC;IACFF,GAAG,CAACa,aAAa,CAACT,EAAE,CAAC;IACrB,MAAMU,aAAa;MAAA,IAAAC,IAAA,GAAAC,iBAAA,CAAG,WAAOC,eAAe,EAAK;QAC/C,IAAI;UACF,IAAIA,eAAe,IAAIA,eAAe,CAACP,OAAO,EAAE;YAC9C,MAAMQ,MAAM,GAAGD,eAAe,CAACP,OAAO,CAACS,eAAe,CAAC;YACvD,IAAID,MAAM,IAAI,IAAI,EAAE;cAClB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