Kargi-Sitesi/.angular/cache/18.2.11/babel-webpack/0e80ccee0b54976a2737feda3e283bade2d1c49ce5a5504b729203394a8fa1e8.json

1 line
No EOL
7.9 KiB
JSON

{"ast":null,"code":"import { Observable } from '../Observable';\nimport { isArray } from '../util/isArray';\nimport { isFunction } from '../util/isFunction';\nimport { map } from '../operators/map';\nconst toString = (() => Object.prototype.toString)();\nexport function fromEvent(target, eventName, options, resultSelector) {\n if (isFunction(options)) {\n resultSelector = options;\n options = undefined;\n }\n if (resultSelector) {\n return fromEvent(target, eventName, options).pipe(map(args => isArray(args) ? resultSelector(...args) : resultSelector(args)));\n }\n return new Observable(subscriber => {\n function handler(e) {\n if (arguments.length > 1) {\n subscriber.next(Array.prototype.slice.call(arguments));\n } else {\n subscriber.next(e);\n }\n }\n setupSubscription(target, eventName, handler, subscriber, options);\n });\n}\nfunction setupSubscription(sourceObj, eventName, handler, subscriber, options) {\n let unsubscribe;\n if (isEventTarget(sourceObj)) {\n const source = sourceObj;\n sourceObj.addEventListener(eventName, handler, options);\n unsubscribe = () => source.removeEventListener(eventName, handler, options);\n } else if (isJQueryStyleEventEmitter(sourceObj)) {\n const source = sourceObj;\n sourceObj.on(eventName, handler);\n unsubscribe = () => source.off(eventName, handler);\n } else if (isNodeStyleEventEmitter(sourceObj)) {\n const source = sourceObj;\n sourceObj.addListener(eventName, handler);\n unsubscribe = () => source.removeListener(eventName, handler);\n } else if (sourceObj && sourceObj.length) {\n for (let i = 0, len = sourceObj.length; i < len; i++) {\n setupSubscription(sourceObj[i], eventName, handler, subscriber, options);\n }\n } else {\n throw new TypeError('Invalid event target');\n }\n subscriber.add(unsubscribe);\n}\nfunction isNodeStyleEventEmitter(sourceObj) {\n return sourceObj && typeof sourceObj.addListener === 'function' && typeof sourceObj.removeListener === 'function';\n}\nfunction isJQueryStyleEventEmitter(sourceObj) {\n return sourceObj && typeof sourceObj.on === 'function' && typeof sourceObj.off === 'function';\n}\nfunction isEventTarget(sourceObj) {\n return sourceObj && typeof sourceObj.addEventListener === 'function' && typeof sourceObj.removeEventListener === 'function';\n}","map":{"version":3,"names":["Observable","isArray","isFunction","map","toString","Object","prototype","fromEvent","target","eventName","options","resultSelector","undefined","pipe","args","subscriber","handler","e","arguments","length","next","Array","slice","call","setupSubscription","sourceObj","unsubscribe","isEventTarget","source","addEventListener","removeEventListener","isJQueryStyleEventEmitter","on","off","isNodeStyleEventEmitter","addListener","removeListener","i","len","TypeError","add"],"sources":["/home/arctichawk1/Desktop/Projects/Public/Kargi-Sitesi/node_modules/rxjs/_esm2015/internal/observable/fromEvent.js"],"sourcesContent":["import { Observable } from '../Observable';\nimport { isArray } from '../util/isArray';\nimport { isFunction } from '../util/isFunction';\nimport { map } from '../operators/map';\nconst toString = (() => Object.prototype.toString)();\nexport function fromEvent(target, eventName, options, resultSelector) {\n if (isFunction(options)) {\n resultSelector = options;\n options = undefined;\n }\n if (resultSelector) {\n return fromEvent(target, eventName, options).pipe(map(args => isArray(args) ? resultSelector(...args) : resultSelector(args)));\n }\n return new Observable(subscriber => {\n function handler(e) {\n if (arguments.length > 1) {\n subscriber.next(Array.prototype.slice.call(arguments));\n }\n else {\n subscriber.next(e);\n }\n }\n setupSubscription(target, eventName, handler, subscriber, options);\n });\n}\nfunction setupSubscription(sourceObj, eventName, handler, subscriber, options) {\n let unsubscribe;\n if (isEventTarget(sourceObj)) {\n const source = sourceObj;\n sourceObj.addEventListener(eventName, handler, options);\n unsubscribe = () => source.removeEventListener(eventName, handler, options);\n }\n else if (isJQueryStyleEventEmitter(sourceObj)) {\n const source = sourceObj;\n sourceObj.on(eventName, handler);\n unsubscribe = () => source.off(eventName, handler);\n }\n else if (isNodeStyleEventEmitter(sourceObj)) {\n const source = sourceObj;\n sourceObj.addListener(eventName, handler);\n unsubscribe = () => source.removeListener(eventName, handler);\n }\n else if (sourceObj && sourceObj.length) {\n for (let i = 0, len = sourceObj.length; i < len; i++) {\n setupSubscription(sourceObj[i], eventName, handler, subscriber, options);\n }\n }\n else {\n throw new TypeError('Invalid event target');\n }\n subscriber.add(unsubscribe);\n}\nfunction isNodeStyleEventEmitter(sourceObj) {\n return sourceObj && typeof sourceObj.addListener === 'function' && typeof sourceObj.removeListener === 'function';\n}\nfunction isJQueryStyleEventEmitter(sourceObj) {\n return sourceObj && typeof sourceObj.on === 'function' && typeof sourceObj.off === 'function';\n}\nfunction isEventTarget(sourceObj) {\n return sourceObj && typeof sourceObj.addEventListener === 'function' && typeof sourceObj.removeEventListener === 'function';\n}\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,eAAe;AAC1C,SAASC,OAAO,QAAQ,iBAAiB;AACzC,SAASC,UAAU,QAAQ,oBAAoB;AAC/C,SAASC,GAAG,QAAQ,kBAAkB;AACtC,MAAMC,QAAQ,GAAG,CAAC,MAAMC,MAAM,CAACC,SAAS,CAACF,QAAQ,EAAE,CAAC;AACpD,OAAO,SAASG,SAASA,CAACC,MAAM,EAAEC,SAAS,EAAEC,OAAO,EAAEC,cAAc,EAAE;EAClE,IAAIT,UAAU,CAACQ,OAAO,CAAC,EAAE;IACrBC,cAAc,GAAGD,OAAO;IACxBA,OAAO,GAAGE,SAAS;EACvB;EACA,IAAID,cAAc,EAAE;IAChB,OAAOJ,SAAS,CAACC,MAAM,EAAEC,SAAS,EAAEC,OAAO,CAAC,CAACG,IAAI,CAACV,GAAG,CAACW,IAAI,IAAIb,OAAO,CAACa,IAAI,CAAC,GAAGH,cAAc,CAAC,GAAGG,IAAI,CAAC,GAAGH,cAAc,CAACG,IAAI,CAAC,CAAC,CAAC;EAClI;EACA,OAAO,IAAId,UAAU,CAACe,UAAU,IAAI;IAChC,SAASC,OAAOA,CAACC,CAAC,EAAE;MAChB,IAAIC,SAAS,CAACC,MAAM,GAAG,CAAC,EAAE;QACtBJ,UAAU,CAACK,IAAI,CAACC,KAAK,CAACf,SAAS,CAACgB,KAAK,CAACC,IAAI,CAACL,SAAS,CAAC,CAAC;MAC1D,CAAC,MACI;QACDH,UAAU,CAACK,IAAI,C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