1 line
8.5 KiB
JSON
1 line
8.5 KiB
JSON
{"ast":null,"code":"/*!\n * (C) Ionic http://ionicframework.com - MIT License\n */\nconst HapticEngine = {\n getEngine() {\n var _a;\n\n const win = window;\n return win.TapticEngine || ((_a = win.Capacitor) === null || _a === void 0 ? void 0 : _a.isPluginAvailable('Haptics')) && win.Capacitor.Plugins.Haptics;\n },\n\n available() {\n return !!this.getEngine();\n },\n\n isCordova() {\n return !!window.TapticEngine;\n },\n\n isCapacitor() {\n const win = window;\n return !!win.Capacitor;\n },\n\n impact(options) {\n const engine = this.getEngine();\n\n if (!engine) {\n return;\n }\n\n const style = this.isCapacitor() ? options.style.toUpperCase() : options.style;\n engine.impact({\n style\n });\n },\n\n notification(options) {\n const engine = this.getEngine();\n\n if (!engine) {\n return;\n }\n\n const style = this.isCapacitor() ? options.style.toUpperCase() : options.style;\n engine.notification({\n style\n });\n },\n\n selection() {\n this.impact({\n style: 'light'\n });\n },\n\n selectionStart() {\n const engine = this.getEngine();\n\n if (!engine) {\n return;\n }\n\n if (this.isCapacitor()) {\n engine.selectionStart();\n } else {\n engine.gestureSelectionStart();\n }\n },\n\n selectionChanged() {\n const engine = this.getEngine();\n\n if (!engine) {\n return;\n }\n\n if (this.isCapacitor()) {\n engine.selectionChanged();\n } else {\n engine.gestureSelectionChanged();\n }\n },\n\n selectionEnd() {\n const engine = this.getEngine();\n\n if (!engine) {\n return;\n }\n\n if (this.isCapacitor()) {\n engine.selectionEnd();\n } else {\n engine.gestureSelectionEnd();\n }\n }\n\n};\n/**\n * Trigger a selection changed haptic event. Good for one-time events\n * (not for gestures)\n */\n\nconst hapticSelection = () => {\n HapticEngine.selection();\n};\n/**\n * Tell the haptic engine that a gesture for a selection change is starting.\n */\n\n\nconst hapticSelectionStart = () => {\n HapticEngine.selectionStart();\n};\n/**\n * Tell the haptic engine that a selection changed during a gesture.\n */\n\n\nconst hapticSelectionChanged = () => {\n HapticEngine.selectionChanged();\n};\n/**\n * Tell the haptic engine we are done with a gesture. This needs to be\n * called lest resources are not properly recycled.\n */\n\n\nconst hapticSelectionEnd = () => {\n HapticEngine.selectionEnd();\n};\n/**\n * Use this to indicate success/failure/warning to the user.\n * options should be of the type `{ style: 'light' }` (or `medium`/`heavy`)\n */\n\n\nconst hapticImpact = options => {\n HapticEngine.impact(options);\n};\n\nexport { hapticSelectionStart as a, hapticSelectionChanged as b, hapticSelection as c, hapticImpact as d, hapticSelectionEnd as h };","map":{"version":3,"names":["HapticEngine","getEngine","_a","win","window","TapticEngine","Capacitor","isPluginAvailable","Plugins","Haptics","available","isCordova","isCapacitor","impact","options","engine","style","toUpperCase","notification","selection","selectionStart","gestureSelectionStart","selectionChanged","gestureSelectionChanged","selectionEnd","gestureSelectionEnd","hapticSelection","hapticSelectionStart","hapticSelectionChanged","hapticSelectionEnd","hapticImpact","a","b","c","d","h"],"sources":["D:/MobileDev/WRB/WrenchBoard2023a/node_modules/@ionic/core/dist/esm/haptic-683b3b3c.js"],"sourcesContent":["/*!\n * (C) Ionic http://ionicframework.com - MIT License\n */\nconst HapticEngine = {\n getEngine() {\n var _a;\n const win = window;\n return win.TapticEngine || (((_a = win.Capacitor) === null || _a === void 0 ? void 0 : _a.isPluginAvailable('Haptics')) && win.Capacitor.Plugins.Haptics);\n },\n available() {\n return !!this.getEngine();\n },\n isCordova() {\n return !!window.TapticEngine;\n },\n isCapacitor() {\n const win = window;\n return !!win.Capacitor;\n },\n impact(options) {\n const engine = this.getEngine();\n if (!engine) {\n return;\n }\n const style = this.isCapacitor() ? options.style.toUpperCase() : options.style;\n engine.impact({ style });\n },\n notification(options) {\n const engine = this.getEngine();\n if (!engine) {\n return;\n }\n const style = this.isCapacitor() ? options.style.toUpperCase() : options.style;\n engine.notification({ style });\n },\n selection() {\n this.impact({ style: 'light' });\n },\n selectionStart() {\n const engine = this.getEngine();\n if (!engine) {\n return;\n }\n if (this.isCapacitor()) {\n engine.selectionStart();\n }\n else {\n engine.gestureSelectionStart();\n }\n },\n selectionChanged() {\n const engine = this.getEngine();\n if (!engine) {\n return;\n }\n if (this.isCapacitor()) {\n engine.selectionChanged();\n }\n else {\n engine.gestureSelectionChanged();\n }\n },\n selectionEnd() {\n const engine = this.getEngine();\n if (!engine) {\n return;\n }\n if (this.isCapacitor()) {\n engine.selectionEnd();\n }\n else {\n engine.gestureSelectionEnd();\n }\n },\n};\n/**\n * Trigger a selection changed haptic event. Good for one-time events\n * (not for gestures)\n */\nconst hapticSelection = () => {\n HapticEngine.selection();\n};\n/**\n * Tell the haptic engine that a gesture for a selection change is starting.\n */\nconst hapticSelectionStart = () => {\n HapticEngine.selectionStart();\n};\n/**\n * Tell the haptic engine that a selection changed during a gesture.\n */\nconst hapticSelectionChanged = () => {\n HapticEngine.selectionChanged();\n};\n/**\n * Tell the haptic engine we are done with a gesture. This needs to be\n * called lest resources are not properly recycled.\n */\nconst hapticSelectionEnd = () => {\n HapticEngine.selectionEnd();\n};\n/**\n * Use this to indicate success/failure/warning to the user.\n * options should be of the type `{ style: 'light' }` (or `medium`/`heavy`)\n */\nconst hapticImpact = (options) => {\n HapticEngine.impact(options);\n};\n\nexport { hapticSelectionStart as a, hapticSelectionChanged as b, hapticSelection as c, hapticImpact as d, hapticSelectionEnd as h };\n"],"mappings":"AAAA;AACA;AACA;AACA,MAAMA,YAAY,GAAG;EACnBC,SAAS,GAAG;IACV,IAAIC,EAAJ;;IACA,MAAMC,GAAG,GAAGC,MAAZ;IACA,OAAOD,GAAG,CAACE,YAAJ,IAAqB,CAAC,CAACH,EAAE,GAAGC,GAAG,CAACG,SAAV,MAAyB,IAAzB,IAAiCJ,EAAE,KAAK,KAAK,CAA7C,GAAiD,KAAK,CAAtD,GAA0DA,EAAE,CAACK,iBAAH,CAAqB,SAArB,CAA3D,KAA+FJ,GAAG,CAACG,SAAJ,CAAcE,OAAd,CAAsBC,OAAjJ;EACD,CALkB;;EAMnBC,SAAS,GAAG;IACV,OAAO,CAAC,CAAC,KAAKT,SAAL,EAAT;EACD,CARkB;;EASnB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