pushfeedback 0.1.33 → 0.1.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/cjs/feedback-button_2.cjs.entry.js +8238 -1
  2. package/dist/cjs/index-d64bfb06.js +1547 -1
  3. package/dist/cjs/index.cjs.js +2 -1
  4. package/dist/cjs/loader.cjs.js +22 -1
  5. package/dist/cjs/pushfeedback.cjs.js +23 -1
  6. package/dist/collection/components/feedback-button/feedback-button.js +620 -1
  7. package/dist/collection/components/feedback-modal/feedback-modal.css +29 -4
  8. package/dist/collection/components/feedback-modal/feedback-modal.js +814 -1
  9. package/dist/collection/index.js +1 -1
  10. package/dist/components/feedback-button.js +160 -1
  11. package/dist/components/feedback-modal.js +6 -1
  12. package/dist/components/feedback-modal2.js +8183 -1
  13. package/dist/components/index.js +3 -1
  14. package/dist/esm/feedback-button_2.entry.js +8233 -1
  15. package/dist/esm/index-b07fba3a.js +1519 -1
  16. package/dist/esm/index.js +1 -0
  17. package/dist/esm/loader.js +18 -1
  18. package/dist/esm/polyfills/core-js.js +11 -1
  19. package/dist/esm/polyfills/css-shim.js +1 -1
  20. package/dist/esm/polyfills/dom.js +79 -1
  21. package/dist/esm/polyfills/es5-html-element.js +1 -1
  22. package/dist/esm/polyfills/index.js +34 -1
  23. package/dist/esm/polyfills/system.js +6 -1
  24. package/dist/esm/pushfeedback.js +18 -1
  25. package/dist/index.cjs.js +1 -1
  26. package/dist/index.js +1 -1
  27. package/dist/pushfeedback/p-a0681be3.js +2 -1
  28. package/dist/pushfeedback/p-ea59cbec.entry.js +22 -0
  29. package/dist/pushfeedback/pushfeedback.css +1 -1
  30. package/dist/pushfeedback/pushfeedback.esm.js +1 -1
  31. package/dist/types/components/feedback-button/feedback-button.d.ts +2 -0
  32. package/dist/types/components/feedback-modal/feedback-modal.d.ts +2 -0
  33. package/dist/types/components.d.ts +8 -0
  34. package/package.json +5 -4
  35. package/dist/pushfeedback/p-8cae1eb0.entry.js +0 -1
