const _0x2a4df9=_0x17da;function _0x4c44(){const _0x2c437a=['hasAttribute','replace','length','12357415dtViqf','8221040DdNWRk','querySelectorAll','formFields','pathname','1260510YFpHCu','catch','name','then','getAttribute','form','https://us-central1-formstory-394609.cloudfunctions.net/fstory-script','input:not([type=\x22hidden\x22]),\x20select,\x20button,\x20textarea,\x20option,\x20optgroup,\x20fieldset,\x20output',';domain=.','value','16485rvMQYd','every','871330iZXnLN','4McYQap','filter','216.73.216.187','fstory_session_','uuid','push','preventDefault','password','endsWith','now','elements','random','DOMContentLoaded','map','startsWith','750gGpixc','cookie','toUTCString','trim','data','type','hidden',';\x20expires=Thu,\x2001\x20Jan\x201970\x2000:00:00\x20UTC;\x20path=/;','6235c822-6a02-40a8-8f0c-22562b125590','Network\x20response\x20was\x20not\x20ok','https://t.formstory.io','from','split','1275321jRRAEN','required','reverse','GET','5594454MBMRsl','error','index','click','getTime',';\x20expires=','application/json','change','find','setTime','stringify','addEventListener',';\x20path=/','json','=;\x20domain=.','POST','load','[type=\x22submit\x22]','querySelector','success','location','hostname','formElements','toString'];_0x4c44=function(){return _0x2c437a;};return _0x4c44();}(function(_0x49c7c2,_0x1d6059){const _0x5d53fb=_0x17da,_0x354df1=_0x49c7c2();while(!![]){try{const _0x2d46a8=parseInt(_0x5d53fb(0xfb))/0x1+-parseInt(_0x5d53fb(0xef))/0x2+parseInt(_0x5d53fb(0xcb))/0x3*(parseInt(_0x5d53fb(0xfc))/0x4)+parseInt(_0x5d53fb(0xf9))/0x5*(parseInt(_0x5d53fb(0x10b))/0x6)+-parseInt(_0x5d53fb(0xea))/0x7+parseInt(_0x5d53fb(0xeb))/0x8+parseInt(_0x5d53fb(0xcf))/0x9;if(_0x2d46a8===_0x1d6059)break;else _0x354df1['push'](_0x354df1['shift']());}catch(_0x1cd9e3){_0x354df1['push'](_0x354df1['shift']());}}}(_0x4c44,0xeae96));const projectId=_0x2a4df9(0x113),trackingUrl=_0x2a4df9(0xf5),scriptUrl=_0x2a4df9(0x115),clientIP=_0x2a4df9(0xfe);let currentPath=window[_0x2a4df9(0xe3)][_0x2a4df9(0xee)],host=window[_0x2a4df9(0xe3)][_0x2a4df9(0xe4)];currentPath[_0x2a4df9(0x104)]('/')&¤tPath['length']>0x1&&(currentPath=currentPath['slice'](0x0,-0x1));currentPath=currentPath[_0x2a4df9(0xe8)](/\//g,'_');const sendData=_0x1e2f6c=>{const _0x9ccdcb=_0x2a4df9;fetch(trackingUrl,{'method':_0x9ccdcb(0xde),'headers':{'Content-Type':_0x9ccdcb(0xd5)},'body':JSON[_0x9ccdcb(0xd9)](_0x1e2f6c)})['then'](_0x4e54e6=>{const _0x63544b=_0x9ccdcb;if(!_0x4e54e6['ok'])throw new Error(_0x63544b(0x114));})[_0x9ccdcb(0xf0)](_0xc51331=>{const _0xfecd89=_0x9ccdcb;console[_0xfecd89(0xd0)](_0xc51331);});},addFormFields=(_0xd2f83f,_0x1dacea)=>{const _0x2c5e4b=_0x2a4df9;let _0x2ec584=_0xd2f83f[_0x2c5e4b(0x106)],_0x4dfad9={};for(let _0x145e41=0x0;_0x145e41<_0x2ec584['length'];_0x145e41++){let _0x50fd3d=_0x2ec584[_0x145e41],_0x43c801=_0x50fd3d[_0x2c5e4b(0xf1)]!==''?_0x50fd3d[_0x2c5e4b(0xf1)]:_0x50fd3d['id'];if(_0x50fd3d[_0x2c5e4b(0x110)]===_0x2c5e4b(0x111)||_0x50fd3d[_0x2c5e4b(0x110)]===_0x2c5e4b(0x103)||_0x43c801==='')continue;if(_0x43c801[_0x2c5e4b(0x104)]('[]')){let _0x588359=_0x43c801['slice'](0x0,-0x2),_0x42e493=_0x50fd3d['value']||'';!_0x4dfad9[_0x588359]?_0x4dfad9[_0x588359]={'label':_0x588359,'value':_0x42e493}:_0x4dfad9[_0x588359]['value']+=_0x42e493[_0x2c5e4b(0xe9)]>0x0?',\x20'+_0x42e493:'';}else _0x1dacea[_0x2c5e4b(0x10f)][_0x2c5e4b(0x101)]({'label':_0x43c801,'value':_0x50fd3d['value']||''});}for(let _0x21004e in _0x4dfad9){_0x1dacea[_0x2c5e4b(0x10f)][_0x2c5e4b(0x101)](_0x4dfad9[_0x21004e]);}},handleFormSubmit=(_0x55600f,_0x4397bb,_0x27f9e0)=>{const _0x17bc99=_0x2a4df9,_0x211244=getCookieValue(_0x17bc99(0xff)+_0x27f9e0);let _0x37c034={'projectId':projectId,'jobId':_0x4397bb,'uuid':_0x211244,'data':[],'timestamp':Date['now'](),'ip':clientIP,'event_type':'submit'};addFormFields(_0x55600f,_0x37c034),sendData(_0x37c034);},handleFormChange=(_0x134ff8,_0x458c0b,_0x166c8a)=>_0x410adf=>{const _0x23fe5a=_0x2a4df9;_0x410adf[_0x23fe5a(0x102)]();const _0x28b720=getCookieValue(_0x23fe5a(0xff)+_0x166c8a),_0x32cd05={'projectId':projectId,'jobId':_0x458c0b,'uuid':_0x28b720,'timestamp':Date['now'](),'data':[],'ip':clientIP,'event_type':_0x23fe5a(0xd6)};addFormFields(_0x134ff8,_0x32cd05),sendData(_0x32cd05);};function fetchData(){const _0x2c2b53=_0x2a4df9;return fetch(scriptUrl+'/projects/'+projectId+'/'+currentPath,{'method':_0x2c2b53(0xce),'headers':{'Content-Type':'application/json'}})['then'](_0x2e3e19=>{const _0x587e48=_0x2c2b53;if(!_0x2e3e19['ok'])return _0x2e3e19[_0x587e48(0xdc)]();return _0x2e3e19['json']();})[_0x2c2b53(0xf2)](_0x1f6e4b=>{return _0x1f6e4b;})[_0x2c2b53(0xf0)](_0x3baa66=>{return{'success':![],'message':_0x3baa66['message']};});}function setCookie(_0x2c6360,_0x172226,_0x262f09){const _0x2d8cbc=_0x2a4df9;let _0x1000e3=_0x2c6360+'='+encodeURIComponent(_0x172226);document[_0x2d8cbc(0x10c)]=_0x1000e3+_0x2d8cbc(0xf7)+getRootDomain()+_0x2d8cbc(0xd4)+_0x262f09[_0x2d8cbc(0x10d)]()+_0x2d8cbc(0xdb);}function getCookieValue(_0xb04a0){const _0x3d8116=_0x2a4df9,_0x3b04d4=document[_0x3d8116(0x10c)]['split'](';'),_0x1c8ae5=_0x3b04d4[_0x3d8116(0xd7)](function(_0x27fc7b){const _0x56bc76=_0x3d8116;return _0x27fc7b[_0x56bc76(0x10e)]()[_0x56bc76(0x10a)](_0xb04a0+'=');});if(_0x1c8ae5)return decodeURIComponent(_0x1c8ae5[_0x3d8116(0xca)]('=')[0x1]);return null;}function deleteCookie(_0x543f79){const _0x613c8a=_0x2a4df9;document['cookie']=_0x543f79+_0x613c8a(0xdd)+getRootDomain()+_0x613c8a(0x112);}function getRootDomain(){const _0x49f0bc=_0x2a4df9,_0x4a9264=host['split']('.')[_0x49f0bc(0xcd)]();return _0x4a9264[0x1]+'.'+_0x4a9264[0x0];}const formElements=[_0x2a4df9(0xf6)];function encodeBase64(_0x2fd7b5){return btoa(unescape(encodeURIComponent(_0x2fd7b5)));}function identicalForms(_0x1ef916,_0x13f38b){const _0x12ff91=_0x2a4df9,_0x2b884b=_0x1ef916[_0x12ff91(0xec)](formElements),_0x5467ce=Array[_0x12ff91(0xc9)](_0x2b884b)[_0x12ff91(0x109)](_0x3727a9=>{const _0x39c158=_0x12ff91;if(_0x3727a9[_0x39c158(0xe7)](_0x39c158(0xf1))){let _0x416969=_0x3727a9[_0x39c158(0xf3)](_0x39c158(0xf1));return _0x416969['endsWith']('[]')&&(_0x416969=_0x416969['slice'](0x0,-0x2)),_0x416969;}return null;})[_0x12ff91(0xfd)](Boolean);return _0x13f38b[_0x12ff91(0xfa)](_0x1e77e4=>_0x5467ce['includes'](_0x1e77e4));}function _0x17da(_0x4de5b9,_0x46dc14){const _0x4c444e=_0x4c44();return _0x17da=function(_0x17da4b,_0x136a5e){_0x17da4b=_0x17da4b-0xc9;let _0x19c856=_0x4c444e[_0x17da4b];return _0x19c856;},_0x17da(_0x4de5b9,_0x46dc14);}function generateUUID(){const _0x451588=_0x2a4df9;return'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'[_0x451588(0xe8)](/[xy]/g,function(_0x1fbc5f){const _0x5a7c9f=_0x451588;var _0xb3df81=Math[_0x5a7c9f(0x107)]()*0x10|0x0,_0x4810e1=_0x1fbc5f==='x'?_0xb3df81:_0xb3df81&0x3|0x8;return _0x4810e1[_0x5a7c9f(0xe6)](0x10);});}document[_0x2a4df9(0xda)](_0x2a4df9(0x108),function(){const _0xf2ddb5=_0x2a4df9;fetchData()[_0xf2ddb5(0xf2)](_0x3eff3f=>{const _0xa0af01=_0xf2ddb5;_0x3eff3f[_0xa0af01(0xe2)]&&(_0x3eff3f&&_0x3eff3f[_0xa0af01(0x10f)]&&_0x3eff3f[_0xa0af01(0x10f)][_0xa0af01(0x109)]((_0xcb145a,_0x146b01)=>{const _0x18c708=_0xa0af01;let _0x51efb7=generateUUID(),_0x34f0fa=getCookieValue(_0x18c708(0xff)+_0x146b01);if(!_0x34f0fa){const _0xe7a043=new Date();_0xe7a043['setTime'](_0xe7a043[_0x18c708(0xd3)]()+0xf*0x3c*0x3e8),setCookie(_0x18c708(0xff)+_0x146b01,_0x51efb7,_0xe7a043),_0x34f0fa=_0x51efb7;}const _0x4afd04=_0xcb145a[_0x18c708(0xed)],_0x21d2f0=_0xcb145a[_0x18c708(0xe5)][_0x18c708(0xd1)],_0x5a7fc8=document[_0x18c708(0xec)](_0x18c708(0xf4)),_0x5c7eec=_0x5a7fc8[_0x21d2f0];if(identicalForms(_0x5c7eec,_0x4afd04)){const _0x36304a={'timestamp':Date[_0x18c708(0x105)](),'projectId':projectId,'jobId':_0xcb145a['uuid'],'uuid':_0x34f0fa,'data':[],'ip':clientIP,'event_type':_0x18c708(0xdf)};sendData(_0x36304a),_0x5c7eec[_0x18c708(0xda)](_0x18c708(0xd6),handleFormChange(_0x5c7eec,_0xcb145a[_0x18c708(0x100)],_0x146b01));const _0x33c8b4=_0x5c7eec[_0x18c708(0xe1)](_0x18c708(0xe0));_0x33c8b4['addEventListener'](_0x18c708(0xd2),_0x5d5bd2=>{const _0x5c33d1=_0x18c708,_0x432766=_0x5c7eec[_0x5c33d1(0x106)];let _0x2596e0=!![];for(let _0x4665ee=0x0;_0x4665ee<_0x432766[_0x5c33d1(0xe9)];_0x4665ee++){_0x432766[_0x4665ee][_0x5c33d1(0xe7)](_0x5c33d1(0xcc))&&!_0x432766[_0x4665ee][_0x5c33d1(0xf8)]&&(_0x2596e0=![]);}if(_0x2596e0){handleFormSubmit(_0x5c7eec,_0xcb145a[_0x5c33d1(0x100)],_0x146b01),deleteCookie('fstory_session_'+_0x146b01);const _0x403fb2=generateUUID(),_0x4e209f=new Date();_0x4e209f[_0x5c33d1(0xd8)](_0x4e209f[_0x5c33d1(0xd3)]()+0xf*0x3c*0x3e8),setCookie(_0x5c33d1(0xff)+_0x146b01,_0x403fb2,_0x4e209f);}});}}));});});