Files
supplier-dispatch-h5/node_modules/.cache/babel-loader/4d25cf790bee9325677c3cf414111acc7869d1b93e4379e6cd5b897f9ca10ef6.json
2023-08-11 10:45:20 +08:00

1 line
4.0 KiB
JSON

{"ast":null,"code":"import { isServer } from '..';\n// eslint-disable-next-line import/no-mutable-exports\nexport var supportsPassive = false;\nif (!isServer) {\n try {\n var opts = {};\n Object.defineProperty(opts, 'passive', {\n // eslint-disable-next-line getter-return\n get: function get() {\n /* istanbul ignore next */\n supportsPassive = true;\n }\n });\n window.addEventListener('test-passive', null, opts); // eslint-disable-next-line no-empty\n } catch (e) {}\n}\nexport function on(target, event, handler, passive) {\n if (passive === void 0) {\n passive = false;\n }\n if (!isServer) {\n target.addEventListener(event, handler, supportsPassive ? {\n capture: false,\n passive: passive\n } : false);\n }\n}\nexport function off(target, event, handler) {\n if (!isServer) {\n target.removeEventListener(event, handler);\n }\n}\nexport function stopPropagation(event) {\n event.stopPropagation();\n}\nexport function preventDefault(event, isStopPropagation) {\n /* istanbul ignore else */\n if (typeof event.cancelable !== 'boolean' || event.cancelable) {\n event.preventDefault();\n }\n if (isStopPropagation) {\n stopPropagation(event);\n }\n}","map":{"version":3,"names":["isServer","supportsPassive","opts","Object","defineProperty","get","window","addEventListener","e","on","target","event","handler","passive","capture","off","removeEventListener","stopPropagation","preventDefault","isStopPropagation","cancelable"],"sources":["C:/Users/zhouxueli/Desktop/scheduling-app/node_modules/vant/es/utils/dom/event.js"],"sourcesContent":["import { isServer } from '..';\n// eslint-disable-next-line import/no-mutable-exports\nexport var supportsPassive = false;\n\nif (!isServer) {\n try {\n var opts = {};\n Object.defineProperty(opts, 'passive', {\n // eslint-disable-next-line getter-return\n get: function get() {\n /* istanbul ignore next */\n supportsPassive = true;\n }\n });\n window.addEventListener('test-passive', null, opts); // eslint-disable-next-line no-empty\n } catch (e) {}\n}\n\nexport function on(target, event, handler, passive) {\n if (passive === void 0) {\n passive = false;\n }\n\n if (!isServer) {\n target.addEventListener(event, handler, supportsPassive ? {\n capture: false,\n passive: passive\n } : false);\n }\n}\nexport function off(target, event, handler) {\n if (!isServer) {\n target.removeEventListener(event, handler);\n }\n}\nexport function stopPropagation(event) {\n event.stopPropagation();\n}\nexport function preventDefault(event, isStopPropagation) {\n /* istanbul ignore else */\n if (typeof event.cancelable !== 'boolean' || event.cancelable) {\n event.preventDefault();\n }\n\n if (isStopPropagation) {\n stopPropagation(event);\n }\n}"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,IAAI;AAC7B;AACA,OAAO,IAAIC,eAAe,GAAG,KAAK;AAElC,IAAI,CAACD,QAAQ,EAAE;EACb,IAAI;IACF,IAAIE,IAAI,GAAG,CAAC,CAAC;IACbC,MAAM,CAACC,cAAc,CAACF,IAAI,EAAE,SAAS,EAAE;MACrC;MACAG,GAAG,EAAE,SAASA,GAAGA,CAAA,EAAG;QAClB;QACAJ,eAAe,GAAG,IAAI;MACxB;IACF,CAAC,CAAC;IACFK,MAAM,CAACC,gBAAgB,CAAC,cAAc,EAAE,IAAI,EAAEL,IAAI,CAAC,CAAC,CAAC;EACvD,CAAC,CAAC,OAAOM,CAAC,EAAE,CAAC;AACf;AAEA,OAAO,SAASC,EAAEA,CAACC,MAAM,EAAEC,KAAK,EAAEC,OAAO,EAAEC,OAAO,EAAE;EAClD,IAAIA,OAAO,KAAK,KAAK,CAAC,EAAE;IACtBA,OAAO,GAAG,KAAK;EACjB;EAEA,IAAI,CAACb,QAAQ,EAAE;IACbU,MAAM,CAACH,gBAAgB,CAACI,KAAK,EAAEC,OAAO,EAAEX,eAAe,GAAG;MACxDa,OAAO,EAAE,KAAK;MACdD,OAAO,EAAEA;IACX,CAAC,GAAG,KAAK,CAAC;EACZ;AACF;AACA,OAAO,SAASE,GAAGA,CAACL,MAAM,EAAEC,KAAK,EAAEC,OAAO,EAAE;EAC1C,IAAI,CAACZ,QAAQ,EAAE;IACbU,MAAM,CAACM,mBAAmB,CAACL,KAAK,EAAEC,OAAO,CAAC;EAC5C;AACF;AACA,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