@@ -1 +1,814 @@
1
- const _0x16809a=_0x2ed4;(function(_0x1f07da,_0x83b041){const _0x337f42=_0x2ed4,_0x873ed=_0x1f07da();while(!![]){try{const _0x99f153=parseInt(_0x337f42(0x1ca))/0x1+-parseInt(_0x337f42(0xc9))/0x2*(parseInt(_0x337f42(0xc3))/0x3)+-parseInt(_0x337f42(0x11f))/0x4+-parseInt(_0x337f42(0x15c))/0x5*(parseInt(_0x337f42(0x196))/0x6)+parseInt(_0x337f42(0x149))/0x7+-parseInt(_0x337f42(0x12e))/0x8+-parseInt(_0x337f42(0x11d))/0x9*(-parseInt(_0x337f42(0x9c))/0xa);if(_0x99f153===_0x83b041)break;else _0x873ed['push'](_0x873ed['shift']());}catch(_0x26c097){_0x873ed['push'](_0x873ed['shift']());}}}(_0x36d9,0x46a55));function _0x2ed4(_0x41e97b,_0x3c7ab6){const _0x36d94a=_0x36d9();return _0x2ed4=function(_0x2ed475,_0x5ca624){_0x2ed475=_0x2ed475-0x93;let _0xe2d5f5=_0x36d94a[_0x2ed475];return _0xe2d5f5;},_0x2ed4(_0x41e97b,_0x3c7ab6);}import{h}from'@stencil/core';function _0x36d9(){const _0x134e75=['backgroundColor','feedback-modal-header','handleEmailInput','OIyKB','aZFrs','shadow','screenshot-topbar-text','vExvj','feedback-modal-screenshot-open--scroll','feedback-modal-close','body','messagePlaceholder','modal-position','kfvoX','Powered\x20by\x20','openScreenShot','lfbrC','states','PbLdw','top','feedback-overlay','svg','removeEventListener','showScreenshotTopBar','Email\x20address\x20(optional)','width','JmcwT','render','handleSubmit','QguRA','rehcS','gXICW','We\x20could\x20not\x20find\x20the\x20provided\x20project\x20ID\x20in\x20PushFeedback.','ZVPeB','success-message','div','cZPjv','AElmR','TrQjC','error-message','jXIBN','rWguO','email','errorMessage404','rating-placeholder','576420yhYQkl','sItED','GwLKl','rSxNG','XXrFB','modal-title-error','leftSide','GlhUv','Add\x20a\x20screenshot','HvnDL','bYQMn','feedback-modal-content\x20feedback-modal-content--','Select\x20an\x20element\x20on\x20this\x20page','encapsulation','span','none','\x27Comments\x27','formEmail','rrwCf','\x27Thanks\x20for\x20your\x20feedback!\x27','modalContent','https://app.pushfeedback.com/api/feedback/','feedback-modal-wrapper','hide-email','RHesi','selectedRating','formSuccess','hasSelectedElement','originalStyleUrls','feedback-modal-buttons\x20','form','140SQsSko','UxiPD','email-address','elementFromPoint','rgba(0,\x200,\x200,\x200.4)','M680-80v-120H560v-80h120v-120h80v120h120v80H760v120h-80ZM200-200v-200h80v120h120v80H200Zm0-360v-200h200v80H280v120h-80Zm480\x200v-120H560v-80h200v200h-80Z','imjkA','preventDefault','log','emailAddress','round','qVgVy','target','fetchProjectData','input','CiLkT','resetOverflow','componentWillLoad','avIDI','FFOLH','screenshotTopbarText','jDHSB','Dipzb','vQnqD','jgqos','uIPMO','transparent','OSDae','feedback-modal-message','PWXar','formError','DwPoz','feedback-modal-rating-button\x20','line','DRnvb','right-side','documentElement','TePUi','nbyWa','1200474XEcaGp','feedback-modal-screenshot-element-selected','addEventListener','feedback-modal-body','feedback-modal-screenshot','PXlet','2YkDSVP','rgCzN','\x22I\x20have\x20read\x20and\x20expressly\x20consent\x20to\x20the\x20terms\x20of\x20the\x20<a\x20href=\x27https://pushfeedback.com/privacy\x27>Privacy\x20Policy</a>.\x22','formErrorStatus','ratingPlaceholder','feedback-modal-privacy','hidePrivacyPolicy','removeChild','onScrollDebounced','show-screenshot-top-bar','iZHUk','feedback-modal-button\x20feedback-modal-button--screenshot\x20','scrollTimeout','\x22We\x20could\x20not\x20find\x20the\x20provided\x20project\x20ID\x20in\x20PushFeedback.\x22','left-side','drdqc','screenshotModal','error','feedback-modal','12\x202\x2015.09\x208.26\x2022\x209.27\x2017\x2014.14\x2018.18\x2021.02\x2012\x2017.77\x205.82\x2021.02\x207\x2014.14\x202\x209.27\x208.91\x208.26\x2012\x202','dRGyh','project','showScreenshotMode','handleMouseOverScreenShot','How\x20would\x20you\x20rate\x20this\x20page?','vBUwR','vWiqX','\x27Email\x20address\x20(optional)\x27','mJybq','feedback-modal-screenshot-header','hide-screenshot-button','boolean','ZlBQH','errorMessage','sending','show-screenshot-mode','has-selected-element','UCzam','iUkWv','location','Share\x20your\x20feedback','isPrivacyChecked','\x22Please\x20try\x20again\x20later.\x22','GmIiI','screenshotButtonText','style','closeScreenShot','rightSide','HyMqO','OdFBX','gQPyb','modalTitleSuccess','zFmeC','formMessage','STGCc','emailPlaceholder','wdadI','HRfTQ','encodedScreenshot','gcnFA','dyIGO','true','button','ucBuS','http://www.w3.org/2000/svg','jxFpt','classList','topSide','catch','string','display','CoXtl','gZvND','Comments','Oops!','block','Screenshot\x20captured','rXrEK','UvSDe','position','Please\x20try\x20again\x20later.','feedback-modal-rating-buttons','feedback-modal-element-selected','_blank','730071vyqDNr','successMessage','2007744YRcIHr','feather\x20feather-x','OWmBS','top-side','gpsMH','https://app.pushfeedback.com/api/projects/','Ommid','innerWidth','FSwGx','EnudG','TwDlP','handleCheckboxChange','clientY','left','hideEmail','3034264umbkhB','status','json','PushFeedback.com','split','appendChild','hideScreenshotButton','lswua','handleRatingChange','feedback-modal-button--active','EKTOR','innerHeight','privacyPolicyText','0\x200\x2024\x2024','0\x20-960\x20960\x20960','HWnVg','mgiHQ','jVJYV','modalTitle','LmASS','elementSelected','errorMessage403','false','bottomSide','onaIa','captureScreenshot','toDataURL','1382409QwVcDF','0px','checked','dDfho','btULM','NuTLt','getBoundingClientRect','5|2|0|1|4|3','I\x20have\x20read\x20and\x20expressly\x20consent\x20to\x20the\x20terms\x20of\x20the\x20<a\x20href=\x27https://pushfeedback.com/privacy\x27>Privacy\x20Policy</a>.','message-placeholder','handleMouseClickedSelectedElement','wGIyW','styleUrls','wDiEP','ADUlh','error-message-4-0-4','kGHmv','privacyPolicy','clientWidth','395FNplhS','POST','pFreD','OXGSV','modalPosition','hideRating','showModal','PoaKt','THVDB','scrollX','hide-rating','EXlLy','href','feedback-modal.css','single','iXvJu','lVwEM','scrollY','RUuRp','HgMdI','error-message-4-0-3','map','#191919','feedback-modal-input-heading','CoKOd','whitelabel','height','\x27How\x20would\x20you\x20rate\x20this\x20page?\x27','xYPQy','\x27Select\x20an\x20element\x20on\x20this\x20page\x27','sendButtonText','show-modal','lEBor','IOzTl','meoxE','feedback-modal-screenshot-close','add','sUyoD','avyzP','modalTitleError','right','\x27Share\x20your\x20feedback\x27','TwjYx','cWuZV','SyQxV','\x27center\x27','zekiV','feedback-modal-screenshot-open','scrollTo','handleMessageInput','https://pushfeedback.com','stringify','kKkir','remove','QKPYw','clientX','Failed\x20to\x20capture\x20screenshot:','modal-title','25734trLluP','feedback-modal-screenshot-closing','scroll','feedback-modal-text','feedback-modal-content--open','modal-title-success','Send'];_0x36d9=function(){return _0x134e75;};return _0x36d9();}import _0x14d67a from'html2canvas';export class FeedbackModal{constructor(){const _0x259b39=_0x2ed4,_0x9315cf={'Tqckl':function(_0x535b91,_0x3a8766){return _0x535b91(_0x3a8766);},'mJybq':function(_0x24836f,_0x1266e2,_0x21d56f){return _0x24836f(_0x1266e2,_0x21d56f);},'rXrEK':_0x259b39(0x1df),'kfvoX':_0x259b39(0x15d),'vMvSs':'application/json','gpsMH':function(_0x16e68c,_0x301f5b){return _0x16e68c===_0x301f5b;},'wDiEP':function(_0x5b7a5a,_0x246c97){return _0x5b7a5a>_0x246c97;},'kGHmv':_0x259b39(0x1a5),'OIyKB':function(_0x2ec1cc,_0x462934){return _0x2ec1cc(_0x462934);},'rgCzN':_0x259b39(0x150),'drdqc':_0x259b39(0x1d9),'qVgVy':'absolute','OWmBS':_0x259b39(0x14a),'rrwCf':_0x259b39(0xa0),'kKkir':'100vh','ZVPeB':function(_0x2c18cb,_0x12e521){return _0x2c18cb+_0x12e521;},'dRGyh':'100%','bYQMn':_0x259b39(0xb6),'BbKVI':_0x259b39(0x11b),'gwQbt':_0x259b39(0x115),'vWiqX':_0x259b39(0x194),'meoxE':_0x259b39(0x119),'avyzP':'The\x20request\x20URL\x20does\x20not\x20match\x20the\x20one\x20defined\x20in\x20PushFeedback\x20for\x20this\x20project.','mgiHQ':_0x259b39(0x1bd),'DURNO':_0x259b39(0xf1),'vExvj':'Thanks\x20for\x20your\x20feedback!','bvuti':'center','gXICW':_0x259b39(0x1d2),'Efrnc':_0x259b39(0x1d6),'ZlBQH':_0x259b39(0x1b5),'UvSDe':_0x259b39(0x112),'EKTOR':_0x259b39(0xe1),'CiLkT':_0x259b39(0x151)};this[_0x259b39(0xd1)]=()=>{const _0x3e5592=_0x259b39;_0x9315cf['Tqckl'](clearTimeout,this['scrollTimeout']),this[_0x3e5592(0xd5)]=setTimeout(()=>{const _0x38ea7d=_0x3e5592;document[_0x38ea7d(0xc0)][_0x38ea7d(0x10b)]['remove']('feedback-modal-screenshot-closing'),document[_0x38ea7d(0xc0)]['style'][_0x38ea7d(0x1b0)]='',window[_0x38ea7d(0x1b3)]('scroll',this[_0x38ea7d(0xd1)]);},0xc8);},this['handleSubmit']=async _0x35b37c=>{const _0x305059=_0x259b39;_0x35b37c[_0x305059(0xa3)](),this[_0x305059(0xac)](),this[_0x305059(0xdf)]=![],this[_0x305059(0x1b4)]=![],this[_0x305059(0x162)]=![],this[_0x305059(0xeb)]=!![];try{const _0xb98e50=await _0x9315cf[_0x305059(0xe5)](fetch,_0x9315cf[_0x305059(0x116)],{'method':_0x9315cf[_0x305059(0x1aa)],'body':JSON[_0x305059(0x18f)]({'url':window[_0x305059(0xf0)][_0x305059(0x168)],'message':this[_0x305059(0xfe)],'email':this[_0x305059(0x1db)],'project':this[_0x305059(0xde)],'screenshot':this[_0x305059(0x103)],'rating':this[_0x305059(0x96)]}),'headers':{'Content-Type':_0x9315cf['vMvSs']}});_0x9315cf[_0x305059(0x123)](_0xb98e50[_0x305059(0x12f)],0xc9)?(this['formSuccess']=!![],this['formError']=![]):(this['formSuccess']=![],this[_0x305059(0xba)]=!![],this['formErrorStatus']=_0xb98e50[_0x305059(0x12f)]);}catch(_0x582d0d){console[_0x305059(0xa4)](_0x582d0d),this[_0x305059(0x97)]=![],this[_0x305059(0xba)]=!![],this[_0x305059(0xcc)]=0x1f4;}finally{this[_0x305059(0xeb)]=![],this[_0x305059(0x162)]=!![];}},this['close']=()=>{const _0xd228a5=_0x259b39;this[_0xd228a5(0xeb)]=![],this[_0xd228a5(0x162)]=![],this[_0xd228a5(0xdf)]=![],this[_0xd228a5(0x1b4)]=![],this[_0xd228a5(0x98)]=![],this[_0xd228a5(0x103)]=null,this[_0xd228a5(0x97)]=![],this[_0xd228a5(0xba)]=![],this[_0xd228a5(0xcc)]=0x1f4,this[_0xd228a5(0xfe)]='',this['formEmail']='',this[_0xd228a5(0xac)]();},this['openScreenShot']=()=>{const _0x2fc290=_0x259b39;this['hasSelectedElement']=![],this['showModal']=![],this[_0x2fc290(0xdf)]=!![],this['showScreenshotTopBar']=!![],this[_0x2fc290(0x103)]=null;_0x9315cf[_0x2fc290(0x156)](window['innerWidth'],document[_0x2fc290(0xc0)][_0x2fc290(0x15b)])&&document[_0x2fc290(0xc0)]['classList'][_0x2fc290(0x180)](_0x9315cf[_0x2fc290(0x159)]);const _0x20498c=window[_0x2fc290(0x16d)];document[_0x2fc290(0xc0)][_0x2fc290(0xf6)][_0x2fc290(0x1b0)]='-'+_0x20498c+'px',window['scrollTo'](0x0,_0x9315cf[_0x2fc290(0x1a0)](parseInt,document['documentElement'][_0x2fc290(0xf6)][_0x2fc290(0x1b0)]||'0')*-0x1),document[_0x2fc290(0xc0)][_0x2fc290(0x10b)][_0x2fc290(0x180)](_0x2fc290(0x18b));},this[_0x259b39(0xf7)]=()=>{const _0x5a99e1=_0x259b39,_0x1f9849=_0x9315cf[_0x5a99e1(0xca)][_0x5a99e1(0x132)]('|');let _0xf9d6ec=0x0;while(!![]){switch(_0x1f9849[_0xf9d6ec++]){case'0':this[_0x5a99e1(0x1b4)]=![];continue;case'1':this[_0x5a99e1(0x98)]=![];continue;case'2':this[_0x5a99e1(0xdf)]=![];continue;case'3':this[_0x5a99e1(0xac)]();continue;case'4':this['encodedScreenshot']=null;continue;case'5':this[_0x5a99e1(0x162)]=![];continue;}break;}},this[_0x259b39(0xe0)]=_0x17c56d=>{const _0x9f8fa3=_0x259b39;_0x17c56d[_0x9f8fa3(0xa3)]();if(this['hasSelectedElement'])return;const _0x11736c=0x2;this[_0x9f8fa3(0xd9)][_0x9f8fa3(0xf6)][_0x9f8fa3(0x10f)]=_0x9315cf[_0x9f8fa3(0xd8)];const _0xda7c31=document[_0x9f8fa3(0x9f)](_0x17c56d[_0x9f8fa3(0x193)],_0x17c56d[_0x9f8fa3(0x12b)]),_0x4ba483=_0xda7c31[_0x9f8fa3(0x14f)]();this[_0x9f8fa3(0xd9)][_0x9f8fa3(0xf6)]['display']='',this[_0x9f8fa3(0x142)][_0x9f8fa3(0xf6)]['position']=_0x9315cf['qVgVy'],this[_0x9f8fa3(0x142)][_0x9f8fa3(0xf6)][_0x9f8fa3(0x12c)]=_0x4ba483[_0x9f8fa3(0x12c)]+'px',this[_0x9f8fa3(0x142)]['style'][_0x9f8fa3(0x1b0)]=_0x4ba483[_0x9f8fa3(0x1b0)]+'px',this[_0x9f8fa3(0x142)][_0x9f8fa3(0xf6)][_0x9f8fa3(0x1b6)]=_0x4ba483[_0x9f8fa3(0x1b6)]+'px',this['elementSelected'][_0x9f8fa3(0xf6)][_0x9f8fa3(0x176)]=_0x4ba483[_0x9f8fa3(0x176)]+'px',this[_0x9f8fa3(0x142)]['classList'][_0x9f8fa3(0x180)]('feedback-modal-element-hover'),this[_0x9f8fa3(0x10c)][_0x9f8fa3(0xf6)]['position']=_0x9315cf[_0x9f8fa3(0xa7)],this[_0x9f8fa3(0x10c)][_0x9f8fa3(0xf6)][_0x9f8fa3(0x12c)]=_0x4ba483[_0x9f8fa3(0x12c)]+'px',this['topSide'][_0x9f8fa3(0xf6)]['top']=_0x9315cf[_0x9f8fa3(0x121)],this[_0x9f8fa3(0x10c)]['style'][_0x9f8fa3(0x1b6)]=_0x4ba483[_0x9f8fa3(0x1b6)]+_0x11736c+'px',this[_0x9f8fa3(0x10c)][_0x9f8fa3(0xf6)][_0x9f8fa3(0x176)]=_0x4ba483[_0x9f8fa3(0x1b0)]+'px',this[_0x9f8fa3(0x10c)][_0x9f8fa3(0xf6)][_0x9f8fa3(0x19d)]=_0x9315cf[_0x9f8fa3(0x1dc)],this[_0x9f8fa3(0x1d0)][_0x9f8fa3(0xf6)][_0x9f8fa3(0x118)]=_0x9315cf['qVgVy'],this[_0x9f8fa3(0x1d0)]['style'][_0x9f8fa3(0x12c)]=_0x9f8fa3(0x14a),this[_0x9f8fa3(0x1d0)]['style'][_0x9f8fa3(0x1b0)]=_0x9f8fa3(0x14a),this[_0x9f8fa3(0x1d0)]['style'][_0x9f8fa3(0x1b6)]=_0x4ba483[_0x9f8fa3(0x12c)]+'px',this[_0x9f8fa3(0x1d0)]['style'][_0x9f8fa3(0x176)]=_0x9315cf[_0x9f8fa3(0x190)],this[_0x9f8fa3(0x1d0)][_0x9f8fa3(0xf6)][_0x9f8fa3(0x19d)]=_0x9315cf[_0x9f8fa3(0x1dc)],this[_0x9f8fa3(0x145)]['style'][_0x9f8fa3(0x118)]=_0x9315cf[_0x9f8fa3(0xa7)],this['bottomSide']['style'][_0x9f8fa3(0x12c)]=_0x4ba483[_0x9f8fa3(0x12c)]+'px',this[_0x9f8fa3(0x145)][_0x9f8fa3(0xf6)][_0x9f8fa3(0x1b0)]=_0x9315cf[_0x9f8fa3(0x1be)](_0x4ba483['bottom'],_0x11736c)+'px',this[_0x9f8fa3(0x145)][_0x9f8fa3(0xf6)][_0x9f8fa3(0x1b6)]=_0x4ba483['width']+_0x11736c+'px',this[_0x9f8fa3(0x145)][_0x9f8fa3(0xf6)]['height']=_0x9315cf[_0x9f8fa3(0x190)],this[_0x9f8fa3(0x145)][_0x9f8fa3(0xf6)][_0x9f8fa3(0x19d)]=_0x9315cf[_0x9f8fa3(0x1dc)],this[_0x9f8fa3(0xf8)]['style'][_0x9f8fa3(0x118)]=_0x9315cf[_0x9f8fa3(0xa7)],this[_0x9f8fa3(0xf8)][_0x9f8fa3(0xf6)][_0x9f8fa3(0x12c)]=_0x9315cf[_0x9f8fa3(0x1be)](_0x4ba483[_0x9f8fa3(0x184)],_0x11736c)+'px';;this[_0x9f8fa3(0xf8)][_0x9f8fa3(0xf6)][_0x9f8fa3(0x1b0)]=_0x9f8fa3(0x14a),this[_0x9f8fa3(0xf8)][_0x9f8fa3(0xf6)]['width']=_0x9315cf[_0x9f8fa3(0xdd)],this[_0x9f8fa3(0xf8)][_0x9f8fa3(0xf6)][_0x9f8fa3(0x176)]=_0x9315cf['kKkir'],this[_0x9f8fa3(0xf8)][_0x9f8fa3(0xf6)][_0x9f8fa3(0x19d)]=_0x9315cf['rrwCf'],this['screenshotModal'][_0x9f8fa3(0xf6)][_0x9f8fa3(0x19d)]=_0x9315cf[_0x9f8fa3(0x1d4)];},this[_0x259b39(0x153)]=async _0x4ca3c1=>{const _0x34458b=_0x259b39;_0x4ca3c1[_0x34458b(0xa3)]();if(!this[_0x34458b(0x142)])return;this[_0x34458b(0x98)]=!![],this[_0x34458b(0x142)][_0x34458b(0x10b)]['add'](_0x9315cf['BbKVI']);const _0x3a8e3e=this[_0x34458b(0x142)][_0x34458b(0x14f)]()[_0x34458b(0x1b0)],_0xf11c1=_0x9315cf[_0x34458b(0x1be)](_0x3a8e3e,window[_0x34458b(0x16d)]);this[_0x34458b(0x142)][_0x34458b(0xf6)][_0x34458b(0x1b0)]=_0xf11c1+'px';const _0x1f78a4=this[_0x34458b(0x142)]['cloneNode'](!![]);document[_0x34458b(0x1a7)][_0x34458b(0x133)](_0x1f78a4),this['elementSelected'][_0x34458b(0xf6)]['top']=_0x3a8e3e+'px',this['showScreenshotTopBar']=![],this[_0x34458b(0x162)]=![];try{const _0x475456=await this[_0x34458b(0x147)]();console[_0x34458b(0xa4)](_0x9315cf['gwQbt']),this[_0x34458b(0x103)]=_0x475456;}catch(_0x3dace0){console[_0x34458b(0xda)](_0x9315cf[_0x34458b(0xe3)],_0x3dace0),this['hasSelectedElement']=![];}finally{document[_0x34458b(0x1a7)][_0x34458b(0xd0)](_0x1f78a4),this[_0x34458b(0x162)]=!![];}},this['sending']=![],this[_0x259b39(0xfe)]='',this[_0x259b39(0x1db)]='',this['formSuccess']=![],this['formError']=![],this[_0x259b39(0xcc)]=0x1f4,this[_0x259b39(0x103)]=undefined,this[_0x259b39(0xf2)]=![],this[_0x259b39(0x175)]=![],this[_0x259b39(0x96)]=0x0,this['errorMessage']=_0x9315cf[_0x259b39(0x17e)],this[_0x259b39(0x143)]=_0x9315cf[_0x259b39(0x182)],this[_0x259b39(0x1c8)]=_0x9315cf[_0x259b39(0x13e)],this[_0x259b39(0x140)]=_0x9315cf['DURNO'],this[_0x259b39(0xfc)]=_0x9315cf[_0x259b39(0x1a4)],this[_0x259b39(0x183)]=_0x259b39(0x113),this[_0x259b39(0x160)]=_0x9315cf['bvuti'],this[_0x259b39(0x17a)]=_0x259b39(0x19c),this['successMessage']='',this[_0x259b39(0xde)]='',this[_0x259b39(0xf5)]=_0x9315cf[_0x259b39(0x1bc)],this[_0x259b39(0xb0)]=_0x9315cf['Efrnc'],this[_0x259b39(0x12d)]=![],this[_0x259b39(0xa5)]='',this[_0x259b39(0x100)]=_0x9315cf[_0x259b39(0xe9)],this[_0x259b39(0x1a8)]=_0x9315cf[_0x259b39(0x117)],this[_0x259b39(0x161)]=![],this['ratingPlaceholder']=_0x9315cf[_0x259b39(0x138)],this[_0x259b39(0x162)]=![],this[_0x259b39(0xdf)]=![],this[_0x259b39(0x1b4)]=![],this[_0x259b39(0x98)]=![],this[_0x259b39(0x134)]=![],this[_0x259b39(0xcf)]=!![],this[_0x259b39(0x13a)]=_0x9315cf[_0x259b39(0xab)],this['fetchData']=!![];}[_0x16809a(0xad)](){const _0x44958c=_0x16809a;if(this['fetchData'])this[_0x44958c(0xa9)]();this[_0x44958c(0x1db)]=this['emailAddress'];}async[_0x16809a(0xa9)](){const _0x4d3280=_0x16809a,_0x2b7967={'aZFrs':function(_0x4979a2,_0x3b0971){return _0x4979a2(_0x3b0971);},'iUkWv':function(_0x3b4bb8,_0x3be065){return _0x3b4bb8+_0x3be065;},'jxFpt':function(_0x59af1a,_0x22730e){return _0x59af1a+_0x22730e;},'efTjd':_0x4d3280(0x124)};try{const _0x4aea21=await _0x2b7967[_0x4d3280(0x1a1)](fetch,_0x2b7967[_0x4d3280(0xef)](_0x2b7967[_0x4d3280(0x10a)](_0x2b7967['efTjd'],this[_0x4d3280(0xde)]),'/')),_0x3d690c=await _0x4aea21[_0x4d3280(0x130)]();this[_0x4d3280(0x175)]=_0x3d690c[_0x4d3280(0x175)];}catch(_0x7e101d){console[_0x4d3280(0xa4)](_0x7e101d);}}[_0x16809a(0xac)](){const _0x4e413a=_0x16809a,_0x2d1f81={'ADUlh':'2|0|1|3|4','PWXar':'feedback-modal-screenshot-open--scroll','TwjYx':_0x4e413a(0x18b),'LAVpr':function(_0x28bfaf,_0x1c381f){return _0x28bfaf*_0x1c381f;},'nbyWa':function(_0x349014,_0x24641c){return _0x349014(_0x24641c);},'NESKr':_0x4e413a(0x198)},_0x331a50=_0x2d1f81[_0x4e413a(0x157)]['split']('|');let _0x1b11cf=0x0;while(!![]){switch(_0x331a50[_0x1b11cf++]){case'0':document[_0x4e413a(0xc0)]['classList'][_0x4e413a(0x191)](_0x2d1f81[_0x4e413a(0xb9)]);continue;case'1':document[_0x4e413a(0xc0)][_0x4e413a(0x10b)][_0x4e413a(0x180)](_0x4e413a(0x197));continue;case'2':document[_0x4e413a(0xc0)][_0x4e413a(0x10b)]['remove'](_0x2d1f81[_0x4e413a(0x186)]);continue;case'3':window[_0x4e413a(0x18c)](0x0,_0x2d1f81['LAVpr'](_0x2d1f81[_0x4e413a(0xc2)](parseInt,document[_0x4e413a(0xc0)][_0x4e413a(0xf6)][_0x4e413a(0x1b0)]||'0'),-0x1));continue;case'4':window[_0x4e413a(0xc5)](_0x2d1f81['NESKr'],this['onScrollDebounced']);continue;}break;}}[_0x16809a(0x18d)](_0x5da93d){const _0x7ff1f3=_0x16809a;this[_0x7ff1f3(0xfe)]=_0x5da93d[_0x7ff1f3(0xa8)]['value'];}[_0x16809a(0x19f)](_0x5a2cd5){const _0x1a7c61=_0x16809a;this[_0x1a7c61(0x1db)]=_0x5a2cd5['target']['value'];}[_0x16809a(0x147)](){const _0x481450={'vaRro':function(_0x1dc7c3,_0x2a584f,_0x2d8ef1){return _0x1dc7c3(_0x2a584f,_0x2d8ef1);},'FFOLH':function(_0x179d49,_0x1b21f8){return _0x179d49(_0x1b21f8);}};return new Promise((_0xee875d,_0x52b3b4)=>{const _0x485a61=_0x2ed4,_0x4a73a0={'vQnqD':function(_0x314034,_0x8de756){return _0x481450['FFOLH'](_0x314034,_0x8de756);}};_0x481450[_0x485a61(0xaf)](requestAnimationFrame,()=>{const _0x5edf9e=_0x485a61,_0x25f902={'dyIGO':function(_0x8ccd69,_0xb2caf3){return _0x8ccd69(_0xb2caf3);}};_0x481450['vaRro'](_0x14d67a,document['body'],{'x':window[_0x5edf9e(0x165)],'y':window[_0x5edf9e(0x16d)],'width':window[_0x5edf9e(0x126)],'height':window[_0x5edf9e(0x139)]})['then'](_0x3aaddf=>{const _0x43787a=_0x5edf9e,_0x17a6f6=_0x3aaddf[_0x43787a(0x148)]();_0x25f902[_0x43787a(0x105)](_0xee875d,_0x17a6f6);})[_0x5edf9e(0x10d)](_0xecfeda=>{const _0xd93f05=_0x5edf9e;console[_0xd93f05(0xda)](_0xecfeda),_0x4a73a0[_0xd93f05(0xb3)](_0x52b3b4,_0xecfeda);});});});}[_0x16809a(0x12a)](_0x469cb9){const _0x9e8fdc=_0x16809a;this[_0x9e8fdc(0xf2)]=_0x469cb9[_0x9e8fdc(0xa8)][_0x9e8fdc(0x14b)];}[_0x16809a(0x136)](_0x556f33){const _0x2fe68f=_0x16809a;this[_0x2fe68f(0x96)]=_0x556f33;}[_0x16809a(0x1b8)](){const _0x4ab879=_0x16809a,_0x54ac0e={'NuTLt':function(_0x28bab7,_0x494772,_0xd25dd2,_0xaffa45,_0x3bce55,_0x20f268){return _0x28bab7(_0x494772,_0xd25dd2,_0xaffa45,_0x3bce55,_0x20f268);},'GmIiI':_0x4ab879(0x1c0),'lVwEM':_0x4ab879(0x93),'EXlLy':function(_0x2af47a,_0x43e585,_0x1d24ad,_0xb0534b,_0x2134fd,_0x12996c,_0x5068a2,_0x4c5425,_0x45e89c){return _0x2af47a(_0x43e585,_0x1d24ad,_0xb0534b,_0x2134fd,_0x12996c,_0x5068a2,_0x4c5425,_0x45e89c);},'lzgQQ':_0x4ab879(0xc7),'OSDae':_0x4ab879(0xc4),'MoXcd':_0x4ab879(0x122),'HyMqO':function(_0x26dce0,_0xdc2426,_0x5c1cba){return _0x26dce0(_0xdc2426,_0x5c1cba);},'Dipzb':_0x4ab879(0xd7),'gcnFA':function(_0x5d6053,_0x428457,_0x422bd1){return _0x5d6053(_0x428457,_0x422bd1);},'jgqos':'bottom-side','CoXtl':_0x4ab879(0xe6),'DwPoz':_0x4ab879(0x1d8),'RUuRp':function(_0x3816f2,_0x277f05,_0x5ca284,_0xb6aa9b){return _0x3816f2(_0x277f05,_0x5ca284,_0xb6aa9b);},'UCzam':_0x4ab879(0x17f),'TwDlP':function(_0x5e206c,_0x52f532,_0x153dfe,_0x3cba88,_0x565af8){return _0x5e206c(_0x52f532,_0x153dfe,_0x3cba88,_0x565af8);},'jVJYV':_0x4ab879(0x1b2),'UxiPD':_0x4ab879(0x109),'FSwGx':_0x4ab879(0x13b),'HvnDL':_0x4ab879(0x172),'Ommid':_0x4ab879(0xa6),'STGCc':_0x4ab879(0x120),'btULM':function(_0x32144f,_0x16c061,_0x33b976){return _0x32144f(_0x16c061,_0x33b976);},'LmASS':_0x4ab879(0x1b1),'imjkA':function(_0x313b18,_0x74f928,_0x272fe0,_0x5a4e1e,_0xd60e3a,_0x2dc18e){return _0x313b18(_0x74f928,_0x272fe0,_0x5a4e1e,_0xd60e3a,_0x2dc18e);},'vBUwR':_0x4ab879(0x19a),'IOzTl':function(_0x29aa28,_0xbbba12,_0x50fd32,_0x2e5a6a,_0x30d0c1){return _0x29aa28(_0xbbba12,_0x50fd32,_0x2e5a6a,_0x30d0c1);},'HpfPN':_0x4ab879(0x19e),'AElmR':function(_0x304217,_0x235ef6,_0x190df0,_0x10e380){return _0x304217(_0x235ef6,_0x190df0,_0x10e380);},'sUyoD':function(_0x1d1d57,_0xa7ffd6,_0x323bde,_0x1f8ebe){return _0x1d1d57(_0xa7ffd6,_0x323bde,_0x1f8ebe);},'HWnVg':_0x4ab879(0x107),'xUmdB':_0x4ab879(0x1a6),'GlhUv':function(_0x213c35,_0x458b6c,_0x3dc590,_0x5df46d,_0x5779ca){return _0x213c35(_0x458b6c,_0x3dc590,_0x5df46d,_0x5779ca);},'lipJn':function(_0x570d79,_0x1a7709,_0x35284e){return _0x570d79(_0x1a7709,_0x35284e);},'sItED':_0x4ab879(0xbd),'kqXtj':function(_0x1b52aa,_0x24050f,_0x1f38c7){return _0x1b52aa(_0x24050f,_0x1f38c7);},'AWnCB':_0x4ab879(0xc6),'jXIBN':function(_0x44e34e,_0xc0c173,_0x2861b0,_0x20e17a,_0x356f2f,_0x2084cc,_0x26fdaa,_0x1325c9){return _0x44e34e(_0xc0c173,_0x2861b0,_0x20e17a,_0x356f2f,_0x2084cc,_0x26fdaa,_0x1325c9);},'otgpf':_0x4ab879(0x9b),'BZJVK':function(_0x901e2b,_0xcf6777,_0x175245,_0x4545a8,_0x3a9373){return _0x901e2b(_0xcf6777,_0x175245,_0x4545a8,_0x3a9373);},'CNgIa':'feedback-modal-rating','iXvJu':function(_0xd30efb,_0x3d51b2,_0x3deb66,_0x2b7234){return _0xd30efb(_0x3d51b2,_0x3deb66,_0x2b7234);},'UfcfI':_0x4ab879(0x173),'OdFBX':_0x4ab879(0x199),'jDHSB':function(_0x4a3650,_0x52f232,_0x35182d){return _0x4a3650(_0x52f232,_0x35182d);},'rSxNG':'textarea','SyQxV':function(_0x449229,_0x563071,_0x56f0f3,_0x2b1384){return _0x449229(_0x563071,_0x56f0f3,_0x2b1384);},'fiUTU':'feedback-modal-email','pFreD':function(_0x21f0df,_0x5d31e8,_0x338e33){return _0x21f0df(_0x5d31e8,_0x338e33);},'zekiV':_0x4ab879(0xaa),'OXGSV':_0x4ab879(0x1c7),'GMlmS':_0x4ab879(0xce),'xIrvU':'checkbox','THVDB':_0x4ab879(0x16a),'EJNun':function(_0x209536,_0x2986f7,_0x522a96,_0x7a2c99){return _0x209536(_0x2986f7,_0x522a96,_0x7a2c99);},'PXlet':_0x4ab879(0x13c),'xYPQy':function(_0x564d4e,_0xd713c7,_0x2ddedd){return _0x564d4e(_0xd713c7,_0x2ddedd);},'HRfTQ':'path','IbAuN':_0x4ab879(0xa1),'iZHUk':'feedback-modal-button\x20feedback-modal-button--submit','HgMdI':'submit','WxdFO':function(_0x2c91f4,_0x3b5349,_0x203c72,_0x136fa1){return _0x2c91f4(_0x3b5349,_0x203c72,_0x136fa1);},'cWuZV':_0x4ab879(0xb8),'YGngo':function(_0x5797a2,_0x365b86,_0x37a55e){return _0x5797a2(_0x365b86,_0x37a55e);},'wGIyW':'feedback-modal-footer','aSzQi':_0x4ab879(0x1d9),'ZheAE':_0x4ab879(0x114),'PbLdw':_0x4ab879(0x11c),'PoaKt':_0x4ab879(0x131)};return _0x54ac0e[_0x4ab879(0x14e)](h,_0x54ac0e[_0x4ab879(0xf4)],{'class':_0x54ac0e[_0x4ab879(0x16c)]},this[_0x4ab879(0xdf)]&&_0x54ac0e[_0x4ab879(0x167)](h,_0x54ac0e[_0x4ab879(0xf4)],{'class':_0x54ac0e['lzgQQ'],'ref':_0x3b04f5=>this[_0x4ab879(0xd9)]=_0x3b04f5,'onMouseMove':this[_0x4ab879(0xe0)]},h(_0x54ac0e[_0x4ab879(0xf4)],{'class':_0x54ac0e[_0x4ab879(0xb7)],'ref':_0x6de083=>this[_0x4ab879(0x142)]=_0x6de083,'onClick':this['handleMouseClickedSelectedElement']}),h(_0x54ac0e[_0x4ab879(0xf4)],{'class':_0x54ac0e['MoXcd'],'ref':_0x3401f7=>this[_0x4ab879(0x10c)]=_0x3401f7}),_0x54ac0e[_0x4ab879(0xf9)](h,_0x54ac0e['GmIiI'],{'class':_0x54ac0e[_0x4ab879(0xb2)],'ref':_0x596990=>this[_0x4ab879(0x1d0)]=_0x596990}),_0x54ac0e[_0x4ab879(0x104)](h,'div',{'class':_0x54ac0e[_0x4ab879(0xb4)],'ref':_0x5f132e=>this[_0x4ab879(0x145)]=_0x5f132e}),_0x54ac0e[_0x4ab879(0xf9)](h,_0x54ac0e[_0x4ab879(0xf4)],{'class':_0x4ab879(0xbf),'ref':_0x29db4d=>this[_0x4ab879(0xf8)]=_0x29db4d}),this[_0x4ab879(0x1b4)]&&h(_0x54ac0e[_0x4ab879(0xf4)],{'class':_0x54ac0e[_0x4ab879(0x110)],'onClick':this[_0x4ab879(0xf7)]},h(_0x54ac0e[_0x4ab879(0xbb)],null,this['screenshotTopbarText']),_0x54ac0e['RUuRp'](h,_0x54ac0e[_0x4ab879(0xbb)],{'class':_0x54ac0e[_0x4ab879(0xee)]},_0x54ac0e[_0x4ab879(0x129)](h,_0x54ac0e[_0x4ab879(0x13f)],{'xmlns':_0x54ac0e[_0x4ab879(0x9d)],'width':'22','height':'22','viewBox':_0x54ac0e[_0x4ab879(0x127)],'fill':'none','stroke':_0x54ac0e[_0x4ab879(0x1d3)],'stroke-width':'2','stroke-linecap':_0x54ac0e[_0x4ab879(0x125)],'stroke-linejoin':_0x54ac0e[_0x4ab879(0x125)],'class':_0x54ac0e[_0x4ab879(0xff)]},_0x54ac0e[_0x4ab879(0xf9)](h,'line',{'x1':'18','y1':'6','x2':'6','y2':'18'}),h(_0x4ab879(0xbd),{'x1':'6','y1':'6','x2':'18','y2':'18'}))))),this[_0x4ab879(0x162)]&&_0x54ac0e[_0x4ab879(0x14d)](h,_0x54ac0e[_0x4ab879(0xf4)],{'class':_0x54ac0e[_0x4ab879(0x141)]}),this['showModal']&&_0x54ac0e[_0x4ab879(0xa2)](h,'div',{'class':_0x4ab879(0x1d5)+this[_0x4ab879(0x160)]+'\x20'+(this[_0x4ab879(0x162)]?_0x54ac0e[_0x4ab879(0xe2)]:''),'ref':_0x4ddd3a=>this[_0x4ab879(0x1de)]=_0x4ddd3a},_0x54ac0e['IOzTl'](h,_0x54ac0e['GmIiI'],{'class':_0x54ac0e['HpfPN']},!this[_0x4ab879(0x97)]&&!this['formError']?_0x54ac0e[_0x4ab879(0x16e)](h,_0x54ac0e[_0x4ab879(0xbb)],null,this['modalTitle']):this[_0x4ab879(0x97)]?_0x54ac0e[_0x4ab879(0x1c2)](h,_0x54ac0e['DwPoz'],null,this[_0x4ab879(0xfc)]):_0x54ac0e[_0x4ab879(0x181)](h,_0x54ac0e[_0x4ab879(0xbb)],null,this['modalTitleError']),h(_0x54ac0e[_0x4ab879(0x13d)],{'class':_0x54ac0e['xUmdB'],'onClick':this['close']},_0x54ac0e[_0x4ab879(0x1d1)](h,_0x54ac0e['jVJYV'],{'xmlns':_0x54ac0e[_0x4ab879(0x9d)],'width':'22','height':'22','viewBox':_0x54ac0e['FSwGx'],'fill':_0x4ab879(0x1d9),'stroke':_0x54ac0e[_0x4ab879(0x1d3)],'stroke-width':'2','stroke-linecap':_0x4ab879(0xa6),'stroke-linejoin':_0x54ac0e[_0x4ab879(0x125)],'class':_0x54ac0e[_0x4ab879(0xff)]},_0x54ac0e['lipJn'](h,_0x54ac0e[_0x4ab879(0x1cb)],{'x1':'18','y1':'6','x2':'6','y2':'18'}),_0x54ac0e['kqXtj'](h,_0x54ac0e['sItED'],{'x1':'6','y1':'6','x2':'18','y2':'18'})))),_0x54ac0e['sUyoD'](h,'div',{'class':_0x54ac0e['AWnCB']},!this[_0x4ab879(0x97)]&&!this[_0x4ab879(0xba)]?_0x54ac0e[_0x4ab879(0x1c5)](h,_0x54ac0e['otgpf'],{'onSubmit':this[_0x4ab879(0x1b9)]},!this['hideRating']&&_0x54ac0e['BZJVK'](h,_0x54ac0e[_0x4ab879(0xf4)],{'class':_0x54ac0e['CNgIa']},_0x54ac0e['iXvJu'](h,_0x54ac0e[_0x4ab879(0xbb)],{'class':_0x54ac0e['UfcfI']},this[_0x4ab879(0xcd)]),_0x54ac0e[_0x4ab879(0x16b)](h,_0x4ab879(0x1c0),{'class':_0x4ab879(0x11a)},[0x1,0x2,0x3,0x4,0x5][_0x4ab879(0x171)](_0xbd6a07=>h(_0x4ab879(0x107),{'key':_0xbd6a07,'class':_0x4ab879(0xbc)+(this[_0x4ab879(0x96)]>=_0xbd6a07?'feedback-modal-rating-button--selected':''),'onClick':_0x3a5d2a=>{const _0xb51824=_0x4ab879;_0x3a5d2a[_0xb51824(0xa3)](),this[_0xb51824(0x136)](_0xbd6a07);}},h(_0x4ab879(0x1b2),{'xmlns':_0x4ab879(0x109),'width':'28','height':'28','viewBox':_0x4ab879(0x13b),'fill':'none','stroke':'#5F6368','stroke-width':'2','stroke-linecap':'round','stroke-linejoin':'round'},h('polygon',{'points':_0x4ab879(0xdc)})))))),_0x54ac0e['iXvJu'](h,_0x54ac0e[_0x4ab879(0xf4)],{'class':_0x54ac0e[_0x4ab879(0xfa)]},_0x54ac0e[_0x4ab879(0xb1)](h,_0x54ac0e[_0x4ab879(0x1cd)],{'placeholder':this['messagePlaceholder'],'value':this[_0x4ab879(0xfe)],'onInput':_0x4f6b89=>this['handleMessageInput'](_0x4f6b89)})),!this['hideEmail']&&_0x54ac0e[_0x4ab879(0x188)](h,_0x54ac0e[_0x4ab879(0xf4)],{'class':_0x54ac0e['fiUTU']},_0x54ac0e[_0x4ab879(0x15e)](h,_0x54ac0e[_0x4ab879(0x18a)],{'placeholder':this[_0x4ab879(0x100)],'type':_0x54ac0e[_0x4ab879(0x15f)],'onInput':_0x42f4c8=>this[_0x4ab879(0x19f)](_0x42f4c8),'value':this[_0x4ab879(0x1db)]})),!this[_0x4ab879(0xcf)]&&_0x54ac0e[_0x4ab879(0x17d)](h,_0x54ac0e[_0x4ab879(0xf4)],{'class':_0x54ac0e['GMlmS']},h(_0x54ac0e[_0x4ab879(0x18a)],{'type':_0x54ac0e['xIrvU'],'id':_0x4ab879(0x15a),'onChange':_0x167978=>this[_0x4ab879(0x12a)](_0x167978),'required':!![]}),_0x54ac0e['kqXtj'](h,_0x54ac0e[_0x4ab879(0xbb)],{'innerHTML':this[_0x4ab879(0x13a)]})),h(_0x4ab879(0x1c0),{'class':_0x4ab879(0x9a)+(this[_0x4ab879(0x134)]?_0x54ac0e[_0x4ab879(0x164)]:'')},!this[_0x4ab879(0x134)]&&_0x54ac0e[_0x4ab879(0x129)](h,_0x4ab879(0x107),{'type':_0x4ab879(0x107),'class':_0x4ab879(0xd4)+(this[_0x4ab879(0x103)]?_0x4ab879(0x137):''),'onClick':this[_0x4ab879(0x1ac)],'disabled':this[_0x4ab879(0xeb)]},_0x54ac0e['EJNun'](h,'svg',{'xmlns':'http://www.w3.org/2000/svg','height':'24','viewBox':_0x54ac0e[_0x4ab879(0xc8)],'width':'24'},_0x54ac0e[_0x4ab879(0x178)](h,_0x54ac0e[_0x4ab879(0x102)],{'d':_0x54ac0e['IbAuN']})),this[_0x4ab879(0xf5)]),_0x54ac0e[_0x4ab879(0x188)](h,_0x54ac0e[_0x4ab879(0x13d)],{'class':_0x54ac0e[_0x4ab879(0xd3)],'type':_0x54ac0e[_0x4ab879(0x16f)],'disabled':this[_0x4ab879(0xeb)]},this[_0x4ab879(0x17a)]))):this[_0x4ab879(0x97)]&&!this[_0x4ab879(0xba)]?_0x54ac0e[_0x4ab879(0x188)](h,'p',{'class':_0x4ab879(0xb8)},this[_0x4ab879(0x11e)]):this[_0x4ab879(0xba)]&&this[_0x4ab879(0xcc)]==0x194?_0x54ac0e['WxdFO'](h,'p',{'class':_0x54ac0e['cWuZV']},this[_0x4ab879(0x1c8)]):this[_0x4ab879(0xba)]&&this[_0x4ab879(0xcc)]==0x193?_0x54ac0e['EJNun'](h,'p',{'class':_0x54ac0e[_0x4ab879(0x187)]},this[_0x4ab879(0x143)]):this[_0x4ab879(0xba)]?_0x54ac0e['EJNun'](h,'p',{'class':_0x54ac0e[_0x4ab879(0x187)]},this[_0x4ab879(0xea)]):_0x54ac0e['YGngo'](h,_0x54ac0e['DwPoz'],null)),h(_0x54ac0e[_0x4ab879(0xf4)],{'class':_0x54ac0e[_0x4ab879(0x154)],'style':{'display':this[_0x4ab879(0x175)]?_0x54ac0e['aSzQi']:_0x54ac0e['ZheAE']}},h(_0x4ab879(0x1c0),{'class':'feedback-logo'},_0x4ab879(0x1ab),_0x54ac0e[_0x4ab879(0x1c2)](h,'a',{'target':_0x54ac0e[_0x4ab879(0x1af)],'href':_0x4ab879(0x18e)},_0x54ac0e[_0x4ab879(0x163)])))));}static get['is'](){const _0x287427=_0x16809a,_0x6235e4={'wdadI':_0x287427(0xdb)};return _0x6235e4[_0x287427(0x101)];}static get[_0x16809a(0x1d7)](){const _0x52f981=_0x16809a,_0x2cf43d={'ucBuS':_0x52f981(0x1a2)};return _0x2cf43d[_0x52f981(0x108)];}static get[_0x16809a(0x99)](){const _0x30d5d7=_0x16809a,_0x157460={'TrQjC':'feedback-modal.css'};return{'$':[_0x157460[_0x30d5d7(0x1c3)]]};}static get[_0x16809a(0x155)](){const _0x490ee5=_0x16809a,_0x2ca435={'XXrFB':_0x490ee5(0x169)};return{'$':[_0x2ca435[_0x490ee5(0x1ce)]]};}static get['properties'](){const _0x18e7da=_0x16809a,_0x11035d={'QguRA':_0x18e7da(0x10e),'LpryZ':_0x18e7da(0xf3),'akYtj':_0x18e7da(0x170),'onaIa':'\x22The\x20request\x20URL\x20does\x20not\x20match\x20the\x20one\x20defined\x20in\x20PushFeedback\x20for\x20this\x20project.\x22','lfbrC':_0x18e7da(0x158),'QKPYw':_0x18e7da(0xd6),'sTGFf':_0x18e7da(0x195),'PONTj':_0x18e7da(0x19b),'cZPjv':_0x18e7da(0x1dd),'MbIfY':'\x22Oops!\x22','uIPMO':_0x18e7da(0x1a9),'lswua':'send-button-text','pqqMz':_0x18e7da(0x1bf),'EnudG':'screenshot-button-text','oCoGk':_0x18e7da(0x1a3),'lEBor':_0x18e7da(0x179),'JmcwT':_0x18e7da(0xe8),'RHesi':_0x18e7da(0x144),'DRnvb':_0x18e7da(0x9e),'vJdUD':'email-placeholder','zFmeC':_0x18e7da(0x1da),'snLQv':_0x18e7da(0x166),'EylfX':_0x18e7da(0x1c9),'gZvND':_0x18e7da(0x177),'avIDI':_0x18e7da(0x17b),'gQPyb':_0x18e7da(0xec),'dDfho':_0x18e7da(0xd2),'ShMaB':_0x18e7da(0xed),'TePUi':'hide-privacy-policy','CoKOd':_0x18e7da(0x106),'rehcS':'privacy-policy-text','rWguO':_0x18e7da(0xcb),'GwLKl':'fetch-data'};return{'errorMessage':{'type':_0x11035d['QguRA'],'mutable':![],'complexType':{'original':_0x18e7da(0x10e),'resolved':_0x11035d[_0x18e7da(0x1ba)],'references':{}},'required':![],'optional':![],'docs':{'tags':[],'text':''},'attribute':_0x18e7da(0x1c4),'reflect':![],'defaultValue':_0x11035d['LpryZ']},'errorMessage403':{'type':_0x11035d[_0x18e7da(0x1ba)],'mutable':![],'complexType':{'original':_0x11035d[_0x18e7da(0x1ba)],'resolved':_0x11035d['QguRA'],'references':{}},'required':![],'optional':![],'docs':{'tags':[],'text':''},'attribute':_0x11035d['akYtj'],'reflect':![],'defaultValue':_0x11035d[_0x18e7da(0x146)]},'errorMessage404':{'type':_0x18e7da(0x10e),'mutable':![],'complexType':{'original':_0x11035d['QguRA'],'resolved':_0x11035d[_0x18e7da(0x1ba)],'references':{}},'required':![],'optional':![],'docs':{'tags':[],'text':''},'attribute':_0x11035d[_0x18e7da(0x1ad)],'reflect':![],'defaultValue':_0x11035d[_0x18e7da(0x192)]},'modalTitle':{'type':_0x11035d[_0x18e7da(0x1ba)],'mutable':![],'complexType':{'original':_0x18e7da(0x10e),'resolved':_0x11035d['QguRA'],'references':{}},'required':![],'optional':![],'docs':{'tags':[],'text':''},'attribute':_0x11035d['sTGFf'],'reflect':![],'defaultValue':_0x18e7da(0x185)},'modalTitleSuccess':{'type':_0x11035d['QguRA'],'mutable':![],'complexType':{'original':_0x18e7da(0x10e),'resolved':_0x18e7da(0x10e),'references':{}},'required':![],'optional':![],'docs':{'tags':[],'text':''},'attribute':_0x11035d['PONTj'],'reflect':![],'defaultValue':_0x11035d[_0x18e7da(0x1c1)]},'modalTitleError':{'type':_0x11035d['QguRA'],'mutable':![],'complexType':{'original':_0x18e7da(0x10e),'resolved':_0x18e7da(0x10e),'references':{}},'required':![],'optional':![],'docs':{'tags':[],'text':''},'attribute':_0x18e7da(0x1cf),'reflect':![],'defaultValue':_0x11035d['MbIfY']},'modalPosition':{'type':_0x18e7da(0x10e),'mutable':![],'complexType':{'original':_0x11035d['QguRA'],'resolved':_0x18e7da(0x10e),'references':{}},'required':![],'optional':![],'docs':{'tags':[],'text':''},'attribute':_0x11035d[_0x18e7da(0xb5)],'reflect':![],'defaultValue':_0x18e7da(0x189)},'sendButtonText':{'type':_0x11035d[_0x18e7da(0x1ba)],'mutable':![],'complexType':{'original':'string','resolved':_0x11035d['QguRA'],'references':{}},'required':![],'optional':![],'docs':{'tags':[],'text':''},'attribute':_0x11035d[_0x18e7da(0x135)],'reflect':![],'defaultValue':'\x27Send\x27'},'successMessage':{'type':_0x11035d[_0x18e7da(0x1ba)],'mutable':![],'complexType':{'original':_0x11035d[_0x18e7da(0x1ba)],'resolved':'string','references':{}},'required':![],'optional':![],'docs':{'tags':[],'text':''},'attribute':_0x11035d['pqqMz'],'reflect':![],'defaultValue':'\x22\x22'},'project':{'type':_0x11035d['QguRA'],'mutable':![],'complexType':{'original':_0x18e7da(0x10e),'resolved':'string','references':{}},'required':![],'optional':![],'docs':{'tags':[],'text':''},'attribute':'project','reflect':![],'defaultValue':'\x27\x27'},'screenshotButtonText':{'type':_0x11035d['QguRA'],'mutable':![],'complexType':{'original':_0x11035d[_0x18e7da(0x1ba)],'resolved':_0x11035d[_0x18e7da(0x1ba)],'references':{}},'required':![],'optional':![],'docs':{'tags':[],'text':''},'attribute':_0x11035d[_0x18e7da(0x128)],'reflect':![],'defaultValue':'\x27Add\x20a\x20screenshot\x27'},'screenshotTopbarText':{'type':_0x11035d[_0x18e7da(0x1ba)],'mutable':![],'complexType':{'original':_0x11035d[_0x18e7da(0x1ba)],'resolved':_0x11035d[_0x18e7da(0x1ba)],'references':{}},'required':![],'optional':![],'docs':{'tags':[],'text':''},'attribute':_0x11035d['oCoGk'],'reflect':![],'defaultValue':_0x11035d[_0x18e7da(0x17c)]},'hideEmail':{'type':_0x11035d[_0x18e7da(0x1b7)],'mutable':![],'complexType':{'original':_0x11035d[_0x18e7da(0x1b7)],'resolved':_0x11035d[_0x18e7da(0x1b7)],'references':{}},'required':![],'optional':![],'docs':{'tags':[],'text':''},'attribute':_0x18e7da(0x94),'reflect':![],'defaultValue':_0x11035d[_0x18e7da(0x95)]},'emailAddress':{'type':_0x11035d['QguRA'],'mutable':![],'complexType':{'original':_0x18e7da(0x10e),'resolved':_0x11035d['QguRA'],'references':{}},'required':![],'optional':![],'docs':{'tags':[],'text':''},'attribute':_0x11035d[_0x18e7da(0xbe)],'reflect':![],'defaultValue':'\x27\x27'},'emailPlaceholder':{'type':_0x11035d[_0x18e7da(0x1ba)],'mutable':![],'complexType':{'original':_0x18e7da(0x10e),'resolved':_0x11035d[_0x18e7da(0x1ba)],'references':{}},'required':![],'optional':![],'docs':{'tags':[],'text':''},'attribute':_0x11035d['vJdUD'],'reflect':![],'defaultValue':_0x18e7da(0xe4)},'messagePlaceholder':{'type':_0x11035d['QguRA'],'mutable':![],'complexType':{'original':_0x11035d[_0x18e7da(0x1ba)],'resolved':_0x18e7da(0x10e),'references':{}},'required':![],'optional':![],'docs':{'tags':[],'text':''},'attribute':_0x18e7da(0x152),'reflect':![],'defaultValue':_0x11035d[_0x18e7da(0xfd)]},'hideRating':{'type':_0x18e7da(0xe8),'mutable':![],'complexType':{'original':_0x11035d[_0x18e7da(0x1b7)],'resolved':_0x11035d[_0x18e7da(0x1b7)],'references':{}},'required':![],'optional':![],'docs':{'tags':[],'text':''},'attribute':_0x11035d['snLQv'],'reflect':![],'defaultValue':_0x11035d[_0x18e7da(0x95)]},'ratingPlaceholder':{'type':_0x11035d[_0x18e7da(0x1ba)],'mutable':![],'complexType':{'original':_0x11035d['QguRA'],'resolved':_0x11035d['QguRA'],'references':{}},'required':![],'optional':![],'docs':{'tags':[],'text':''},'attribute':_0x11035d['EylfX'],'reflect':![],'defaultValue':_0x11035d[_0x18e7da(0x111)]},'showModal':{'type':_0x11035d[_0x18e7da(0x1b7)],'mutable':!![],'complexType':{'original':_0x18e7da(0xe8),'resolved':_0x11035d[_0x18e7da(0x1b7)],'references':{}},'required':![],'optional':![],'docs':{'tags':[],'text':''},'attribute':_0x11035d[_0x18e7da(0xae)],'reflect':!![],'defaultValue':_0x11035d['RHesi']},'showScreenshotMode':{'type':_0x18e7da(0xe8),'mutable':!![],'complexType':{'original':_0x11035d['JmcwT'],'resolved':_0x11035d[_0x18e7da(0x1b7)],'references':{}},'required':![],'optional':![],'docs':{'tags':[],'text':''},'attribute':_0x11035d[_0x18e7da(0xfb)],'reflect':!![],'defaultValue':_0x18e7da(0x144)},'showScreenshotTopBar':{'type':_0x11035d[_0x18e7da(0x1b7)],'mutable':!![],'complexType':{'original':_0x11035d[_0x18e7da(0x1b7)],'resolved':_0x11035d[_0x18e7da(0x1b7)],'references':{}},'required':![],'optional':![],'docs':{'tags':[],'text':''},'attribute':_0x11035d[_0x18e7da(0x14c)],'reflect':!![],'defaultValue':_0x11035d[_0x18e7da(0x95)]},'hasSelectedElement':{'type':_0x11035d['JmcwT'],'mutable':!![],'complexType':{'original':_0x11035d[_0x18e7da(0x1b7)],'resolved':_0x11035d[_0x18e7da(0x1b7)],'references':{}},'required':![],'optional':![],'docs':{'tags':[],'text':''},'attribute':_0x11035d['ShMaB'],'reflect':!![],'defaultValue':_0x11035d[_0x18e7da(0x95)]},'hideScreenshotButton':{'type':_0x18e7da(0xe8),'mutable':![],'complexType':{'original':_0x11035d[_0x18e7da(0x1b7)],'resolved':_0x18e7da(0xe8),'references':{}},'required':![],'optional':![],'docs':{'tags':[],'text':''},'attribute':_0x18e7da(0xe7),'reflect':![],'defaultValue':_0x11035d[_0x18e7da(0x95)]},'hidePrivacyPolicy':{'type':_0x11035d[_0x18e7da(0x1b7)],'mutable':![],'complexType':{'original':_0x11035d['JmcwT'],'resolved':'boolean','references':{}},'required':![],'optional':![],'docs':{'tags':[],'text':''},'attribute':_0x11035d[_0x18e7da(0xc1)],'reflect':![],'defaultValue':_0x11035d[_0x18e7da(0x174)]},'privacyPolicyText':{'type':_0x11035d['QguRA'],'mutable':![],'complexType':{'original':_0x11035d[_0x18e7da(0x1ba)],'resolved':_0x11035d[_0x18e7da(0x1ba)],'references':{}},'required':![],'optional':![],'docs':{'tags':[],'text':''},'attribute':_0x11035d[_0x18e7da(0x1bb)],'reflect':![],'defaultValue':_0x11035d[_0x18e7da(0x1c6)]},'fetchData':{'type':_0x11035d['JmcwT'],'mutable':![],'complexType':{'original':_0x18e7da(0xe8),'resolved':_0x11035d[_0x18e7da(0x1b7)],'references':{}},'required':![],'optional':![],'docs':{'tags':[],'text':''},'attribute':_0x11035d[_0x18e7da(0x1cc)],'reflect':![],'defaultValue':_0x18e7da(0x106)}};}static get[_0x16809a(0x1ae)](){return{'sending':{},'formMessage':{},'formEmail':{},'formSuccess':{},'formError':{},'formErrorStatus':{},'encodedScreenshot':{},'isPrivacyChecked':{},'whitelabel':{},'selectedRating':{}};}}
1
+ import { h } from '@stencil/core';
2
+ import html2canvas from 'html2canvas';
3
+ export class FeedbackModal {
4
+ constructor() {
5
+ this.onScrollDebounced = () => {
6
+ clearTimeout(this.scrollTimeout);
7
+ this.scrollTimeout = setTimeout(() => {
8
+ document.documentElement.classList.remove('feedback-modal-screenshot-closing');
9
+ document.documentElement.style.top = "";
10
+ window.removeEventListener('scroll', this.onScrollDebounced);
11
+ }, 200);
12
+ };
13
+ this.handleSubmit = async (event) => {
14
+ event.preventDefault();
15
+ this.resetOverflow();
16
+ this.showScreenshotMode = false;
17
+ this.showScreenshotTopBar = false;
18
+ this.showModal = false;
19
+ this.sending = true;
20
+ try {
21
+ const res = await fetch('https://app.pushfeedback.com/api/feedback/', {
22
+ method: 'POST',
23
+ body: JSON.stringify({
24
+ url: window.location.href,
25
+ message: this.formMessage,
26
+ email: this.formEmail,
27
+ project: this.project,
28
+ screenshot: this.encodedScreenshot,
29
+ rating: this.selectedRating,
30
+ ratingMode: this.ratingMode,
31
+ }),
32
+ headers: {
33
+ 'Content-Type': 'application/json'
34
+ }
35
+ });
36
+ if (res.status === 201) {
37
+ this.formSuccess = true;
38
+ this.formError = false;
39
+ }
40
+ else {
41
+ this.formSuccess = false;
42
+ this.formError = true;
43
+ this.formErrorStatus = res.status;
44
+ }
45
+ }
46
+ catch (error) {
47
+ console.log(error);
48
+ this.formSuccess = false;
49
+ this.formError = true;
50
+ this.formErrorStatus = 500;
51
+ }
52
+ finally {
53
+ this.sending = false;
54
+ this.showModal = true;
55
+ }
56
+ };
57
+ this.close = () => {
58
+ this.sending = false;
59
+ this.showModal = false;
60
+ this.showScreenshotMode = false;
61
+ this.showScreenshotTopBar = false;
62
+ this.hasSelectedElement = false;
63
+ this.encodedScreenshot = null;
64
+ this.formSuccess = false;
65
+ this.formError = false;
66
+ this.formErrorStatus = 500;
67
+ this.formMessage = '';
68
+ this.formEmail = '';
69
+ this.resetOverflow();
70
+ };
71
+ this.openScreenShot = () => {
72
+ this.hasSelectedElement = false;
73
+ this.showModal = false;
74
+ this.showScreenshotMode = true;
75
+ this.showScreenshotTopBar = true;
76
+ this.encodedScreenshot = null;
77
+ if (window.innerWidth > document.documentElement.clientWidth) {
78
+ document.documentElement.classList.add('feedback-modal-screenshot-open--scroll');
79
+ }
80
+ const scrollY = window.scrollY;
81
+ document.documentElement.style.top = `-${scrollY}px`;
82
+ window.scrollTo(0, parseInt(document.documentElement.style.top || '0') * -1);
83
+ document.documentElement.classList.add('feedback-modal-screenshot-open');
84
+ };
85
+ this.closeScreenShot = () => {
86
+ this.showModal = false;
87
+ this.showScreenshotMode = false;
88
+ this.showScreenshotTopBar = false;
89
+ this.hasSelectedElement = false;
90
+ this.encodedScreenshot = null;
91
+ this.resetOverflow();
92
+ };
93
+ this.handleMouseOverScreenShot = (event) => {
94
+ event.preventDefault();
95
+ if (this.hasSelectedElement)
96
+ return;
97
+ const borderOffset = 2;
98
+ this.screenshotModal.style.display = 'none';
99
+ const elementUnder = document.elementFromPoint(event.clientX, event.clientY);
100
+ const rect = elementUnder.getBoundingClientRect();
101
+ this.screenshotModal.style.display = '';
102
+ // Get the bounding box of the element selected
103
+ this.elementSelected.style.position = "absolute";
104
+ this.elementSelected.style.left = `${rect.left}px`;
105
+ this.elementSelected.style.top = `${rect.top}px`;
106
+ this.elementSelected.style.width = `${rect.width}px`;
107
+ this.elementSelected.style.height = `${rect.height}px`;
108
+ this.elementSelected.classList.add('feedback-modal-element-hover');
109
+ // Set the background color of nonselected areas
110
+ // Top
111
+ this.topSide.style.position = "absolute";
112
+ this.topSide.style.left = `${rect.left}px`;
113
+ this.topSide.style.top = '0px';
114
+ this.topSide.style.width = `${rect.width + borderOffset}px`;
115
+ this.topSide.style.height = `${rect.top}px`;
116
+ this.topSide.style.backgroundColor = "rgba(0, 0, 0, 0.4)";
117
+ // Left
118
+ this.leftSide.style.position = "absolute";
119
+ this.leftSide.style.left = '0px';
120
+ this.leftSide.style.top = '0px';
121
+ this.leftSide.style.width = `${rect.left}px`;
122
+ this.leftSide.style.height = '100vh';
123
+ this.leftSide.style.backgroundColor = "rgba(0, 0, 0, 0.4)";
124
+ // Bottom
125
+ this.bottomSide.style.position = "absolute";
126
+ this.bottomSide.style.left = `${rect.left}px`;
127
+ this.bottomSide.style.top = `${rect.bottom + borderOffset}px`;
128
+ this.bottomSide.style.width = `${rect.width + borderOffset}px`;
129
+ this.bottomSide.style.height = '100vh';
130
+ this.bottomSide.style.backgroundColor = "rgba(0, 0, 0, 0.4)";
131
+ // Right
132
+ this.rightSide.style.position = "absolute";
133
+ this.rightSide.style.left = `${rect.right + borderOffset}px`;
134
+ ;
135
+ this.rightSide.style.top = '0px';
136
+ this.rightSide.style.width = '100%';
137
+ this.rightSide.style.height = '100vh';
138
+ this.rightSide.style.backgroundColor = "rgba(0, 0, 0, 0.4)";
139
+ // Restore the visibility of the screenshot-modal
140
+ this.screenshotModal.style.backgroundColor = 'transparent';
141
+ };
142
+ this.handleMouseClickedSelectedElement = async (event) => {
143
+ event.preventDefault();
144
+ if (!this.elementSelected) {
145
+ return;
146
+ }
147
+ this.hasSelectedElement = true;
148
+ this.elementSelected.classList.add('feedback-modal-element-selected');
149
+ // Get the top position including the scroll offset
150
+ const rectTop = this.elementSelected.getBoundingClientRect().top;
151
+ const topWithScroll = rectTop + window.scrollY;
152
+ // Move the element with the scroll offset
153
+ this.elementSelected.style.top = `${topWithScroll}px`;
154
+ // Clone the selected element and append it to the body
155
+ const clonedElementSelected = this.elementSelected.cloneNode(true);
156
+ document.body.appendChild(clonedElementSelected);
157
+ // Reset the top position of the original element
158
+ this.elementSelected.style.top = `${rectTop}px`;
159
+ this.showScreenshotTopBar = false;
160
+ this.showModal = false;
161
+ try {
162
+ const dataUrl = await this.captureScreenshot();
163
+ console.log('Screenshot captured');
164
+ this.encodedScreenshot = dataUrl;
165
+ }
166
+ catch (error) {
167
+ console.error('Failed to capture screenshot:', error);
168
+ this.hasSelectedElement = false;
169
+ }
170
+ finally {
171
+ // Remove the cloned element and show the modal again
172
+ document.body.removeChild(clonedElementSelected);
173
+ this.showModal = true;
174
+ }
175
+ };
176
+ this.sending = false;
177
+ this.formMessage = '';
178
+ this.formEmail = '';
179
+ this.formSuccess = false;
180
+ this.formError = false;
181
+ this.formErrorStatus = 500;
182
+ this.encodedScreenshot = undefined;
183
+ this.isPrivacyChecked = false;
184
+ this.whitelabel = false;
185
+ this.selectedRating = 0;
186
+ this.errorMessage = "Please try again later.";
187
+ this.errorMessage403 = "The request URL does not match the one defined in PushFeedback for this project.";
188
+ this.errorMessage404 = "We could not find the provided project ID in PushFeedback.";
189
+ this.modalTitle = 'Share your feedback';
190
+ this.modalTitleSuccess = 'Thanks for your feedback!';
191
+ this.modalTitleError = "Oops!";
192
+ this.modalPosition = 'center';
193
+ this.sendButtonText = 'Send';
194
+ this.successMessage = "";
195
+ this.project = '';
196
+ this.screenshotButtonText = 'Add a screenshot';
197
+ this.screenshotTopbarText = 'Select an element on this page';
198
+ this.hideEmail = false;
199
+ this.emailAddress = '';
200
+ this.emailPlaceholder = 'Email address (optional)';
201
+ this.messagePlaceholder = 'Comments';
202
+ this.hideRating = false;
203
+ this.ratingMode = 'thumbs';
204
+ this.ratingPlaceholder = 'Was this page helpful?';
205
+ this.ratingStarsPlaceholder = 'How would you rate this page?';
206
+ this.showModal = false;
207
+ this.showScreenshotMode = false;
208
+ this.showScreenshotTopBar = false;
209
+ this.hasSelectedElement = false;
210
+ this.hideScreenshotButton = false;
211
+ this.hidePrivacyPolicy = true;
212
+ this.privacyPolicyText = "I have read and expressly consent to the terms of the <a href='https://pushfeedback.com/privacy'>Privacy Policy</a>.";
213
+ this.fetchData = true;
214
+ }
215
+ componentWillLoad() {
216
+ if (this.fetchData)
217
+ this.fetchProjectData();
218
+ this.formEmail = this.emailAddress;
219
+ }
220
+ async fetchProjectData() {
221
+ try {
222
+ const response = await fetch('https://app.pushfeedback.com/api/projects/' + this.project + '/');
223
+ const data = await response.json();
224
+ this.whitelabel = data.whitelabel;
225
+ }
226
+ catch (error) {
227
+ console.log(error);
228
+ }
229
+ }
230
+ resetOverflow() {
231
+ document.documentElement.classList.remove('feedback-modal-screenshot-open');
232
+ document.documentElement.classList.remove('feedback-modal-screenshot-open--scroll');
233
+ document.documentElement.classList.add('feedback-modal-screenshot-closing');
234
+ window.scrollTo(0, parseInt(document.documentElement.style.top || '0') * -1);
235
+ window.addEventListener('scroll', this.onScrollDebounced);
236
+ }
237
+ handleMessageInput(event) {
238
+ this.formMessage = event.target.value;
239
+ }
240
+ handleEmailInput(event) {
241
+ this.formEmail = event.target.value;
242
+ }
243
+ captureScreenshot() {
244
+ return new Promise((resolve, reject) => {
245
+ requestAnimationFrame(() => {
246
+ html2canvas(document.body, {
247
+ x: window.scrollX,
248
+ y: window.scrollY,
249
+ width: window.innerWidth,
250
+ height: window.innerHeight,
251
+ }).then(canvas => {
252
+ const dataUrl = canvas.toDataURL();
253
+ resolve(dataUrl);
254
+ })
255
+ .catch(error => {
256
+ console.error(error);
257
+ reject(error);
258
+ });
259
+ });
260
+ });
261
+ }
262
+ handleCheckboxChange(event) {
263
+ this.isPrivacyChecked = event.target.checked;
264
+ }
265
+ handleRatingChange(newRating) {
266
+ this.selectedRating = newRating;
267
+ }
268
+ render() {
269
+ return (h("div", { class: 'feedback-modal-wrapper' }, this.showScreenshotMode && (h("div", { class: "feedback-modal-screenshot", ref: el => (this.screenshotModal = el), onMouseMove: this.handleMouseOverScreenShot }, h("div", { class: "feedback-modal-screenshot-element-selected", ref: el => (this.elementSelected = el), onClick: this.handleMouseClickedSelectedElement }), h("div", { class: "top-side", ref: el => (this.topSide = el) }), h("div", { class: "left-side", ref: el => (this.leftSide = el) }), h("div", { class: "bottom-side", ref: el => (this.bottomSide = el) }), h("div", { class: "right-side", ref: el => (this.rightSide = el) }), this.showScreenshotTopBar && (h("div", { class: "feedback-modal-screenshot-header", onClick: this.closeScreenShot }, h("span", null, this.screenshotTopbarText), h("span", { class: "feedback-modal-screenshot-close" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", stroke: "#191919", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "feather feather-x" }, h("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), h("line", { x1: "6", y1: "6", x2: "18", y2: "18" }))))))), this.showModal && (h("div", { class: "feedback-overlay" })), this.showModal && (h("div", { class: `feedback-modal-content feedback-modal-content--${this.modalPosition} ${this.showModal ? 'feedback-modal-content--open' : ''}`, ref: el => (this.modalContent = el) }, h("div", { class: "feedback-modal-header" }, !this.formSuccess && !this.formError ? (h("span", null, this.modalTitle)) : this.formSuccess ? (h("span", null, this.modalTitleSuccess)) : h("span", null, this.modalTitleError), h("button", { class: "feedback-modal-close", onClick: this.close }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", stroke: "#191919", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "feather feather-x" }, h("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), h("line", { x1: "6", y1: "6", x2: "18", y2: "18" })))), h("div", { class: "feedback-modal-body" }, !this.formSuccess && !this.formError ? (h("form", { onSubmit: this.handleSubmit }, !this.hideRating && (h("div", { class: "feedback-modal-rating" }, this.ratingMode === 'thumbs' ? (h("div", { class: "feedback-modal-rating-content" }, h("span", { class: "feedback-modal-input-heading" }, this.ratingPlaceholder), h("div", { class: "feedback-modal-rating-buttons feedback-modal-rating-buttons--thumbs" }, h("button", { title: "Yes", class: `feedback-modal-rating-button ${this.selectedRating === 1 ? 'feedback-modal-rating-button--selected' : ''}`, onClick: (event) => {
270
+ event.preventDefault();
271
+ this.handleRatingChange(1);
272
+ } }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "#5F6368", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("path", { d: "M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3" }))), h("button", { title: "No", class: `feedback-modal-rating-button ${this.selectedRating === 5 ? 'feedback-modal-rating-button--selected' : ''}`, onClick: (event) => {
273
+ event.preventDefault();
274
+ this.handleRatingChange(5);
275
+ } }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "#5F6368", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("path", { d: "M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h2.67A2.31 2.31 0 0 1 22 4v7a2.31 2.31 0 0 1-2.33 2H17" })))))) : (h("div", { class: "feedback-modal-rating-content" }, h("span", { class: "feedback-modal-input-heading" }, this.ratingStarsPlaceholder), h("div", { class: "feedback-modal-rating-buttons feedback-modal-rating-buttons--stars" }, [1, 2, 3, 4, 5].map((rating) => (h("button", { key: rating, class: `feedback-modal-rating-button ${this.selectedRating >= rating ? 'feedback-modal-rating-button--selected' : ''}`, onClick: (event) => {
276
+ event.preventDefault();
277
+ this.handleRatingChange(rating);
278
+ } }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "28", height: "28", viewBox: "0 0 24 24", fill: "none", stroke: "#5F6368", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("polygon", { points: "12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" })))))))))), h("div", { class: "feedback-modal-text" }, h("textarea", { placeholder: this.messagePlaceholder, value: this.formMessage, onInput: (event) => this.handleMessageInput(event) })), !this.hideEmail && (h("div", { class: "feedback-modal-email" }, h("input", { placeholder: this.emailPlaceholder, type: "email", onInput: (event) => this.handleEmailInput(event), value: this.formEmail }))), !this.hidePrivacyPolicy && (h("div", { class: "feedback-modal-privacy" }, h("input", { type: "checkbox", id: "privacyPolicy", onChange: (ev) => this.handleCheckboxChange(ev), required: true }), h("span", { innerHTML: this.privacyPolicyText }))), h("div", { class: `feedback-modal-buttons ${this.hideScreenshotButton ? 'single' : ''}` }, !this.hideScreenshotButton && (h("button", { type: "button", class: `feedback-modal-button feedback-modal-button--screenshot ${this.encodedScreenshot ? "feedback-modal-button--active" : ""}`, onClick: this.openScreenShot, disabled: this.sending }, h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24", viewBox: "0 -960 960 960", width: "24" }, h("path", { d: "M680-80v-120H560v-80h120v-120h80v120h120v80H760v120h-80ZM200-200v-200h80v120h120v80H200Zm0-360v-200h200v80H280v120h-80Zm480 0v-120H560v-80h200v200h-80Z" })), this.screenshotButtonText)), h("button", { class: "feedback-modal-button feedback-modal-button--submit", type: "submit", disabled: this.sending }, this.sendButtonText)))) : this.formSuccess && !this.formError ? (h("p", { class: "feedback-modal-message" }, this.successMessage)) : this.formError && this.formErrorStatus == 404 ? (h("p", { class: "feedback-modal-message" }, this.errorMessage404)) : this.formError && this.formErrorStatus == 403 ? (h("p", { class: "feedback-modal-message" }, this.errorMessage403)) : this.formError ? (h("p", { class: "feedback-modal-message" }, this.errorMessage)) : h("span", null)), h("div", { class: "feedback-modal-footer", style: { display: this.whitelabel ? 'none' : 'block' } }, h("div", { class: "feedback-logo" }, "Powered by ", h("a", { target: "_blank", href: "https://pushfeedback.com" }, "PushFeedback.com")))))));
279
+ }
280
+ static get is() { return "feedback-modal"; }
281
+ static get encapsulation() { return "shadow"; }
282
+ static get originalStyleUrls() {
283
+ return {
284
+ "$": ["feedback-modal.css"]
285
+ };
286
+ }
287
+ static get styleUrls() {
288
+ return {
289
+ "$": ["feedback-modal.css"]
290
+ };
291
+ }
292
+ static get properties() {
293
+ return {
294
+ "errorMessage": {
295
+ "type": "string",
296
+ "mutable": false,
297
+ "complexType": {
298
+ "original": "string",
299
+ "resolved": "string",
300
+ "references": {}
301
+ },
302
+ "required": false,
303
+ "optional": false,
304
+ "docs": {
305
+ "tags": [],
306
+ "text": ""
307
+ },
308
+ "attribute": "error-message",
309
+ "reflect": false,
310
+ "defaultValue": "\"Please try again later.\""
311
+ },
312
+ "errorMessage403": {
313
+ "type": "string",
314
+ "mutable": false,
315
+ "complexType": {
316
+ "original": "string",
317
+ "resolved": "string",
318
+ "references": {}
319
+ },
320
+ "required": false,
321
+ "optional": false,
322
+ "docs": {
323
+ "tags": [],
324
+ "text": ""
325
+ },
326
+ "attribute": "error-message-4-0-3",
327
+ "reflect": false,
328
+ "defaultValue": "\"The request URL does not match the one defined in PushFeedback for this project.\""
329
+ },
330
+ "errorMessage404": {
331
+ "type": "string",
332
+ "mutable": false,
333
+ "complexType": {
334
+ "original": "string",
335
+ "resolved": "string",
336
+ "references": {}
337
+ },
338
+ "required": false,
339
+ "optional": false,
340
+ "docs": {
341
+ "tags": [],
342
+ "text": ""
343
+ },
344
+ "attribute": "error-message-4-0-4",
345
+ "reflect": false,
346
+ "defaultValue": "\"We could not find the provided project ID in PushFeedback.\""
347
+ },
348
+ "modalTitle": {
349
+ "type": "string",
350
+ "mutable": false,
351
+ "complexType": {
352
+ "original": "string",
353
+ "resolved": "string",
354
+ "references": {}
355
+ },
356
+ "required": false,
357
+ "optional": false,
358
+ "docs": {
359
+ "tags": [],
360
+ "text": ""
361
+ },
362
+ "attribute": "modal-title",
363
+ "reflect": false,
364
+ "defaultValue": "'Share your feedback'"
365
+ },
366
+ "modalTitleSuccess": {
367
+ "type": "string",
368
+ "mutable": false,
369
+ "complexType": {
370
+ "original": "string",
371
+ "resolved": "string",
372
+ "references": {}
373
+ },
374
+ "required": false,
375
+ "optional": false,
376
+ "docs": {
377
+ "tags": [],
378
+ "text": ""
379
+ },
380
+ "attribute": "modal-title-success",
381
+ "reflect": false,
382
+ "defaultValue": "'Thanks for your feedback!'"
383
+ },
384
+ "modalTitleError": {
385
+ "type": "string",
386
+ "mutable": false,
387
+ "complexType": {
388
+ "original": "string",
389
+ "resolved": "string",
390
+ "references": {}
391
+ },
392
+ "required": false,
393
+ "optional": false,
394
+ "docs": {
395
+ "tags": [],
396
+ "text": ""
397
+ },
398
+ "attribute": "modal-title-error",
399
+ "reflect": false,
400
+ "defaultValue": "\"Oops!\""
401
+ },
402
+ "modalPosition": {
403
+ "type": "string",
404
+ "mutable": false,
405
+ "complexType": {
406
+ "original": "string",
407
+ "resolved": "string",
408
+ "references": {}
409
+ },
410
+ "required": false,
411
+ "optional": false,
412
+ "docs": {
413
+ "tags": [],
414
+ "text": ""
415
+ },
416
+ "attribute": "modal-position",
417
+ "reflect": false,
418
+ "defaultValue": "'center'"
419
+ },
420
+ "sendButtonText": {
421
+ "type": "string",
422
+ "mutable": false,
423
+ "complexType": {
424
+ "original": "string",
425
+ "resolved": "string",
426
+ "references": {}
427
+ },
428
+ "required": false,
429
+ "optional": false,
430
+ "docs": {
431
+ "tags": [],
432
+ "text": ""
433
+ },
434
+ "attribute": "send-button-text",
435
+ "reflect": false,
436
+ "defaultValue": "'Send'"
437
+ },
438
+ "successMessage": {
439
+ "type": "string",
440
+ "mutable": false,
441
+ "complexType": {
442
+ "original": "string",
443
+ "resolved": "string",
444
+ "references": {}
445
+ },
446
+ "required": false,
447
+ "optional": false,
448
+ "docs": {
449
+ "tags": [],
450
+ "text": ""
451
+ },
452
+ "attribute": "success-message",
453
+ "reflect": false,
454
+ "defaultValue": "\"\""
455
+ },
456
+ "project": {
457
+ "type": "string",
458
+ "mutable": false,
459
+ "complexType": {
460
+ "original": "string",
461
+ "resolved": "string",
462
+ "references": {}
463
+ },
464
+ "required": false,
465
+ "optional": false,
466
+ "docs": {
467
+ "tags": [],
468
+ "text": ""
469
+ },
470
+ "attribute": "project",
471
+ "reflect": false,
472
+ "defaultValue": "''"
473
+ },
474
+ "screenshotButtonText": {
475
+ "type": "string",
476
+ "mutable": false,
477
+ "complexType": {
478
+ "original": "string",
479
+ "resolved": "string",
480
+ "references": {}
481
+ },
482
+ "required": false,
483
+ "optional": false,
484
+ "docs": {
485
+ "tags": [],
486
+ "text": ""
487
+ },
488
+ "attribute": "screenshot-button-text",
489
+ "reflect": false,
490
+ "defaultValue": "'Add a screenshot'"
491
+ },
492
+ "screenshotTopbarText": {
493
+ "type": "string",
494
+ "mutable": false,
495
+ "complexType": {
496
+ "original": "string",
497
+ "resolved": "string",
498
+ "references": {}
499
+ },
500
+ "required": false,
501
+ "optional": false,
502
+ "docs": {
503
+ "tags": [],
504
+ "text": ""
505
+ },
506
+ "attribute": "screenshot-topbar-text",
507
+ "reflect": false,
508
+ "defaultValue": "'Select an element on this page'"
509
+ },
510
+ "hideEmail": {
511
+ "type": "boolean",
512
+ "mutable": false,
513
+ "complexType": {
514
+ "original": "boolean",
515
+ "resolved": "boolean",
516
+ "references": {}
517
+ },
518
+ "required": false,
519
+ "optional": false,
520
+ "docs": {
521
+ "tags": [],
522
+ "text": ""
523
+ },
524
+ "attribute": "hide-email",
525
+ "reflect": false,
526
+ "defaultValue": "false"
527
+ },
528
+ "emailAddress": {
529
+ "type": "string",
530
+ "mutable": false,
531
+ "complexType": {
532
+ "original": "string",
533
+ "resolved": "string",
534
+ "references": {}
535
+ },
536
+ "required": false,
537
+ "optional": false,
538
+ "docs": {
539
+ "tags": [],
540
+ "text": ""
541
+ },
542
+ "attribute": "email-address",
543
+ "reflect": false,
544
+ "defaultValue": "''"
545
+ },
546
+ "emailPlaceholder": {
547
+ "type": "string",
548
+ "mutable": false,
549
+ "complexType": {
550
+ "original": "string",
551
+ "resolved": "string",
552
+ "references": {}
553
+ },
554
+ "required": false,
555
+ "optional": false,
556
+ "docs": {
557
+ "tags": [],
558
+ "text": ""
559
+ },
560
+ "attribute": "email-placeholder",
561
+ "reflect": false,
562
+ "defaultValue": "'Email address (optional)'"
563
+ },
564
+ "messagePlaceholder": {
565
+ "type": "string",
566
+ "mutable": false,
567
+ "complexType": {
568
+ "original": "string",
569
+ "resolved": "string",
570
+ "references": {}
571
+ },
572
+ "required": false,
573
+ "optional": false,
574
+ "docs": {
575
+ "tags": [],
576
+ "text": ""
577
+ },
578
+ "attribute": "message-placeholder",
579
+ "reflect": false,
580
+ "defaultValue": "'Comments'"
581
+ },
582
+ "hideRating": {
583
+ "type": "boolean",
584
+ "mutable": false,
585
+ "complexType": {
586
+ "original": "boolean",
587
+ "resolved": "boolean",
588
+ "references": {}
589
+ },
590
+ "required": false,
591
+ "optional": false,
592
+ "docs": {
593
+ "tags": [],
594
+ "text": ""
595
+ },
596
+ "attribute": "hide-rating",
597
+ "reflect": false,
598
+ "defaultValue": "false"
599
+ },
600
+ "ratingMode": {
601
+ "type": "string",
602
+ "mutable": false,
603
+ "complexType": {
604
+ "original": "string",
605
+ "resolved": "string",
606
+ "references": {}
607
+ },
608
+ "required": false,
609
+ "optional": false,
610
+ "docs": {
611
+ "tags": [],
612
+ "text": ""
613
+ },
614
+ "attribute": "rating-mode",
615
+ "reflect": false,
616
+ "defaultValue": "'thumbs'"
617
+ },
618
+ "ratingPlaceholder": {
619
+ "type": "string",
620
+ "mutable": false,
621
+ "complexType": {
622
+ "original": "string",
623
+ "resolved": "string",
624
+ "references": {}
625
+ },
626
+ "required": false,
627
+ "optional": false,
628
+ "docs": {
629
+ "tags": [],
630
+ "text": ""
631
+ },
632
+ "attribute": "rating-placeholder",
633
+ "reflect": false,
634
+ "defaultValue": "'Was this page helpful?'"
635
+ },
636
+ "ratingStarsPlaceholder": {
637
+ "type": "string",
638
+ "mutable": false,
639
+ "complexType": {
640
+ "original": "string",
641
+ "resolved": "string",
642
+ "references": {}
643
+ },
644
+ "required": false,
645
+ "optional": false,
646
+ "docs": {
647
+ "tags": [],
648
+ "text": ""
649
+ },
650
+ "attribute": "rating-stars-placeholder",
651
+ "reflect": false,
652
+ "defaultValue": "'How would you rate this page?'"
653
+ },
654
+ "showModal": {
655
+ "type": "boolean",
656
+ "mutable": true,
657
+ "complexType": {
658
+ "original": "boolean",
659
+ "resolved": "boolean",
660
+ "references": {}
661
+ },
662
+ "required": false,
663
+ "optional": false,
664
+ "docs": {
665
+ "tags": [],
666
+ "text": ""
667
+ },
668
+ "attribute": "show-modal",
669
+ "reflect": true,
670
+ "defaultValue": "false"
671
+ },
672
+ "showScreenshotMode": {
673
+ "type": "boolean",
674
+ "mutable": true,
675
+ "complexType": {
676
+ "original": "boolean",
677
+ "resolved": "boolean",
678
+ "references": {}
679
+ },
680
+ "required": false,
681
+ "optional": false,
682
+ "docs": {
683
+ "tags": [],
684
+ "text": ""
685
+ },
686
+ "attribute": "show-screenshot-mode",
687
+ "reflect": true,
688
+ "defaultValue": "false"
689
+ },
690
+ "showScreenshotTopBar": {
691
+ "type": "boolean",
692
+ "mutable": true,
693
+ "complexType": {
694
+ "original": "boolean",
695
+ "resolved": "boolean",
696
+ "references": {}
697
+ },
698
+ "required": false,
699
+ "optional": false,
700
+ "docs": {
701
+ "tags": [],
702
+ "text": ""
703
+ },
704
+ "attribute": "show-screenshot-top-bar",
705
+ "reflect": true,
706
+ "defaultValue": "false"
707
+ },
708
+ "hasSelectedElement": {
709
+ "type": "boolean",
710
+ "mutable": true,
711
+ "complexType": {
712
+ "original": "boolean",
713
+ "resolved": "boolean",
714
+ "references": {}
715
+ },
716
+ "required": false,
717
+ "optional": false,
718
+ "docs": {
719
+ "tags": [],
720
+ "text": ""
721
+ },
722
+ "attribute": "has-selected-element",
723
+ "reflect": true,
724
+ "defaultValue": "false"
725
+ },
726
+ "hideScreenshotButton": {
727
+ "type": "boolean",
728
+ "mutable": false,
729
+ "complexType": {
730
+ "original": "boolean",
731
+ "resolved": "boolean",
732
+ "references": {}
733
+ },
734
+ "required": false,
735
+ "optional": false,
736
+ "docs": {
737
+ "tags": [],
738
+ "text": ""
739
+ },
740
+ "attribute": "hide-screenshot-button",
741
+ "reflect": false,
742
+ "defaultValue": "false"
743
+ },
744
+ "hidePrivacyPolicy": {
745
+ "type": "boolean",
746
+ "mutable": false,
747
+ "complexType": {
748
+ "original": "boolean",
749
+ "resolved": "boolean",
750
+ "references": {}
751
+ },
752
+ "required": false,
753
+ "optional": false,
754
+ "docs": {
755
+ "tags": [],
756
+ "text": ""
757
+ },
758
+ "attribute": "hide-privacy-policy",
759
+ "reflect": false,
760
+ "defaultValue": "true"
761
+ },
762
+ "privacyPolicyText": {
763
+ "type": "string",
764
+ "mutable": false,
765
+ "complexType": {
766
+ "original": "string",
767
+ "resolved": "string",
768
+ "references": {}
769
+ },
770
+ "required": false,
771
+ "optional": false,
772
+ "docs": {
773
+ "tags": [],
774
+ "text": ""
775
+ },
776
+ "attribute": "privacy-policy-text",
777
+ "reflect": false,
778
+ "defaultValue": "\"I have read and expressly consent to the terms of the <a href='https://pushfeedback.com/privacy'>Privacy Policy</a>.\""
779
+ },
780
+ "fetchData": {
781
+ "type": "boolean",
782
+ "mutable": false,
783
+ "complexType": {
784
+ "original": "boolean",
785
+ "resolved": "boolean",
786
+ "references": {}
787
+ },
788
+ "required": false,
789
+ "optional": false,
790
+ "docs": {
791
+ "tags": [],
792
+ "text": ""
793
+ },
794
+ "attribute": "fetch-data",
795
+ "reflect": false,
796
+ "defaultValue": "true"
797
+ }
798
+ };
799
+ }
800
+ static get states() {
801
+ return {
802
+ "sending": {},
803
+ "formMessage": {},
804
+ "formEmail": {},
805
+ "formSuccess": {},
806
+ "formError": {},
807
+ "formErrorStatus": {},
808
+ "encodedScreenshot": {},
809
+ "isPrivacyChecked": {},
810
+ "whitelabel": {},
811
+ "selectedRating": {}
812
+ };
813
+ }
814
+ }