This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccountGUI/node_modulesOLD/vuetify/lib/services/goto/util.js.map

1 line
2.5 KiB
Text
Raw Permalink Normal View History

2019-08-11 18:48:02 +00:00
{"version":3,"sources":["../../../src/services/goto/util.ts"],"names":[],"mappings":"AAEA;AACA,OAAM,SAAU,SAAV,CAAqB,MAArB,EAAgC;AACpC,MAAI,OAAO,MAAP,KAAkB,QAAtB,EAAgC;AAC9B,WAAO,MAAP;AACD;;AAED,MAAI,EAAE,GAAG,CAAC,CAAC,MAAD,CAAV;;AACA,MAAI,CAAC,EAAL,EAAS;AACP,UAAM,OAAO,MAAP,KAAkB,QAAlB,GACF,IAAI,KAAJ,CAAU,mBAAmB,MAAM,cAAnC,CADE,GAEF,IAAI,SAAJ,CAAc,uEAAuE,IAAI,CAAC,MAAD,CAAQ,WAAjG,CAFJ;AAGD;;AAED,MAAI,WAAW,GAAG,CAAlB;;AACA,SAAO,EAAP,EAAW;AACT,IAAA,WAAW,IAAI,EAAE,CAAC,SAAlB;AACA,IAAA,EAAE,GAAG,EAAE,CAAC,YAAR;AACD;;AAED,SAAO,WAAP;AACD;AAED,OAAM,SAAU,YAAV,CAAwB,SAAxB,EAAsC;AAC1C,QAAM,EAAE,GAAG,CAAC,CAAC,SAAD,CAAZ;AAEA,MAAI,EAAJ,EAAQ,OAAO,EAAP;AAER,QAAM,OAAO,SAAP,KAAqB,QAArB,GACF,IAAI,KAAJ,CAAU,sBAAsB,SAAS,cAAzC,CADE,GAEF,IAAI,SAAJ,CAAc,mEAAmE,IAAI,CAAC,SAAD,CAAW,WAAhG,CAFJ;AAGD;;AAED,SAAS,IAAT,CAAe,EAAf,EAAsB;AACpB,SAAO,EAAE,IAAI,IAAN,GAAa,EAAb,GAAkB,EAAE,CAAC,WAAH,CAAe,IAAxC;AACD;;AAED,SAAS,CAAT,CAAY,EAAZ,EAAmB;AACjB,MAAI,OAAO,EAAP,KAAc,QAAlB,EAA4B;AAC1B,WAAO,QAAQ,CAAC,aAAT,CAAoC,EAApC,CAAP;AACD,GAFD,MAEO,IAAI,EAAE,IAAI,EAAE,CAAC,MAAb,EAAqB;AAC1B,WAAQ,EAAU,CAAC,GAAnB;AACD,GAFM,MAEA,IAAI,EAAE,YAAY,WAAlB,EAA+B;AACpC,WAAO,EAAP;AACD,GAFM,MAEA;AACL,WAAO,IAAP;AACD;AACF","sourcesContent":["import Vue from 'vue'\n\n// Return target's cumulative offset from the top\nexport function getOffset (target: any): number {\n if (typeof target === 'number') {\n return target\n }\n\n let el = $(target)\n if (!el) {\n throw typeof target === 'string'\n ? new Error(`Target element \"${target}\" not found.`)\n : new TypeError(`Target must be a Number/Selector/HTMLElement/VueComponent, received ${type(target)} instead.`)\n }\n\n let totalOffset = 0\n while (el) {\n totalOffset += el.offsetTop\n el = el.offsetParent as HTMLElement\n }\n\n return totalOffset\n}\n\nexport function getContainer (container: any): HTMLElement {\n const el = $(container)\n\n if (el) return el\n\n throw typeof container === 'string'\n ? new Error(`Container element \"${container}\" not found.`)\n : new TypeError(`Container must be a Selector/HTMLElement/VueComponent, received ${type(container)} instead.`)\n}\n\nfunction type (el: any) {\n return el == null ? el : el.constructor.name\n}\n\nfunction $ (el: any): HTMLElement | null {\n if (typeof el === 'string') {\n return document.querySelector<HTMLElement>(el)\n } else if (el && el._isVue) {\n return (el as Vue).$el as HTMLElement\n } else if (el instanceof HTMLElement) {\n return el\n } else {\n return null\n }\n}\n"],"sourceRoot":"","file":"util.js"}