{"version":3,"file":"components.trust-pilot.156f4223098a14830336.js","mappings":"iJAEA,SACEA,KAAM,cACNC,KAAIA,KACK,CACLC,gBAAgB,EAChBC,YAAY,IAGhBC,SAAU,CACRC,uBAAsBA,IACbC,EAAAA,IAGXC,OAAAA,GACEC,KAAKC,sBAAwB,IAC/B,EACAC,OAAAA,GACEF,KAAKG,4BACP,EACAC,aAAAA,GACEJ,KAAKK,6BACP,EACAC,QAAS,CACPC,WAAAA,GACEP,KAAKN,gBAAiB,CACxB,EACAc,wBAAAA,GAAuC,IAAdC,EAAOC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,GACjC,MAAOG,EAAQ,CAAC,GAAKJ,EACrBT,KAAKL,WAAckB,EAAMC,mBAAqBD,EAAME,eAEhDf,KAAKL,YACPK,KAAKK,6BAET,EACAF,0BAAAA,GACEH,KAAKC,sBAAwB,IAAIe,qBAAqBhB,KAAKQ,yBAA0B,CACnFS,UAAW,EACXC,WAAY,sBAEdlB,KAAKC,sBAAsBkB,QAAQnB,KAAKoB,IAC1C,EACAf,2BAAAA,GACML,KAAKC,wBACPD,KAAKC,sBAAsBoB,aAC3BrB,KAAKC,sBAAwB,KAEjC,G","sources":["webpack:///./Onlia/Scripts/onlia/one-onlia/components/trust-pilot.js"],"sourcesContent":["import { TRUST_PILOT } from '@Shared/settings';\r\n\r\nexport default {\r\n name: 'trust-pilot',\r\n data() {\r\n return {\r\n scriptHasError: false,\r\n inViewPort: false\r\n };\r\n },\r\n computed: {\r\n scriptLoaderAttributes() {\r\n return TRUST_PILOT;\r\n }\r\n },\r\n created() {\r\n this._intersectionObserver = null;\r\n },\r\n mounted() {\r\n this.createIntersectionObserver();\r\n },\r\n beforeDestroy() {\r\n this.destroyIntersectionObserver();\r\n },\r\n methods: {\r\n handleError() {\r\n this.scriptHasError = true;\r\n },\r\n handleIntersectionChange(entries = []) {\r\n const [entry = {}] = entries;\r\n this.inViewPort = (entry.intersectionRatio || entry.isIntersecting);\r\n\r\n if (this.inViewPort) {\r\n this.destroyIntersectionObserver();\r\n }\r\n },\r\n createIntersectionObserver() {\r\n this._intersectionObserver = new IntersectionObserver(this.handleIntersectionChange, {\r\n threshold: 0,\r\n rootMargin: '0px 0px 150px 0px'\r\n });\r\n this._intersectionObserver.observe(this.$el);\r\n },\r\n destroyIntersectionObserver() {\r\n if (this._intersectionObserver) {\r\n this._intersectionObserver.disconnect();\r\n this._intersectionObserver = null;\r\n }\r\n }\r\n }\r\n};\r\n"],"names":["name","data","scriptHasError","inViewPort","computed","scriptLoaderAttributes","TRUST_PILOT","created","this","_intersectionObserver","mounted","createIntersectionObserver","beforeDestroy","destroyIntersectionObserver","methods","handleError","handleIntersectionChange","entries","arguments","length","undefined","entry","intersectionRatio","isIntersecting","IntersectionObserver","threshold","rootMargin","observe","$el","disconnect"],"sourceRoot":""}