posthog-js
Advanced tools
Comparing version 1.205.0 to 1.205.1
@@ -1,2 +0,2 @@ | ||
!function(){"use strict";var e="undefined"!=typeof window?window:void 0,r="undefined"!=typeof globalThis?globalThis:e,n=Array.prototype.forEach,t=null==r?void 0:r.navigator,i=null==r?void 0:r.document,o=null==r?void 0:r.location;null==r||r.fetch,null!=r&&r.XMLHttpRequest&&"withCredentials"in new r.XMLHttpRequest&&r.XMLHttpRequest,null==r||r.AbortController;var a,s=null==t?void 0:t.userAgent,l=null!=e?e:{};function u(e,r){return-1!==e.indexOf(r)}!function(e){e.GZipJS="gzip-js",e.Base64="base64"}(a||(a={}));var c=function(e){return e.replace(/^\$/,"")},p=Array.isArray,f=Object.prototype,d=f.hasOwnProperty,g=f.toString,v=p||function(e){return"[object Array]"===g.call(e)},h=e=>void 0===e,w=e=>null===e,_=e=>"[object Number]"==g.call(e),m={DEBUG:!1,LIB_VERSION:"1.205.0"},b=r=>{var n={_log:function(n){if(e&&l.POSTHOG_DEBUG&&!h(e.console)&&e.console){for(var t=("__rrweb_original__"in e.console[n]?e.console[n].__rrweb_original__:e.console[n]),i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];t(r,...o)}},info:function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];n._log("log",...r)},warn:function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];n._log("warn",...r)},error:function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];n._log("error",...r)},critical:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];console.error(r,...n)},uninitializedWarning:e=>{n.error("You must initialize PostHog before calling ".concat(e))},createLogger:e=>b("".concat(r," ").concat(e))};return n},$=b("[PostHog.js]"),y={};function E(e,r,t){if(v(e))if(n&&e.forEach===n)e.forEach(r,t);else if("length"in e&&e.length===+e.length)for(var i=0,o=e.length;i<o;i++)if(i in e&&r.call(t,e[i],i)===y)return}function P(e,r,n){if(!h(t=e)&&!w(t)){var t;if(v(e))return E(e,r,n);if((e=>e instanceof FormData)(e)){for(var i of e.entries())if(r.call(n,i[1],i[0])===y)return}else for(var o in e)if(d.call(e,o)&&r.call(n,e[o],o)===y)return}}var x=function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),t=1;t<r;t++)n[t-1]=arguments[t];return E(n,(function(r){for(var n in r)void 0!==r[n]&&(e[n]=r[n])})),e},O=function(e){var r={};return P(e,(function(e,n){var t;t=e,"[object String]"==g.call(t)&&e.length>0&&(r[n]=e)})),r},R=e=>{var r=null==i?void 0:i.createElement("a");return h(r)?null:(r.href=e,r)},S=function(e,r){for(var n,t=((e.split("#")[0]||"").split("?")[1]||"").split("&"),i=0;i<t.length;i++){var o=t[i].split("=");if(o[0]===r){n=o;break}}if(!v(n)||n.length<2)return"";var a=n[1];try{a=decodeURIComponent(a)}catch(e){$.error("Skipping decoding for malformed query param: "+a)}return a.replace(/\+/g," ")},B="Mobile",I="iOS",A="Android",k="Tablet",j=A+" "+k,C="iPad",M="Apple",F=M+" Watch",T="Safari",D="BlackBerry",L="Samsung",z=L+"Browser",U=L+" Internet",W="Chrome",N=W+" OS",H=W+" "+I,X="Internet Explorer",V=X+" "+B,q="Opera",G=q+" Mini",K="Edge",Z="Microsoft "+K,Q="Firefox",J=Q+" "+I,Y="Nintendo",ee="PlayStation",re="Xbox",ne=A+" "+B,te=B+" "+T,ie="Windows",oe=ie+" Phone",ae="Nokia",se="Ouya",le="Generic",ue=le+" "+B.toLowerCase(),ce=le+" "+k.toLowerCase(),pe="Konqueror",fe="(\\d+(\\.\\d+)?)",de=new RegExp("Version/"+fe),ge=new RegExp(re,"i"),ve=new RegExp(ee+" \\w+","i"),he=new RegExp(Y+" \\w+","i"),we=new RegExp(D+"|PlayBook|BB10","i"),_e={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"};var me=(e,r)=>r&&u(r,M)||function(e){return u(e,T)&&!u(e,W)&&!u(e,A)}(e),be=function(e,r){return r=r||"",u(e," OPR/")&&u(e,"Mini")?G:u(e," OPR/")?q:we.test(e)?D:u(e,"IE"+B)||u(e,"WPDesktop")?V:u(e,z)?U:u(e,K)||u(e,"Edg/")?Z:u(e,"FBIOS")?"Facebook "+B:u(e,"UCWEB")||u(e,"UCBrowser")?"UC Browser":u(e,"CriOS")?H:u(e,"CrMo")||u(e,W)?W:u(e,A)&&u(e,T)?ne:u(e,"FxiOS")?J:u(e.toLowerCase(),pe.toLowerCase())?pe:me(e,r)?u(e,B)?te:T:u(e,Q)?Q:u(e,"MSIE")||u(e,"Trident/")?X:u(e,"Gecko")?Q:""},$e={[V]:[new RegExp("rv:"+fe)],[Z]:[new RegExp(K+"?\\/"+fe)],[W]:[new RegExp("("+W+"|CrMo)\\/"+fe)],[H]:[new RegExp("CriOS\\/"+fe)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+fe)],[T]:[de],[te]:[de],[q]:[new RegExp("(Opera|OPR)\\/"+fe)],[Q]:[new RegExp(Q+"\\/"+fe)],[J]:[new RegExp("FxiOS\\/"+fe)],[pe]:[new RegExp("Konqueror[:/]?"+fe,"i")],[D]:[new RegExp(D+" "+fe),de],[ne]:[new RegExp("android\\s"+fe,"i")],[U]:[new RegExp(z+"\\/"+fe)],[X]:[new RegExp("(rv:|MSIE )"+fe)],Mozilla:[new RegExp("rv:"+fe)]},ye=[[new RegExp(re+"; "+re+" (.*?)[);]","i"),e=>[re,e&&e[1]||""]],[new RegExp(Y,"i"),[Y,""]],[new RegExp(ee,"i"),[ee,""]],[we,[D,""]],[new RegExp(ie,"i"),(e,r)=>{if(/Phone/.test(r)||/WPDesktop/.test(r))return[oe,""];if(new RegExp(B).test(r)&&!/IEMobile\b/.test(r))return[ie+" "+B,""];var n=/Windows NT ([0-9.]+)/i.exec(r);if(n&&n[1]){var t=n[1],i=_e[t]||"";return/arm/i.test(r)&&(i="RT"),[ie,i]}return[ie,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>{if(e&&e[3]){var r=[e[3],e[4],e[5]||"0"];return[I,r.join(".")]}return[I,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var r="";return e&&e.length>=3&&(r=h(e[2])?e[3]:e[2]),["watchOS",r]}],[new RegExp("("+A+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+A+")","i"),e=>{if(e&&e[2]){var r=[e[2],e[3],e[4]||"0"];return[A,r.join(".")]}return[A,""]}],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{var r=["Mac OS X",""];if(e&&e[1]){var n=[e[1],e[2],e[3]||"0"];r[1]=n.join(".")}return r}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[N,""]],[/Linux|debian/i,["Linux",""]]],Ee=function(e){return he.test(e)?Y:ve.test(e)?ee:ge.test(e)?re:new RegExp(se,"i").test(e)?se:new RegExp("("+oe+"|WPDesktop)","i").test(e)?oe:/iPad/.test(e)?C:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?F:we.test(e)?D:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(ae,"i").test(e)?ae:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(e)||/(kf[a-z]+)( bui|\)).+silk\//i.test(e)?"Kindle Fire":/(Android|ZTE)/i.test(e)?!new RegExp(B).test(e)||/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(e)?/pixel[\daxl ]{1,6}/i.test(e)&&!/pixel c/i.test(e)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(e)||/lmy47v/i.test(e)&&!/QTAQZ3/i.test(e)?A:j:A:new RegExp("(pda|"+B+")","i").test(e)?ue:new RegExp(k,"i").test(e)&&!new RegExp(k+" pc","i").test(e)?ce:""},Pe="https?://(.*)",xe=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gclid","gad_source","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","mc_cid","igshid","ttclid","rdt_cid"],Oe=["$app_build","$app_name","$app_namespace","$app_version","$browser","$browser_version","$device_type","$current_url","$pathname","$os","$os_name","$os_version","$referring_domain","$referrer"],Re={campaignParams:function(e){return i?this._campaignParamsFromUrl(i.URL,e):{}},_campaignParamsFromUrl:function(e,r){var n=xe.concat(r||[]),t={};return P(n,(function(r){var n=S(e,r);t[r]=n||null})),t},_searchEngine:function(e){return e?0===e.search(Pe+"google.([^/?]*)")?"google":0===e.search(Pe+"bing.com")?"bing":0===e.search(Pe+"yahoo.com")?"yahoo":0===e.search(Pe+"duckduckgo.com")?"duckduckgo":null:null},_searchInfoFromReferrer:function(e){var r=Re._searchEngine(e),n="yahoo"!=r?"q":"p",t={};if(!w(r)){t.$search_engine=r;var o=i?S(i.referrer,n):"";o.length&&(t.ph_keyword=o)}return t},searchInfo:function(){var e=null==i?void 0:i.referrer;return e?this._searchInfoFromReferrer(e):{}},browser:be,browserVersion:function(e,r){var n=be(e,r),t=$e[n];if(h(t))return null;for(var i=0;i<t.length;i++){var o=t[i],a=e.match(o);if(a)return parseFloat(a[a.length-2])}return null},browserLanguage:function(){return navigator.language||navigator.userLanguage},browserLanguagePrefix:function(){var e=this.browserLanguage();return"string"==typeof e?e.split("-")[0]:void 0},os:function(e){for(var r=0;r<ye.length;r++){var[n,t]=ye[r],i=n.exec(e),o=i&&("function"==typeof t?t(i,e):t);if(o)return o}return["",""]},device:Ee,deviceType:function(e){var r=Ee(e);return r===C||r===j||"Kobo"===r||"Kindle Fire"===r||r===ce?k:r===Y||r===re||r===ee||r===se?"Console":r===F?"Wearable":r?B:"Desktop"},referrer:function(){return(null==i?void 0:i.referrer)||"$direct"},referringDomain:function(){var e;return null!=i&&i.referrer&&(null===(e=R(i.referrer))||void 0===e?void 0:e.host)||"$direct"},referrerInfo:function(){return{$referrer:this.referrer(),$referring_domain:this.referringDomain()}},initialPersonInfo:function(){return{r:this.referrer().substring(0,1e3),u:null==o?void 0:o.href.substring(0,1e3)}},initialPersonPropsFromInfo:function(e){var r,{r:n,u:t}=e,i={$initial_referrer:n,$initial_referring_domain:null==n?void 0:"$direct"==n?"$direct":null===(r=R(n))||void 0===r?void 0:r.host};if(t){i.$initial_current_url=t;var o=R(t);i.$initial_host=null==o?void 0:o.host,i.$initial_pathname=null==o?void 0:o.pathname,P(this._campaignParamsFromUrl(t),(function(e,r){i["$initial_"+c(r)]=e}))}n&&P(this._searchInfoFromReferrer(n),(function(e,r){i["$initial_"+c(r)]=e}));return i},timezone:function(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return}},timezoneOffset:function(){try{return(new Date).getTimezoneOffset()}catch(e){return}},properties:function(){if(!s)return{};var[r,n]=Re.os(s);return x(O({$os:r,$os_version:n,$browser:Re.browser(s,navigator.vendor),$device:Re.device(s),$device_type:Re.deviceType(s),$timezone:Re.timezone(),$timezone_offset:Re.timezoneOffset()}),{$current_url:null==o?void 0:o.href,$host:null==o?void 0:o.host,$pathname:null==o?void 0:o.pathname,$raw_user_agent:s.length>1e3?s.substring(0,997)+"...":s,$browser_version:Re.browserVersion(s,navigator.vendor),$browser_language:Re.browserLanguage(),$browser_language_prefix:Re.browserLanguagePrefix(),$screen_height:null==e?void 0:e.screen.height,$screen_width:null==e?void 0:e.screen.width,$viewport_height:null==e?void 0:e.innerHeight,$viewport_width:null==e?void 0:e.innerWidth,$lib:"web",$lib_version:m.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})},people_properties:function(){if(!s)return{};var[e,r]=Re.os(s);return x(O({$os:e,$os_version:r,$browser:Re.browser(s,navigator.vendor)}),{$browser_version:Re.browserVersion(s,navigator.vendor)})}};function Se(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function Be(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Se(Object(n),!0).forEach((function(r){Ie(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Se(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function Ie(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Ae(e,r,n,t,i){return _(e)?e>n?n:e<r?r:e:Ae(n,r,n)}function ke(e,r){return[...e||[],...v(r)?r:[r]]}function je(e,r){return(h(e)?1:e)*r}function Ce(e,r){return function(e){for(var r=0,n=0;n<e.length;n++)r=(r<<5)-r+e.charCodeAt(n),r|=0;return Math.abs(r)}(e)%100<Ae(100*r,0,100)}var Me=Object.freeze({__proto__:null,printAndDropEverything:e=>(console.log("Would have sent event:",e),null),sampleByDistinctId:function(e){return r=>r&&Ce(r.properties.distinct_id,e)?Be(Be({},r),{},{properties:Be(Be({},r.properties),{},{$sample_type:["sampleByDistinctId"],$sample_threshold:e})}):null},sampleByEvent:function(e,r){return n=>{var t,i,o;return n?u(e,n.event)?100*Math.random()<Ae(100*r,0,100)?Be(Be({},n),{},{properties:Be(Be({},n.properties),{},{$sample_type:ke(null===(t=n.properties)||void 0===t?void 0:t.$sample_type,"sampleByEvent"),$sample_threshold:je(null===(i=n.properties)||void 0===i?void 0:i.$sample_threshold,r),$sampled_events:ke(null===(o=n.properties)||void 0===o?void 0:o.$sampled_events,e)})}):null:n:null}},sampleBySessionId:function(e){return r=>r&&Ce(r.properties.$session_id,e)?Be(Be({},r),{},{properties:Be(Be({},r.properties),{},{$sample_type:ke(r.properties.$sample_type,"sampleBySessionId"),$sample_threshold:je(r.properties.$sample_threshold,e)})}):null},setAllPersonProfilePropertiesAsPersonPropertiesForFlags:e=>{var r=x({},Re.properties(),Re.campaignParams(),Re.referrerInfo()),n={};P(r,(function(e,r){(u(xe,r)||u(Oe,r))&&(n[r]=e)})),e.setPersonPropertiesForFlags(n)}});l.posthogCustomizations=Me}(); | ||
!function(){"use strict";var e="undefined"!=typeof window?window:void 0,r="undefined"!=typeof globalThis?globalThis:e,n=Array.prototype.forEach,t=null==r?void 0:r.navigator,i=null==r?void 0:r.document,o=null==r?void 0:r.location;null==r||r.fetch,null!=r&&r.XMLHttpRequest&&"withCredentials"in new r.XMLHttpRequest&&r.XMLHttpRequest,null==r||r.AbortController;var a,s=null==t?void 0:t.userAgent,l=null!=e?e:{};function u(e,r){return-1!==e.indexOf(r)}!function(e){e.GZipJS="gzip-js",e.Base64="base64"}(a||(a={}));var c=function(e){return e.replace(/^\$/,"")},p=Array.isArray,f=Object.prototype,d=f.hasOwnProperty,g=f.toString,v=p||function(e){return"[object Array]"===g.call(e)},h=e=>void 0===e,w=e=>null===e,_=e=>"[object Number]"==g.call(e),m={DEBUG:!1,LIB_VERSION:"1.205.1"},b=r=>{var n={_log:function(n){if(e&&l.POSTHOG_DEBUG&&!h(e.console)&&e.console){for(var t=("__rrweb_original__"in e.console[n]?e.console[n].__rrweb_original__:e.console[n]),i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];t(r,...o)}},info:function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];n._log("log",...r)},warn:function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];n._log("warn",...r)},error:function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];n._log("error",...r)},critical:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];console.error(r,...n)},uninitializedWarning:e=>{n.error("You must initialize PostHog before calling ".concat(e))},createLogger:e=>b("".concat(r," ").concat(e))};return n},$=b("[PostHog.js]"),y={};function E(e,r,t){if(v(e))if(n&&e.forEach===n)e.forEach(r,t);else if("length"in e&&e.length===+e.length)for(var i=0,o=e.length;i<o;i++)if(i in e&&r.call(t,e[i],i)===y)return}function P(e,r,n){if(!h(t=e)&&!w(t)){var t;if(v(e))return E(e,r,n);if((e=>e instanceof FormData)(e)){for(var i of e.entries())if(r.call(n,i[1],i[0])===y)return}else for(var o in e)if(d.call(e,o)&&r.call(n,e[o],o)===y)return}}var x=function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),t=1;t<r;t++)n[t-1]=arguments[t];return E(n,(function(r){for(var n in r)void 0!==r[n]&&(e[n]=r[n])})),e},O=function(e){var r={};return P(e,(function(e,n){var t;t=e,"[object String]"==g.call(t)&&e.length>0&&(r[n]=e)})),r},R=e=>{var r=null==i?void 0:i.createElement("a");return h(r)?null:(r.href=e,r)},S=function(e,r){for(var n,t=((e.split("#")[0]||"").split("?")[1]||"").split("&"),i=0;i<t.length;i++){var o=t[i].split("=");if(o[0]===r){n=o;break}}if(!v(n)||n.length<2)return"";var a=n[1];try{a=decodeURIComponent(a)}catch(e){$.error("Skipping decoding for malformed query param: "+a)}return a.replace(/\+/g," ")},B="Mobile",I="iOS",A="Android",k="Tablet",j=A+" "+k,C="iPad",M="Apple",F=M+" Watch",T="Safari",D="BlackBerry",L="Samsung",z=L+"Browser",U=L+" Internet",W="Chrome",N=W+" OS",H=W+" "+I,X="Internet Explorer",V=X+" "+B,q="Opera",G=q+" Mini",K="Edge",Z="Microsoft "+K,Q="Firefox",J=Q+" "+I,Y="Nintendo",ee="PlayStation",re="Xbox",ne=A+" "+B,te=B+" "+T,ie="Windows",oe=ie+" Phone",ae="Nokia",se="Ouya",le="Generic",ue=le+" "+B.toLowerCase(),ce=le+" "+k.toLowerCase(),pe="Konqueror",fe="(\\d+(\\.\\d+)?)",de=new RegExp("Version/"+fe),ge=new RegExp(re,"i"),ve=new RegExp(ee+" \\w+","i"),he=new RegExp(Y+" \\w+","i"),we=new RegExp(D+"|PlayBook|BB10","i"),_e={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"};var me=(e,r)=>r&&u(r,M)||function(e){return u(e,T)&&!u(e,W)&&!u(e,A)}(e),be=function(e,r){return r=r||"",u(e," OPR/")&&u(e,"Mini")?G:u(e," OPR/")?q:we.test(e)?D:u(e,"IE"+B)||u(e,"WPDesktop")?V:u(e,z)?U:u(e,K)||u(e,"Edg/")?Z:u(e,"FBIOS")?"Facebook "+B:u(e,"UCWEB")||u(e,"UCBrowser")?"UC Browser":u(e,"CriOS")?H:u(e,"CrMo")||u(e,W)?W:u(e,A)&&u(e,T)?ne:u(e,"FxiOS")?J:u(e.toLowerCase(),pe.toLowerCase())?pe:me(e,r)?u(e,B)?te:T:u(e,Q)?Q:u(e,"MSIE")||u(e,"Trident/")?X:u(e,"Gecko")?Q:""},$e={[V]:[new RegExp("rv:"+fe)],[Z]:[new RegExp(K+"?\\/"+fe)],[W]:[new RegExp("("+W+"|CrMo)\\/"+fe)],[H]:[new RegExp("CriOS\\/"+fe)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+fe)],[T]:[de],[te]:[de],[q]:[new RegExp("(Opera|OPR)\\/"+fe)],[Q]:[new RegExp(Q+"\\/"+fe)],[J]:[new RegExp("FxiOS\\/"+fe)],[pe]:[new RegExp("Konqueror[:/]?"+fe,"i")],[D]:[new RegExp(D+" "+fe),de],[ne]:[new RegExp("android\\s"+fe,"i")],[U]:[new RegExp(z+"\\/"+fe)],[X]:[new RegExp("(rv:|MSIE )"+fe)],Mozilla:[new RegExp("rv:"+fe)]},ye=[[new RegExp(re+"; "+re+" (.*?)[);]","i"),e=>[re,e&&e[1]||""]],[new RegExp(Y,"i"),[Y,""]],[new RegExp(ee,"i"),[ee,""]],[we,[D,""]],[new RegExp(ie,"i"),(e,r)=>{if(/Phone/.test(r)||/WPDesktop/.test(r))return[oe,""];if(new RegExp(B).test(r)&&!/IEMobile\b/.test(r))return[ie+" "+B,""];var n=/Windows NT ([0-9.]+)/i.exec(r);if(n&&n[1]){var t=n[1],i=_e[t]||"";return/arm/i.test(r)&&(i="RT"),[ie,i]}return[ie,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>{if(e&&e[3]){var r=[e[3],e[4],e[5]||"0"];return[I,r.join(".")]}return[I,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var r="";return e&&e.length>=3&&(r=h(e[2])?e[3]:e[2]),["watchOS",r]}],[new RegExp("("+A+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+A+")","i"),e=>{if(e&&e[2]){var r=[e[2],e[3],e[4]||"0"];return[A,r.join(".")]}return[A,""]}],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{var r=["Mac OS X",""];if(e&&e[1]){var n=[e[1],e[2],e[3]||"0"];r[1]=n.join(".")}return r}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[N,""]],[/Linux|debian/i,["Linux",""]]],Ee=function(e){return he.test(e)?Y:ve.test(e)?ee:ge.test(e)?re:new RegExp(se,"i").test(e)?se:new RegExp("("+oe+"|WPDesktop)","i").test(e)?oe:/iPad/.test(e)?C:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?F:we.test(e)?D:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(ae,"i").test(e)?ae:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(e)||/(kf[a-z]+)( bui|\)).+silk\//i.test(e)?"Kindle Fire":/(Android|ZTE)/i.test(e)?!new RegExp(B).test(e)||/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(e)?/pixel[\daxl ]{1,6}/i.test(e)&&!/pixel c/i.test(e)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(e)||/lmy47v/i.test(e)&&!/QTAQZ3/i.test(e)?A:j:A:new RegExp("(pda|"+B+")","i").test(e)?ue:new RegExp(k,"i").test(e)&&!new RegExp(k+" pc","i").test(e)?ce:""},Pe="https?://(.*)",xe=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gclid","gad_source","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","mc_cid","igshid","ttclid","rdt_cid"],Oe=["$app_build","$app_name","$app_namespace","$app_version","$browser","$browser_version","$device_type","$current_url","$pathname","$os","$os_name","$os_version","$referring_domain","$referrer"],Re={campaignParams:function(e){return i?this._campaignParamsFromUrl(i.URL,e):{}},_campaignParamsFromUrl:function(e,r){var n=xe.concat(r||[]),t={};return P(n,(function(r){var n=S(e,r);t[r]=n||null})),t},_searchEngine:function(e){return e?0===e.search(Pe+"google.([^/?]*)")?"google":0===e.search(Pe+"bing.com")?"bing":0===e.search(Pe+"yahoo.com")?"yahoo":0===e.search(Pe+"duckduckgo.com")?"duckduckgo":null:null},_searchInfoFromReferrer:function(e){var r=Re._searchEngine(e),n="yahoo"!=r?"q":"p",t={};if(!w(r)){t.$search_engine=r;var o=i?S(i.referrer,n):"";o.length&&(t.ph_keyword=o)}return t},searchInfo:function(){var e=null==i?void 0:i.referrer;return e?this._searchInfoFromReferrer(e):{}},browser:be,browserVersion:function(e,r){var n=be(e,r),t=$e[n];if(h(t))return null;for(var i=0;i<t.length;i++){var o=t[i],a=e.match(o);if(a)return parseFloat(a[a.length-2])}return null},browserLanguage:function(){return navigator.language||navigator.userLanguage},browserLanguagePrefix:function(){var e=this.browserLanguage();return"string"==typeof e?e.split("-")[0]:void 0},os:function(e){for(var r=0;r<ye.length;r++){var[n,t]=ye[r],i=n.exec(e),o=i&&("function"==typeof t?t(i,e):t);if(o)return o}return["",""]},device:Ee,deviceType:function(e){var r=Ee(e);return r===C||r===j||"Kobo"===r||"Kindle Fire"===r||r===ce?k:r===Y||r===re||r===ee||r===se?"Console":r===F?"Wearable":r?B:"Desktop"},referrer:function(){return(null==i?void 0:i.referrer)||"$direct"},referringDomain:function(){var e;return null!=i&&i.referrer&&(null===(e=R(i.referrer))||void 0===e?void 0:e.host)||"$direct"},referrerInfo:function(){return{$referrer:this.referrer(),$referring_domain:this.referringDomain()}},initialPersonInfo:function(){return{r:this.referrer().substring(0,1e3),u:null==o?void 0:o.href.substring(0,1e3)}},initialPersonPropsFromInfo:function(e){var r,{r:n,u:t}=e,i={$initial_referrer:n,$initial_referring_domain:null==n?void 0:"$direct"==n?"$direct":null===(r=R(n))||void 0===r?void 0:r.host};if(t){i.$initial_current_url=t;var o=R(t);i.$initial_host=null==o?void 0:o.host,i.$initial_pathname=null==o?void 0:o.pathname,P(this._campaignParamsFromUrl(t),(function(e,r){i["$initial_"+c(r)]=e}))}n&&P(this._searchInfoFromReferrer(n),(function(e,r){i["$initial_"+c(r)]=e}));return i},timezone:function(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return}},timezoneOffset:function(){try{return(new Date).getTimezoneOffset()}catch(e){return}},properties:function(){if(!s)return{};var[r,n]=Re.os(s);return x(O({$os:r,$os_version:n,$browser:Re.browser(s,navigator.vendor),$device:Re.device(s),$device_type:Re.deviceType(s),$timezone:Re.timezone(),$timezone_offset:Re.timezoneOffset()}),{$current_url:null==o?void 0:o.href,$host:null==o?void 0:o.host,$pathname:null==o?void 0:o.pathname,$raw_user_agent:s.length>1e3?s.substring(0,997)+"...":s,$browser_version:Re.browserVersion(s,navigator.vendor),$browser_language:Re.browserLanguage(),$browser_language_prefix:Re.browserLanguagePrefix(),$screen_height:null==e?void 0:e.screen.height,$screen_width:null==e?void 0:e.screen.width,$viewport_height:null==e?void 0:e.innerHeight,$viewport_width:null==e?void 0:e.innerWidth,$lib:"web",$lib_version:m.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})},people_properties:function(){if(!s)return{};var[e,r]=Re.os(s);return x(O({$os:e,$os_version:r,$browser:Re.browser(s,navigator.vendor)}),{$browser_version:Re.browserVersion(s,navigator.vendor)})}};function Se(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function Be(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Se(Object(n),!0).forEach((function(r){Ie(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Se(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function Ie(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Ae(e,r,n,t,i){return _(e)?e>n?n:e<r?r:e:Ae(n,r,n)}function ke(e,r){return[...e||[],...v(r)?r:[r]]}function je(e,r){return(h(e)?1:e)*r}function Ce(e,r){return function(e){for(var r=0,n=0;n<e.length;n++)r=(r<<5)-r+e.charCodeAt(n),r|=0;return Math.abs(r)}(e)%100<Ae(100*r,0,100)}var Me=Object.freeze({__proto__:null,printAndDropEverything:e=>(console.log("Would have sent event:",e),null),sampleByDistinctId:function(e){return r=>r&&Ce(r.properties.distinct_id,e)?Be(Be({},r),{},{properties:Be(Be({},r.properties),{},{$sample_type:["sampleByDistinctId"],$sample_threshold:e})}):null},sampleByEvent:function(e,r){return n=>{var t,i,o;return n?u(e,n.event)?100*Math.random()<Ae(100*r,0,100)?Be(Be({},n),{},{properties:Be(Be({},n.properties),{},{$sample_type:ke(null===(t=n.properties)||void 0===t?void 0:t.$sample_type,"sampleByEvent"),$sample_threshold:je(null===(i=n.properties)||void 0===i?void 0:i.$sample_threshold,r),$sampled_events:ke(null===(o=n.properties)||void 0===o?void 0:o.$sampled_events,e)})}):null:n:null}},sampleBySessionId:function(e){return r=>r&&Ce(r.properties.$session_id,e)?Be(Be({},r),{},{properties:Be(Be({},r.properties),{},{$sample_type:ke(r.properties.$sample_type,"sampleBySessionId"),$sample_threshold:je(r.properties.$sample_threshold,e)})}):null},setAllPersonProfilePropertiesAsPersonPropertiesForFlags:e=>{var r=x({},Re.properties(),Re.campaignParams(),Re.referrerInfo()),n={};P(r,(function(e,r){(u(xe,r)||u(Oe,r))&&(n[r]=e)})),e.setPersonPropertiesForFlags(n)}});l.posthogCustomizations=Me}(); | ||
//# sourceMappingURL=customizations.full.js.map |
@@ -32,2 +32,3 @@ /** | ||
widgetColor?: string; | ||
fontFamily?: string; | ||
maxWidth?: string; | ||
@@ -34,0 +35,0 @@ zIndex?: string; |
@@ -32,2 +32,3 @@ /** | ||
widgetColor?: string; | ||
fontFamily?: string; | ||
maxWidth?: string; | ||
@@ -34,0 +35,0 @@ zIndex?: string; |
@@ -1,2 +0,2 @@ | ||
function e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function n(n){for(var o=1;o<arguments.length;o++){var r=null!=arguments[o]?arguments[o]:{};o%2?e(Object(r),!0).forEach((function(e){t(n,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):e(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}function t(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var o,r,i;!function(e){e.Popover="popover",e.API="api",e.Widget="widget"}(o||(o={})),function(e){e.Open="open",e.MultipleChoice="multiple_choice",e.SingleChoice="single_choice",e.Rating="rating",e.Link="link"}(r||(r={})),function(e){e.NextQuestion="next_question",e.End="end",e.ResponseBased="response_based",e.SpecificQuestion="specific_question"}(i||(i={}));var l,a,c,s,u,d,p,_,f={},h=[],v=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,m=Array.isArray;function b(e,n){for(var t in n)e[t]=n[t];return e}function g(e){var n=e.parentNode;n&&n.removeChild(e)}function y(e,n,t){var o,r,i,a={};for(i in n)"key"==i?o=n[i]:"ref"==i?r=n[i]:a[i]=n[i];if(arguments.length>2&&(a.children=arguments.length>3?l.call(arguments,2):t),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===a[i]&&(a[i]=e.defaultProps[i]);return C(e,a,o,r,null)}function C(e,n,t,o,r){var i={type:e,props:n,key:t,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==r?++c:r,__i:-1,__u:0};return null==r&&null!=a.vnode&&a.vnode(i),i}function x(e){return e.children}function k(e,n){this.props=e,this.context=n}function w(e,n){if(null==n)return e.__?w(e.__,e.__i+1):null;for(var t;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e)return t.__e;return"function"==typeof e.type?w(e):null}function q(e){var n,t;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,n=0;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e){e.__e=e.__c.base=t.__e;break}return q(e)}}function T(e){(!e.__d&&(e.__d=!0)&&s.push(e)&&!S.__r++||u!==a.debounceRendering)&&((u=a.debounceRendering)||d)(S)}function S(){var e,n,t,o,r,i,l,c,u;for(s.sort(p);e=s.shift();)e.__d&&(n=s.length,o=void 0,i=(r=(t=e).__v).__e,c=[],u=[],(l=t.__P)&&((o=b({},r)).__v=r.__v+1,a.vnode&&a.vnode(o),N(l,o,r,t.__n,void 0!==l.ownerSVGElement,32&r.__u?[i]:null,c,null==i?w(r):i,!!(32&r.__u),u),o.__.__k[o.__i]=o,V(c,o,u),o.__e!=i&&q(o)),s.length>n&&s.sort(p));S.__r=0}function H(e,n,t,o,r,i,l,a,c,s,u){var d,p,_,v,b,g=o&&o.__k||h,y=n.length;for(t.__d=c,function(e,n,t){var o,r,i,l,a,c=n.length,s=t.length,u=s,d=0;for(e.__k=[],o=0;o<c;o++)null!=(r=e.__k[o]=null==(r=n[o])||"boolean"==typeof r||"function"==typeof r?null:"string"==typeof r||"number"==typeof r||"bigint"==typeof r||r.constructor==String?C(null,r,null,null,r):m(r)?C(x,{children:r},null,null,null):void 0===r.constructor&&r.__b>0?C(r.type,r.props,r.key,r.ref?r.ref:null,r.__v):r)?(r.__=e,r.__b=e.__b+1,a=L(r,t,l=o+d,u),r.__i=a,i=null,-1!==a&&(u--,(i=t[a])&&(i.__u|=131072)),null==i||null===i.__v?(-1==a&&d--,"function"!=typeof r.type&&(r.__u|=65536)):a!==l&&(a===l+1?d++:a>l?u>c-l?d+=a-l:d--:d=a<l&&a==l-1?a-l:0,a!==o+d&&(r.__u|=65536))):(i=t[o])&&null==i.key&&i.__e&&(i.__e==e.__d&&(e.__d=w(i)),j(i,i,!1),t[o]=null,u--);if(u)for(o=0;o<s;o++)null!=(i=t[o])&&0==(131072&i.__u)&&(i.__e==e.__d&&(e.__d=w(i)),j(i,i))}(t,n,g),c=t.__d,d=0;d<y;d++)null!=(_=t.__k[d])&&"boolean"!=typeof _&&"function"!=typeof _&&(p=-1===_.__i?f:g[_.__i]||f,_.__i=d,N(e,_,p,r,i,l,a,c,s,u),v=_.__e,_.ref&&p.ref!=_.ref&&(p.ref&&Q(p.ref,null,_),u.push(_.ref,_.__c||v,_)),null==b&&null!=v&&(b=v),65536&_.__u||p.__k===_.__k?c=P(_,c,e):"function"==typeof _.type&&void 0!==_.__d?c=_.__d:v&&(c=v.nextSibling),_.__d=void 0,_.__u&=-196609);t.__d=c,t.__e=b}function P(e,n,t){var o,r;if("function"==typeof e.type){for(o=e.__k,r=0;o&&r<o.length;r++)o[r]&&(o[r].__=e,n=P(o[r],n,t));return n}return e.__e!=n&&(t.insertBefore(e.__e,n||null),n=e.__e),n&&n.nextSibling}function L(e,n,t,o){var r=e.key,i=e.type,l=t-1,a=t+1,c=n[t];if(null===c||c&&r==c.key&&i===c.type)return t;if(o>(null!=c&&0==(131072&c.__u)?1:0))for(;l>=0||a<n.length;){if(l>=0){if((c=n[l])&&0==(131072&c.__u)&&r==c.key&&i===c.type)return l;l--}if(a<n.length){if((c=n[a])&&0==(131072&c.__u)&&r==c.key&&i===c.type)return a;a++}}return-1}function M(e,n,t){"-"===n[0]?e.setProperty(n,null==t?"":t):e[n]=null==t?"":"number"!=typeof t||v.test(n)?t:t+"px"}function Z(e,n,t,o,r){var i;e:if("style"===n)if("string"==typeof t)e.style.cssText=t;else{if("string"==typeof o&&(e.style.cssText=o=""),o)for(n in o)t&&n in t||M(e.style,n,"");if(t)for(n in t)o&&t[n]===o[n]||M(e.style,n,t[n])}else if("o"===n[0]&&"n"===n[1])i=n!==(n=n.replace(/(PointerCapture)$|Capture$/,"$1")),n=n.toLowerCase()in e?n.toLowerCase().slice(2):n.slice(2),e.l||(e.l={}),e.l[n+i]=t,t?o?t.u=o.u:(t.u=Date.now(),e.addEventListener(n,i?I:D,i)):e.removeEventListener(n,i?I:D,i);else{if(r)n=n.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==n&&"height"!==n&&"href"!==n&&"list"!==n&&"form"!==n&&"tabIndex"!==n&&"download"!==n&&"rowSpan"!==n&&"colSpan"!==n&&"role"!==n&&n in e)try{e[n]=null==t?"":t;break e}catch(e){}"function"==typeof t||(null==t||!1===t&&"-"!==n[4]?e.removeAttribute(n):e.setAttribute(n,t))}}function D(e){var n=this.l[e.type+!1];if(e.t){if(e.t<=n.u)return}else e.t=Date.now();return n(a.event?a.event(e):e)}function I(e){return this.l[e.type+!0](a.event?a.event(e):e)}function N(e,n,t,o,r,i,l,c,s,u){var d,p,_,f,h,v,g,y,C,w,q,T,S,P,L,M=n.type;if(void 0!==n.constructor)return null;128&t.__u&&(s=!!(32&t.__u),i=[c=n.__e=t.__e]),(d=a.__b)&&d(n);e:if("function"==typeof M)try{if(y=n.props,C=(d=M.contextType)&&o[d.__c],w=d?C?C.props.value:d.__:o,t.__c?g=(p=n.__c=t.__c).__=p.__E:("prototype"in M&&M.prototype.render?n.__c=p=new M(y,w):(n.__c=p=new k(y,w),p.constructor=M,p.render=O),C&&C.sub(p),p.props=y,p.state||(p.state={}),p.context=w,p.__n=o,_=p.__d=!0,p.__h=[],p._sb=[]),null==p.__s&&(p.__s=p.state),null!=M.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=b({},p.__s)),b(p.__s,M.getDerivedStateFromProps(y,p.__s))),f=p.props,h=p.state,p.__v=n,_)null==M.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else{if(null==M.getDerivedStateFromProps&&y!==f&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(y,w),!p.__e&&(null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(y,p.__s,w)||n.__v===t.__v)){for(n.__v!==t.__v&&(p.props=y,p.state=p.__s,p.__d=!1),n.__e=t.__e,n.__k=t.__k,n.__k.forEach((function(e){e&&(e.__=n)})),q=0;q<p._sb.length;q++)p.__h.push(p._sb[q]);p._sb=[],p.__h.length&&l.push(p);break e}null!=p.componentWillUpdate&&p.componentWillUpdate(y,p.__s,w),null!=p.componentDidUpdate&&p.__h.push((function(){p.componentDidUpdate(f,h,v)}))}if(p.context=w,p.props=y,p.__P=e,p.__e=!1,T=a.__r,S=0,"prototype"in M&&M.prototype.render){for(p.state=p.__s,p.__d=!1,T&&T(n),d=p.render(p.props,p.state,p.context),P=0;P<p._sb.length;P++)p.__h.push(p._sb[P]);p._sb=[]}else do{p.__d=!1,T&&T(n),d=p.render(p.props,p.state,p.context),p.state=p.__s}while(p.__d&&++S<25);p.state=p.__s,null!=p.getChildContext&&(o=b(b({},o),p.getChildContext())),_||null==p.getSnapshotBeforeUpdate||(v=p.getSnapshotBeforeUpdate(f,h)),H(e,m(L=null!=d&&d.type===x&&null==d.key?d.props.children:d)?L:[L],n,t,o,r,i,l,c,s,u),p.base=n.__e,n.__u&=-161,p.__h.length&&l.push(p),g&&(p.__E=p.__=null)}catch(e){n.__v=null,s||null!=i?(n.__e=c,n.__u|=s?160:32,i[i.indexOf(c)]=null):(n.__e=t.__e,n.__k=t.__k),a.__e(e,n,t)}else null==i&&n.__v===t.__v?(n.__k=t.__k,n.__e=t.__e):n.__e=E(t.__e,n,t,o,r,i,l,s,u);(d=a.diffed)&&d(n)}function V(e,n,t){n.__d=void 0;for(var o=0;o<t.length;o++)Q(t[o],t[++o],t[++o]);a.__c&&a.__c(n,e),e.some((function(n){try{e=n.__h,n.__h=[],e.some((function(e){e.call(n)}))}catch(e){a.__e(e,n.__v)}}))}function E(e,n,t,o,r,i,a,c,s){var u,d,p,_,h,v,b,y=t.props,C=n.props,x=n.type;if("svg"===x&&(r=!0),null!=i)for(u=0;u<i.length;u++)if((h=i[u])&&"setAttribute"in h==!!x&&(x?h.localName===x:3===h.nodeType)){e=h,i[u]=null;break}if(null==e){if(null===x)return document.createTextNode(C);e=r?document.createElementNS("http://www.w3.org/2000/svg",x):document.createElement(x,C.is&&C),i=null,c=!1}if(null===x)y===C||c&&e.data===C||(e.data=C);else{if(i=i&&l.call(e.childNodes),y=t.props||f,!c&&null!=i)for(y={},u=0;u<e.attributes.length;u++)y[(h=e.attributes[u]).name]=h.value;for(u in y)h=y[u],"children"==u||("dangerouslySetInnerHTML"==u?p=h:"key"===u||u in C||Z(e,u,null,h,r));for(u in C)h=C[u],"children"==u?_=h:"dangerouslySetInnerHTML"==u?d=h:"value"==u?v=h:"checked"==u?b=h:"key"===u||c&&"function"!=typeof h||y[u]===h||Z(e,u,h,y[u],r);if(d)c||p&&(d.__html===p.__html||d.__html===e.innerHTML)||(e.innerHTML=d.__html),n.__k=[];else if(p&&(e.innerHTML=""),H(e,m(_)?_:[_],n,t,o,r&&"foreignObject"!==x,i,a,i?i[0]:t.__k&&w(t,0),c,s),null!=i)for(u=i.length;u--;)null!=i[u]&&g(i[u]);c||(u="value",void 0!==v&&(v!==e[u]||"progress"===x&&!v||"option"===x&&v!==y[u])&&Z(e,u,v,y[u],!1),u="checked",void 0!==b&&b!==e[u]&&Z(e,u,b,y[u],!1))}return e}function Q(e,n,t){try{"function"==typeof e?e(n):e.current=n}catch(e){a.__e(e,t)}}function j(e,n,t){var o,r;if(a.unmount&&a.unmount(e),(o=e.ref)&&(o.current&&o.current!==e.__e||Q(o,null,n)),null!=(o=e.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(e){a.__e(e,n)}o.base=o.__P=null,e.__c=void 0}if(o=e.__k)for(r=0;r<o.length;r++)o[r]&&j(o[r],n,t||"function"!=typeof e.type);t||null==e.__e||g(e.__e),e.__=e.__e=e.__d=void 0}function O(e,n,t){return this.constructor(e,t)}function B(e,n,t){var o,r,i,c;a.__&&a.__(e,n),r=(o="function"==typeof t)?null:n.__k,i=[],c=[],N(n,e=(!o&&t||n).__k=y(x,null,[e]),r||f,f,void 0!==n.ownerSVGElement,!o&&t?[t]:r?null:n.firstChild?l.call(n.childNodes):null,i,!o&&t?t:r?r.__e:n.firstChild,o,c),V(i,e,c)}function A(e,n,t){var o,r,i,a,c=b({},e.props);for(i in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),n)"key"==i?o=n[i]:"ref"==i?r=n[i]:c[i]=void 0===n[i]&&void 0!==a?a[i]:n[i];return arguments.length>2&&(c.children=arguments.length>3?l.call(arguments,2):t),C(e.type,c,o||e.key,r||e.ref,null)}l=h.slice,a={__e:function(e,n,t,o){for(var r,i,l;n=n.__;)if((r=n.__c)&&!r.__)try{if((i=r.constructor)&&null!=i.getDerivedStateFromError&&(r.setState(i.getDerivedStateFromError(e)),l=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(e,o||{}),l=r.__d),l)return r.__E=r}catch(n){e=n}throw e}},c=0,k.prototype.setState=function(e,n){var t;t=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=b({},this.state),"function"==typeof e&&(e=e(b({},t),this.props)),e&&b(t,e),null!=e&&this.__v&&(n&&this._sb.push(n),T(this))},k.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),T(this))},k.prototype.render=x,s=[],d="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,p=function(e,n){return e.__v.__b-n.__v.__b},S.__r=0,_=0;var U,F,$,z,R=0,W=[],Y=[],X=a.__b,G=a.__r,J=a.diffed,K=a.__c,ee=a.unmount;function ne(e,n){a.__h&&a.__h(F,e,R||n),R=0;var t=F.__H||(F.__H={__:[],__h:[]});return e>=t.__.length&&t.__.push({__V:Y}),t.__[e]}function te(e){return R=1,function(e,n,t){var o=ne(U++,2);if(o.t=e,!o.__c&&(o.__=[_e(void 0,n),function(e){var n=o.__N?o.__N[0]:o.__[0],t=o.t(n,e);n!==t&&(o.__N=[t,o.__[1]],o.__c.setState({}))}],o.__c=F,!F.u)){var r=function(e,n,t){if(!o.__c.__H)return!0;var r=o.__c.__H.__.filter((function(e){return e.__c}));if(r.every((function(e){return!e.__N})))return!i||i.call(this,e,n,t);var l=!1;return r.forEach((function(e){if(e.__N){var n=e.__[0];e.__=e.__N,e.__N=void 0,n!==e.__[0]&&(l=!0)}})),!(!l&&o.__c.props===e)&&(!i||i.call(this,e,n,t))};F.u=!0;var i=F.shouldComponentUpdate,l=F.componentWillUpdate;F.componentWillUpdate=function(e,n,t){if(this.__e){var o=i;i=void 0,r(e,n,t),i=o}l&&l.call(this,e,n,t)},F.shouldComponentUpdate=r}return o.__N||o.__}(_e,e)}function oe(e,n){var t=ne(U++,3);!a.__s&&pe(t.__H,n)&&(t.__=e,t.i=n,F.__H.__h.push(t))}function re(e){return R=5,ie((function(){return{current:e}}),[])}function ie(e,n){var t=ne(U++,7);return pe(t.__H,n)?(t.__V=e(),t.i=n,t.__h=e,t.__V):t.__}function le(e){var n=F.context[e.__c],t=ne(U++,9);return t.c=e,n?(null==t.__&&(t.__=!0,n.sub(F)),n.props.value):e.__}function ae(){for(var e;e=W.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ue),e.__H.__h.forEach(de),e.__H.__h=[]}catch(n){e.__H.__h=[],a.__e(n,e.__v)}}a.__b=function(e){F=null,X&&X(e)},a.__r=function(e){G&&G(e),U=0;var n=(F=e.__c).__H;n&&($===F?(n.__h=[],F.__h=[],n.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=Y,e.__N=e.i=void 0}))):(n.__h.forEach(ue),n.__h.forEach(de),n.__h=[],U=0)),$=F},a.diffed=function(e){J&&J(e);var n=e.__c;n&&n.__H&&(n.__H.__h.length&&(1!==W.push(n)&&z===a.requestAnimationFrame||((z=a.requestAnimationFrame)||se)(ae)),n.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==Y&&(e.__=e.__V),e.i=void 0,e.__V=Y}))),$=F=null},a.__c=function(e,n){n.some((function(e){try{e.__h.forEach(ue),e.__h=e.__h.filter((function(e){return!e.__||de(e)}))}catch(t){n.some((function(e){e.__h&&(e.__h=[])})),n=[],a.__e(t,e.__v)}})),K&&K(e,n)},a.unmount=function(e){ee&&ee(e);var n,t=e.__c;t&&t.__H&&(t.__H.__.forEach((function(e){try{ue(e)}catch(e){n=e}})),t.__H=void 0,n&&a.__e(n,t.__v))};var ce="function"==typeof requestAnimationFrame;function se(e){var n,t=function(){clearTimeout(o),ce&&cancelAnimationFrame(n),setTimeout(e)},o=setTimeout(t,100);ce&&(n=requestAnimationFrame(t))}function ue(e){var n=F,t=e.__c;"function"==typeof t&&(e.__c=void 0,t()),F=n}function de(e){var n=F;e.__c=e.__(),F=n}function pe(e,n){return!e||e.length!==n.length||n.some((function(n,t){return n!==e[t]}))}function _e(e,n){return"function"==typeof n?n(e):n}var fe,he="undefined"!=typeof window?window:void 0,ve="undefined"!=typeof globalThis?globalThis:he,me=null==ve?void 0:ve.navigator,be=null==ve?void 0:ve.document;null==ve||ve.location,null==ve||ve.fetch,null!=ve&&ve.XMLHttpRequest&&"withCredentials"in new ve.XMLHttpRequest&&ve.XMLHttpRequest,null==ve||ve.AbortController,null==me||me.userAgent,function(e){e.GZipJS="gzip-js",e.Base64="base64"}(fe||(fe={}));var ge=Array.isArray,ye=Object.prototype.toString,Ce=ge||function(e){return"[object Array]"===ye.call(e)},xe=e=>null===e,ke=e=>"[object Number]"==ye.call(e);var we=he,qe="seenSurvey_";function Te(e){if("#"===e[0]){var n=e.replace(/^#/,"");return"rgb("+parseInt(n.slice(0,2),16)+","+parseInt(n.slice(2,4),16)+","+parseInt(n.slice(4,6),16)+")"}return"rgb(255, 255, 255)"}function Se(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Pe;"#"===n[0]&&(e=Te(n)),n.startsWith("rgb")&&(e=n);var t={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}[n.toLowerCase()];if(t&&(e=Te(t)),!e)return"black";var o=e.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);if(o){var r=parseInt(o[1]),i=parseInt(o[2]),l=parseInt(o[3]);return Math.sqrt(r*r*.299+i*i*.587+l*l*.114)>127.5?"black":"white"}return"black"}var He={backgroundColor:"#eeeded",submitButtonColor:"black",submitButtonTextColor:"white",ratingButtonColor:"white",ratingButtonActiveColor:"black",borderColor:"#c9c6c6",placeholder:"Start typing...",whiteLabel:!1,displayThankYouMessage:!0,thankYouMessageHeader:"Thank you for your feedback!",position:"right"},Pe="#eeeded",Le=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;r&&(localStorage.setItem(Ne(o),"true"),r.capture("survey sent",n(n({$survey_name:o.name,$survey_id:o.id,$survey_iteration:o.current_iteration,$survey_iteration_start_date:o.current_iteration_start_date,$survey_questions:o.questions.map((e=>e.question)),sessionRecordingUrl:null===(e=r.get_session_replay_url)||void 0===e?void 0:e.call(r)},t),{},{$set:{[Ve(o,"responded")]:!0}})),we.dispatchEvent(new Event("PHSurveySent")))},Me=(e,n,t)=>{var o;!t&&n&&(n.capture("survey dismissed",{$survey_name:e.name,$survey_id:e.id,$survey_iteration:e.current_iteration,$survey_iteration_start_date:e.current_iteration_start_date,sessionRecordingUrl:null===(o=n.get_session_replay_url)||void 0===o?void 0:o.call(n),$set:{[Ve(e,"dismissed")]:!0}}),localStorage.setItem(Ne(e),"true"),we.dispatchEvent(new Event("PHSurveyClosed")))},Ze=e=>e.map((e=>({sort:Math.floor(10*Math.random()),value:e}))).sort(((e,n)=>e.sort-n.sort)).map((e=>e.value)),De=(e,n)=>e.length===n.length&&e.every(((e,t)=>e===n[t]))?n.reverse():n,Ie=e=>(e.questions.forEach(((e,n)=>{e.originalQuestionIndex=n})),e.appearance&&e.appearance.shuffleQuestions?De(e.questions,Ze(e.questions)):e.questions),Ne=e=>{var n="".concat(qe).concat(e.id);return e.current_iteration&&e.current_iteration>0&&(n="".concat(qe).concat(e.id,"_").concat(e.current_iteration)),n},Ve=(e,n)=>{var t="$survey_".concat(n,"/").concat(e.id);return e.current_iteration&&e.current_iteration>0&&(t="$survey_".concat(n,"/").concat(e.id,"/").concat(e.current_iteration)),t},Ee=function(e,n){var t={__c:n="__cC"+_++,__:e,Consumer:function(e,n){return e.children(n)},Provider:function(e){var t,o;return this.getChildContext||(t=[],(o={})[n]=this,this.getChildContext=function(){return o},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&t.some((function(e){e.__e=!0,T(e)}))},this.sub=function(e){t.push(e);var n=e.componentWillUnmount;e.componentWillUnmount=function(){t.splice(t.indexOf(e),1),n&&n.call(e)}}),e.children}};return t.Provider.__=t.Consumer.contextType=t}({isPreviewMode:!1,previewPageIndex:0,handleCloseSurveyPopup:()=>{},isPopup:!0,onPreviewSubmit:()=>{}}),Qe=e=>{var{component:n,children:t,renderAsHtml:o,style:r}=e;return A(n,o?{dangerouslySetInnerHTML:{__html:t},style:r}:{children:t,style:r})},je=0;function Oe(e,n,t,o,r,i){var l,c,s={};for(c in n)"ref"==c?l=n[c]:s[c]=n[c];var u={type:e,props:s,key:t,ref:l,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--je,__i:-1,__u:0,__source:r,__self:i};if("function"==typeof e&&(l=e.defaultProps))for(c in l)void 0===s[c]&&(s[c]=l[c]);return a.vnode&&a.vnode(u),u}var Be=Oe("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Oe("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm146 272q66 0 121.5-35.5T682-393h-52q-23 40-63 61.5T480.5-310q-46.5 0-87-21T331-393h-53q26 61 81 96.5T480-261Zm0 181q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),Ae=Oe("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Oe("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm20 194h253v-49H354v49ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),Ue=Oe("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Oe("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm146.174 116Q413-417 358.5-379.5T278-280h53q22-42 62.173-65t87.5-23Q528-368 567.5-344.5T630-280h52q-25-63-79.826-100-54.826-37-122-37ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),Fe=Oe("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Oe("path",{d:"M480-417q-67 0-121.5 37.5T278-280h404q-25-63-80-100t-122-37Zm-183-72 50-45 45 45 31-36-45-45 45-45-31-36-45 45-50-45-31 36 45 45-45 45 31 36Zm272 0 44-45 51 45 31-36-45-45 45-45-31-36-51 45-44-45-31 36 44 45-44 45 31 36ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142 0 241-99t99-241q0-142-99-241t-241-99q-142 0-241 99t-99 241q0 142 99 241t241 99Z"})}),$e=Oe("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Oe("path",{d:"M479.504-261Q537-261 585.5-287q48.5-26 78.5-72.4 6-11.6-.75-22.6-6.75-11-20.25-11H316.918Q303-393 296.5-382t-.5 22.6q30 46.4 78.5 72.4 48.5 26 105.004 26ZM347-578l27 27q7.636 8 17.818 8Q402-543 410-551q8-8 8-18t-8-18l-42-42q-8.8-9-20.9-9-12.1 0-21.1 9l-42 42q-8 7.636-8 17.818Q276-559 284-551q8 8 18 8t18-8l27-27Zm267 0 27 27q7.714 8 18 8t18-8q8-7.636 8-17.818Q685-579 677-587l-42-42q-8.8-9-20.9-9-12.1 0-21.1 9l-42 42q-8 7.714-8 18t8 18q7.636 8 17.818 8Q579-543 587-551l27-27ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),ze=Oe("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Oe("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.164752 0.164752C0.384422 -0.0549175 0.740578 -0.0549175 0.960248 0.164752L6 5.20451L11.0398 0.164752C11.2594 -0.0549175 11.6156 -0.0549175 11.8352 0.164752C12.0549 0.384422 12.0549 0.740578 11.8352 0.960248L6.79549 6L11.8352 11.0398C12.0549 11.2594 12.0549 11.6156 11.8352 11.8352C11.6156 12.0549 11.2594 12.0549 11.0398 11.8352L6 6.79549L0.960248 11.8352C0.740578 12.0549 0.384422 12.0549 0.164752 11.8352C-0.0549175 11.6156 -0.0549175 11.2594 0.164752 11.0398L5.20451 6L0.164752 0.960248C-0.0549175 0.740578 -0.0549175 0.384422 0.164752 0.164752Z",fill:"black"})}),Re=Oe("svg",{width:"77",height:"14",viewBox:"0 0 77 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Oe("g",{"clip-path":"url(#clip0_2415_6911)",children:[Oe("mask",{id:"mask0_2415_6911",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"77",height:"14",children:Oe("path",{d:"M0.5 0H76.5V14H0.5V0Z",fill:"white"})}),Oe("g",{mask:"url(#mask0_2415_6911)",children:[Oe("path",{d:"M5.77226 8.02931C5.59388 8.37329 5.08474 8.37329 4.90634 8.02931L4.4797 7.20672C4.41155 7.07535 4.41155 6.9207 4.4797 6.78933L4.90634 5.96669C5.08474 5.62276 5.59388 5.62276 5.77226 5.96669L6.19893 6.78933C6.26709 6.9207 6.26709 7.07535 6.19893 7.20672L5.77226 8.02931ZM5.77226 12.6946C5.59388 13.0386 5.08474 13.0386 4.90634 12.6946L4.4797 11.872C4.41155 11.7406 4.41155 11.586 4.4797 11.4546L4.90634 10.632C5.08474 10.288 5.59388 10.288 5.77226 10.632L6.19893 11.4546C6.26709 11.586 6.26709 11.7406 6.19893 11.872L5.77226 12.6946Z",fill:"#1D4AFF"}),Oe("path",{d:"M0.5 10.9238C0.5 10.508 1.02142 10.2998 1.32637 10.5938L3.54508 12.7327C3.85003 13.0267 3.63405 13.5294 3.20279 13.5294H0.984076C0.716728 13.5294 0.5 13.3205 0.5 13.0627V10.9238ZM0.5 8.67083C0.5 8.79459 0.551001 8.91331 0.641783 9.00081L5.19753 13.3927C5.28831 13.4802 5.41144 13.5294 5.53982 13.5294H8.0421C8.47337 13.5294 8.68936 13.0267 8.3844 12.7327L1.32637 5.92856C1.02142 5.63456 0.5 5.84278 0.5 6.25854V8.67083ZM0.5 4.00556C0.5 4.12932 0.551001 4.24802 0.641783 4.33554L10.0368 13.3927C10.1276 13.4802 10.2508 13.5294 10.3791 13.5294H12.8814C13.3127 13.5294 13.5287 13.0267 13.2237 12.7327L1.32637 1.26329C1.02142 0.969312 0.5 1.17752 0.5 1.59327V4.00556ZM5.33931 4.00556C5.33931 4.12932 5.39033 4.24802 5.4811 4.33554L14.1916 12.7327C14.4965 13.0267 15.0179 12.8185 15.0179 12.4028V9.99047C15.0179 9.86671 14.9669 9.74799 14.8762 9.66049L6.16568 1.26329C5.86071 0.969307 5.33931 1.17752 5.33931 1.59327V4.00556ZM11.005 1.26329C10.7 0.969307 10.1786 1.17752 10.1786 1.59327V4.00556C10.1786 4.12932 10.2296 4.24802 10.3204 4.33554L14.1916 8.06748C14.4965 8.36148 15.0179 8.15325 15.0179 7.7375V5.3252C15.0179 5.20144 14.9669 5.08272 14.8762 4.99522L11.005 1.26329Z",fill:"#F9BD2B"}),Oe("path",{d:"M21.0852 10.981L16.5288 6.58843C16.2238 6.29443 15.7024 6.50266 15.7024 6.91841V13.0627C15.7024 13.3205 15.9191 13.5294 16.1865 13.5294H23.2446C23.5119 13.5294 23.7287 13.3205 23.7287 13.0627V12.5032C23.7287 12.2455 23.511 12.0396 23.2459 12.0063C22.4323 11.9042 21.6713 11.546 21.0852 10.981ZM18.0252 12.0365C17.5978 12.0365 17.251 11.7021 17.251 11.2901C17.251 10.878 17.5978 10.5436 18.0252 10.5436C18.4527 10.5436 18.7996 10.878 18.7996 11.2901C18.7996 11.7021 18.4527 12.0365 18.0252 12.0365Z",fill:"currentColor"}),Oe("path",{d:"M0.5 13.0627C0.5 13.3205 0.716728 13.5294 0.984076 13.5294H3.20279C3.63405 13.5294 3.85003 13.0267 3.54508 12.7327L1.32637 10.5938C1.02142 10.2998 0.5 10.508 0.5 10.9238V13.0627ZM5.33931 5.13191L1.32637 1.26329C1.02142 0.969306 0.5 1.17752 0.5 1.59327V4.00556C0.5 4.12932 0.551001 4.24802 0.641783 4.33554L5.33931 8.86412V5.13191ZM1.32637 5.92855C1.02142 5.63455 0.5 5.84278 0.5 6.25853V8.67083C0.5 8.79459 0.551001 8.91331 0.641783 9.00081L5.33931 13.5294V9.79717L1.32637 5.92855Z",fill:"#1D4AFF"}),Oe("path",{d:"M10.1787 5.3252C10.1787 5.20144 10.1277 5.08272 10.0369 4.99522L6.16572 1.26329C5.8608 0.969306 5.33936 1.17752 5.33936 1.59327V4.00556C5.33936 4.12932 5.39037 4.24802 5.48114 4.33554L10.1787 8.86412V5.3252ZM5.33936 13.5294H8.04214C8.47341 13.5294 8.6894 13.0267 8.38443 12.7327L5.33936 9.79717V13.5294ZM5.33936 5.13191V8.67083C5.33936 8.79459 5.39037 8.91331 5.48114 9.00081L10.1787 13.5294V9.99047C10.1787 9.86671 10.1277 9.74803 10.0369 9.66049L5.33936 5.13191Z",fill:"#F54E00"}),Oe("path",{d:"M29.375 11.6667H31.3636V8.48772H33.0249C34.8499 8.48772 36.0204 7.4443 36.0204 5.83052C36.0204 4.21681 34.8499 3.17334 33.0249 3.17334H29.375V11.6667ZM31.3636 6.84972V4.81136H32.8236C33.5787 4.81136 34.0318 5.19958 34.0318 5.83052C34.0318 6.4615 33.5787 6.84972 32.8236 6.84972H31.3636ZM39.618 11.7637C41.5563 11.7637 42.9659 10.429 42.9659 8.60905C42.9659 6.78905 41.5563 5.45438 39.618 5.45438C37.6546 5.45438 36.2701 6.78905 36.2701 8.60905C36.2701 10.429 37.6546 11.7637 39.618 11.7637ZM38.1077 8.60905C38.1077 7.63838 38.7118 6.97105 39.618 6.97105C40.5116 6.97105 41.1157 7.63838 41.1157 8.60905C41.1157 9.57972 40.5116 10.2471 39.618 10.2471C38.7118 10.2471 38.1077 9.57972 38.1077 8.60905ZM46.1482 11.7637C47.6333 11.7637 48.6402 10.8658 48.6402 9.81025C48.6402 7.33505 45.2294 8.13585 45.2294 7.16518C45.2294 6.8983 45.5189 6.72843 45.9342 6.72843C46.3622 6.72843 46.8782 6.98318 47.0418 7.54132L48.527 6.94678C48.2375 6.06105 47.1677 5.45438 45.8713 5.45438C44.4743 5.45438 43.6058 6.25518 43.6058 7.21372C43.6058 9.53118 46.9663 8.88812 46.9663 9.84665C46.9663 10.1864 46.6391 10.417 46.1482 10.417C45.4434 10.417 44.9525 9.94376 44.8015 9.3735L43.3164 9.93158C43.6436 10.8537 44.6001 11.7637 46.1482 11.7637ZM53.4241 11.606L53.2982 10.0651C53.0843 10.1743 52.8074 10.2106 52.5808 10.2106C52.1278 10.2106 51.8257 9.89523 51.8257 9.34918V7.03172H53.3612V5.55145H51.8257V3.78001H49.9755V5.55145H48.9687V7.03172H49.9755V9.57972C49.9755 11.06 51.0202 11.7637 52.3921 11.7637C52.7696 11.7637 53.122 11.7031 53.4241 11.606ZM59.8749 3.17334V6.47358H56.376V3.17334H54.3874V11.6667H56.376V8.11158H59.8749V11.6667H61.8761V3.17334H59.8749ZM66.2899 11.7637C68.2281 11.7637 69.6378 10.429 69.6378 8.60905C69.6378 6.78905 68.2281 5.45438 66.2899 5.45438C64.3265 5.45438 62.942 6.78905 62.942 8.60905C62.942 10.429 64.3265 11.7637 66.2899 11.7637ZM64.7796 8.60905C64.7796 7.63838 65.3837 6.97105 66.2899 6.97105C67.1835 6.97105 67.7876 7.63838 67.7876 8.60905C67.7876 9.57972 67.1835 10.2471 66.2899 10.2471C65.3837 10.2471 64.7796 9.57972 64.7796 8.60905ZM73.2088 11.4725C73.901 11.4725 74.5177 11.242 74.845 10.8416V11.424C74.845 12.1034 74.2786 12.5767 73.4102 12.5767C72.7935 12.5767 72.2523 12.2854 72.1642 11.788L70.4776 12.0428C70.7042 13.1955 71.925 13.972 73.4102 13.972C75.361 13.972 76.6574 12.8679 76.6574 11.2298V5.55145H74.8324V6.07318C74.4926 5.69705 73.9136 5.45438 73.171 5.45438C71.409 5.45438 70.3014 6.61918 70.3014 8.46345C70.3014 10.3077 71.409 11.4725 73.2088 11.4725ZM72.1012 8.46345C72.1012 7.55345 72.655 6.97105 73.5109 6.97105C74.3793 6.97105 74.9331 7.55345 74.9331 8.46345C74.9331 9.37345 74.3793 9.95585 73.5109 9.95585C72.655 9.95585 72.1012 9.37345 72.1012 8.46345Z",fill:"currentColor"})]})]}),Oe("defs",{children:Oe("clipPath",{id:"clip0_2415_6911",children:Oe("rect",{width:"76",height:"14",fill:"white",transform:"translate(0.5)"})})})]}),We=Oe("svg",{width:"16",height:"12",viewBox:"0 0 16 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Oe("path",{d:"M5.30769 10.6923L4.77736 11.2226C4.91801 11.3633 5.10878 11.4423 5.30769 11.4423C5.5066 11.4423 5.69737 11.3633 5.83802 11.2226L5.30769 10.6923ZM15.5303 1.53033C15.8232 1.23744 15.8232 0.762563 15.5303 0.46967C15.2374 0.176777 14.7626 0.176777 14.4697 0.46967L15.5303 1.53033ZM1.53033 5.85429C1.23744 5.56139 0.762563 5.56139 0.46967 5.85429C0.176777 6.14718 0.176777 6.62205 0.46967 6.91495L1.53033 5.85429ZM5.83802 11.2226L15.5303 1.53033L14.4697 0.46967L4.77736 10.162L5.83802 11.2226ZM0.46967 6.91495L4.77736 11.2226L5.83802 10.162L1.53033 5.85429L0.46967 6.91495Z",fill:"currentColor"})});function Ye(){return Oe("a",{href:"https://posthog.com",target:"_blank",rel:"noopener",className:"footer-branding",children:["Survey by ",Re]})}function Xe(e){var{text:n,submitDisabled:t,appearance:o,onSubmit:r,link:i,onPreviewSubmit:l}=e,{isPreviewMode:a,isPopup:c}=le(Ee),s=o.submitButtonTextColor||Se(o.submitButtonColor||He.submitButtonColor);return Oe("div",{className:"bottom-section",children:[Oe("div",{className:"buttons",children:Oe("button",{className:"form-submit",disabled:t,type:"button",style:c?{color:s}:{},onClick:()=>{a?null==l||l():(i&&(null==he||he.open(i)),r())},children:n})}),!o.whiteLabel&&Oe(Ye,{})]})}function Ge(e){var{question:n,description:t,descriptionContentType:o,backgroundColor:r,forceDisableHtml:i}=e,{isPopup:l}=le(Ee);return Oe("div",{style:l?{backgroundColor:r||He.backgroundColor}:{},children:[Oe("div",{className:"survey-question",children:n}),t&&Qe({component:y("div",{className:"survey-question-description"}),children:t,renderAsHtml:!i&&"text"!==o})]})}function Je(e){var{onClick:n}=e,{isPreviewMode:t}=le(Ee);return Oe("div",{className:"cancel-btn-wrapper",onClick:n,disabled:t,children:Oe("button",{className:"form-cancel",onClick:n,disabled:t,children:ze})})}function Ke(e){var{header:t,description:o,contentType:r,forceDisableHtml:i,appearance:l,onClose:a,styleOverrides:c}=e,s=Se(l.backgroundColor||He.backgroundColor),{isPopup:u}=le(Ee);return Oe(x,{children:Oe("div",{className:"thank-you-message",style:n({},c),children:Oe("div",{className:"thank-you-message-container",children:[u&&Oe(Je,{onClick:()=>a()}),Oe("h3",{className:"thank-you-message-header",style:{color:s},children:t}),o&&Qe({component:y("div",{className:"thank-you-message-body"}),children:o,renderAsHtml:!i&&"text"!==r,style:{color:s}}),u&&Oe(Xe,{text:l.thankYouMessageCloseButtonText||"Close",submitDisabled:!1,appearance:l,onSubmit:()=>a()})]})})})}function en(e){var n,t=re(null),[o,r]=te(null!==(n=e.defaultTextColor)&&void 0!==n?n:"black");return oe((()=>{if(t.current){var e=function(e){var n=we.getComputedStyle(e).backgroundColor;if("rgba(0, 0, 0, 0)"===n)return"black";var t=n.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);if(!t)return"black";var o=parseInt(t[1]),r=parseInt(t[2]),i=parseInt(t[3]);return Math.sqrt(o*o*.299+r*r*.587+i*i*.114)>127.5?"black":"white"}(t.current);r(e)}}),[e.appearance,e.forceUpdate]),{ref:t,textColor:o}}function nn(e){var{question:n,forceDisableHtml:t,appearance:o,onSubmit:r,onPreviewSubmit:i}=e,l=re(null),[a,c]=te("");return Oe("div",{ref:l,children:[Oe(Ge,{question:n.question,description:n.description,descriptionContentType:n.descriptionContentType,backgroundColor:o.backgroundColor,forceDisableHtml:t}),Oe("textarea",{rows:4,placeholder:null==o?void 0:o.placeholder,onInput:e=>c(e.currentTarget.value)}),Oe(Xe,{text:n.buttonText||"Submit",submitDisabled:!a&&!n.optional,appearance:o,onSubmit:()=>r(a),onPreviewSubmit:()=>i(a)})]})}function tn(e){var{question:n,forceDisableHtml:t,appearance:o,onSubmit:r,onPreviewSubmit:i}=e;return Oe(x,{children:[Oe(Ge,{question:n.question,description:n.description,descriptionContentType:n.descriptionContentType,forceDisableHtml:t}),Oe(Xe,{text:n.buttonText||"Submit",submitDisabled:!1,link:n.link,appearance:o,onSubmit:()=>r("link clicked"),onPreviewSubmit:()=>i("link clicked")})]})}function on(e){var{question:n,forceDisableHtml:t,displayQuestionIndex:o,appearance:r,onSubmit:i,onPreviewSubmit:l}=e,a=n.scale,c=10===n.scale?0:1,[s,u]=te(null);return Oe(x,{children:[Oe(Ge,{question:n.question,description:n.description,descriptionContentType:n.descriptionContentType,forceDisableHtml:t,backgroundColor:r.backgroundColor}),Oe("div",{className:"rating-section",children:[Oe("div",{className:"rating-options",children:["emoji"===n.display&&Oe("div",{className:"rating-options-emoji",children:(3===n.scale?an:cn).map(((e,n)=>{var t=n+1===s;return Oe("button",{className:"ratings-emoji question-".concat(o,"-rating-").concat(n," ").concat(t?"rating-active":null),value:n+1,type:"button",onClick:()=>{u(n+1)},style:{fill:t?r.ratingButtonActiveColor:r.ratingButtonColor,borderColor:r.borderColor},children:e},n)}))}),"number"===n.display&&Oe("div",{className:"rating-options-number",style:{gridTemplateColumns:"repeat(".concat(a-c+1,", minmax(0, 1fr))")},children:pn(n.scale).map(((e,n)=>Oe(rn,{displayQuestionIndex:o,active:s===e,appearance:r,num:e,setActiveNumber:e=>{u(e)}},n)))})]}),Oe("div",{className:"rating-text",children:[Oe("div",{children:n.lowerBoundLabel}),Oe("div",{children:n.upperBoundLabel})]})]}),Oe(Xe,{text:n.buttonText||(null==r?void 0:r.submitButtonText)||"Submit",submitDisabled:xe(s)&&!n.optional,appearance:r,onSubmit:()=>i(s),onPreviewSubmit:()=>l(s)})]})}function rn(e){var{num:n,active:t,displayQuestionIndex:o,appearance:r,setActiveNumber:i}=e,{textColor:l,ref:a}=en({appearance:r,defaultTextColor:"black",forceUpdate:t});return Oe("button",{ref:a,className:"ratings-number question-".concat(o,"-rating-").concat(n," ").concat(t?"rating-active":null),type:"button",onClick:()=>{i(n)},style:{color:l,backgroundColor:t?r.ratingButtonActiveColor:r.ratingButtonColor,borderColor:r.borderColor},children:n})}function ln(e){var{question:n,forceDisableHtml:t,displayQuestionIndex:o,appearance:i,onSubmit:l,onPreviewSubmit:a}=e,c=re(null),s=ie((()=>(e=>{if(!e.shuffleOptions)return e.choices;var n=e.choices,t="";e.hasOpenChoice&&(t=n.pop());var o=De(n,Ze(n));return e.hasOpenChoice&&(e.choices.push(t),o.push(t)),o})(n)),[n]),[u,d]=te(n.type===r.MultipleChoice?[]:null),[p,_]=te(!1),[f,h]=te(""),v=n.type===r.SingleChoice?"radio":"checkbox";return Oe("div",{ref:c,children:[Oe(Ge,{question:n.question,description:n.description,descriptionContentType:n.descriptionContentType,forceDisableHtml:t,backgroundColor:i.backgroundColor}),Oe("div",{className:"multiple-choice-options",children:s.map(((e,t)=>{var i="choice-option",l=e,a=e;return n.hasOpenChoice&&t===n.choices.length-1&&(i+=" choice-option-open"),Oe("div",{className:i,children:[Oe("input",{type:v,id:"surveyQuestion".concat(o,"Choice").concat(t),name:"question".concat(o),value:l,disabled:!l,onInput:()=>n.hasOpenChoice&&t===n.choices.length-1?_(!p):n.type===r.SingleChoice?d(l):n.type===r.MultipleChoice&&Ce(u)?u.includes(l)?d(u.filter((e=>e!==l))):d([...u,l]):void 0}),Oe("label",{htmlFor:"surveyQuestion".concat(o,"Choice").concat(t),style:{color:"black"},children:n.hasOpenChoice&&t===n.choices.length-1?Oe(x,{children:[Oe("span",{children:[a,":"]}),Oe("input",{type:"text",id:"surveyQuestion".concat(o,"Choice").concat(t,"Open"),name:"question".concat(o),onInput:e=>{var t=e.currentTarget.value;return n.type===r.SingleChoice?d(t):n.type===r.MultipleChoice&&Ce(u)?h(t):void 0}})]}):a}),Oe("span",{className:"choice-check",style:{color:"black"},children:We})]})}))}),Oe(Xe,{text:n.buttonText||"Submit",submitDisabled:(xe(u)||Ce(u)&&!p&&0===u.length||Ce(u)&&p&&!f&&0===u.length&&!n.optional)&&!n.optional,appearance:i,onSubmit:()=>{p&&n.type===r.MultipleChoice?Ce(u)&&l([...u,f]):l(u)},onPreviewSubmit:()=>{p&&n.type===r.MultipleChoice?Ce(u)&&a([...u,f]):a(u)}})]})}var an=[Ue,Ae,Be],cn=[Fe,Ue,Ae,Be,$e],sn=[1,2,3,4,5],un=[1,2,3,4,5,6,7],dn=[0,1,2,3,4,5,6,7,8,9,10];function pn(e){switch(e){case 5:default:return sn;case 7:return un;case 10:return dn}}var _n=he,fn=be,hn=e=>{var n,t,o,{survey:r,parentElement:i,previewPageIndex:l,forceDisableHtml:a,onPreviewSubmit:c}=e,s=(o=r.appearance,'\n .survey-form, .thank-you-message {\n position: fixed;\n margin: 0px;\n bottom: 0px;\n color: black;\n font-weight: normal;\n font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "Roboto", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n text-align: left;\n max-width: '.concat(parseInt((null==o?void 0:o.maxWidth)||"300"),"px;\n width: 100%;\n z-index: ").concat(parseInt((null==o?void 0:o.zIndex)||"99999"),";\n border: 1.5px solid ").concat((null==o?void 0:o.borderColor)||"#c9c6c6",";\n border-bottom: 0px;\n ").concat({left:"left: 30px;",right:"right: 30px;",center:"\n left: 50%;\n transform: translateX(-50%);\n "}[(null==o?void 0:o.position)||"right"]||"right: 30px;","\n flex-direction: column;\n background: ").concat((null==o?void 0:o.backgroundColor)||"#eeeded",';\n border-top-left-radius: 10px;\n border-top-right-radius: 10px;\n box-shadow: -6px 0 16px -8px rgb(0 0 0 / 8%), -9px 0 28px 0 rgb(0 0 0 / 5%), -12px 0 48px 16px rgb(0 0 0 / 3%);\n }\n\n .survey-box, .thank-you-message-container {\n padding: 20px 25px 10px;\n display: flex;\n flex-direction: column;\n border-radius: 10px;\n }\n\n .thank-you-message {\n text-align: center;\n }\n\n .form-submit[disabled] {\n opacity: 0.6;\n filter: grayscale(50%);\n cursor: not-allowed;\n }\n .survey-form textarea {\n color: #2d2d2d;\n font-size: 14px;\n font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "Roboto", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n background: white;\n color: black;\n outline: none;\n padding-left: 10px;\n padding-right: 10px;\n padding-top: 10px;\n border-radius: 6px;\n border-color: ').concat((null==o?void 0:o.borderColor)||"#c9c6c6",";\n margin-top: 14px;\n width: 100%;\n box-sizing: border-box;\n }\n .survey-box:has(.survey-question:empty):not(:has(.survey-question-description)) textarea {\n margin-top: 0;\n }\n .form-submit {\n box-sizing: border-box;\n margin: 0;\n font-family: inherit;\n overflow: visible;\n text-transform: none;\n position: relative;\n display: inline-block;\n font-weight: 700;\n white-space: nowrap;\n text-align: center;\n border: 1.5px solid transparent;\n cursor: pointer;\n user-select: none;\n touch-action: manipulation;\n padding: 12px;\n font-size: 14px;\n border-radius: 6px;\n outline: 0;\n background: ").concat((null==o?void 0:o.submitButtonColor)||"black"," !important;\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.12);\n box-shadow: 0 2px 0 rgba(0, 0, 0, 0.045);\n width: 100%;\n }\n .form-cancel {\n display: flex;\n float: right;\n border: none;\n background: none;\n cursor: pointer;\n }\n .cancel-btn-wrapper {\n position: absolute;\n width: 35px;\n height: 35px;\n border-radius: 100%;\n top: 0;\n right: 0;\n transform: translate(50%, -50%);\n background: white;\n border: 1.5px solid ").concat((null==o?void 0:o.borderColor)||"#c9c6c6",";\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .bolded { font-weight: 600; }\n .buttons {\n display: flex;\n justify-content: center;\n }\n .footer-branding {\n font-size: 11px;\n margin-top: 10px;\n text-align: center;\n display: flex;\n justify-content: center;\n gap: 4px;\n align-items: center;\n font-weight: 500;\n background: ").concat((null==o?void 0:o.backgroundColor)||"#eeeded",";\n text-decoration: none;\n backgroundColor: ").concat((null==o?void 0:o.backgroundColor)||"#eeeded",";\n color: ").concat(Se((null==o?void 0:o.backgroundColor)||"#eeeded"),";\n }\n .survey-question {\n font-weight: 500;\n font-size: 14px;\n background: ").concat((null==o?void 0:o.backgroundColor)||"#eeeded",";\n }\n .question-textarea-wrapper {\n display: flex;\n flex-direction: column;\n }\n .survey-question-description {\n font-size: 13px;\n padding-top: 5px;\n background: ").concat((null==o?void 0:o.backgroundColor)||"#eeeded",";\n }\n .ratings-number {\n font-size: 16px;\n font-weight: 600;\n padding: 8px 0px;\n border: none;\n }\n .ratings-number:hover {\n cursor: pointer;\n }\n .rating-options {\n margin-top: 14px;\n }\n .rating-options-number {\n display: grid;\n border-radius: 6px;\n overflow: hidden;\n border: 1.5px solid ").concat((null==o?void 0:o.borderColor)||"#c9c6c6",";\n }\n .rating-options-number > .ratings-number {\n border-right: 1px solid ").concat((null==o?void 0:o.borderColor)||"#c9c6c6",";\n }\n .rating-options-number > .ratings-number:last-of-type {\n border-right: 0px;\n }\n .rating-options-number .rating-active {\n background: ").concat((null==o?void 0:o.ratingButtonActiveColor)||"black",";\n }\n .rating-options-emoji {\n display: flex;\n justify-content: space-between;\n }\n .ratings-emoji {\n font-size: 16px;\n background-color: transparent;\n border: none;\n padding: 0px;\n }\n .ratings-emoji:hover {\n cursor: pointer;\n }\n .ratings-emoji.rating-active svg {\n fill: ").concat((null==o?void 0:o.ratingButtonActiveColor)||"black",";\n }\n .emoji-svg {\n fill: '#939393';\n }\n .rating-text {\n display: flex;\n flex-direction: row;\n font-size: 11px;\n justify-content: space-between;\n margin-top: 6px;\n background: ").concat((null==o?void 0:o.backgroundColor)||"#eeeded",";\n opacity: .60;\n }\n .multiple-choice-options {\n margin-top: 13px;\n font-size: 14px;\n }\n .survey-box:has(.survey-question:empty):not(:has(.survey-question-description)) .multiple-choice-options {\n margin-top: 0;\n }\n .multiple-choice-options .choice-option {\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 13px;\n cursor: pointer;\n margin-bottom: 5px;\n position: relative;\n }\n .multiple-choice-options > .choice-option:last-of-type {\n margin-bottom: 0px;\n }\n .multiple-choice-options input {\n cursor: pointer;\n position: absolute;\n opacity: 0;\n }\n .choice-check {\n position: absolute;\n right: 10px;\n background: white;\n }\n .choice-check svg {\n display: none;\n }\n .multiple-choice-options .choice-option:hover .choice-check svg {\n display: inline-block;\n opacity: .25;\n }\n .multiple-choice-options input:checked + label + .choice-check svg {\n display: inline-block;\n opacity: 100% !important;\n }\n .multiple-choice-options input:checked + label {\n font-weight: bold;\n border: 1.5px solid rgba(0,0,0);\n }\n .multiple-choice-options input:checked + label input {\n font-weight: bold;\n }\n .multiple-choice-options label {\n width: 100%;\n cursor: pointer;\n padding: 10px;\n border: 1.5px solid rgba(0,0,0,.25);\n border-radius: 4px;\n background: white;\n }\n .multiple-choice-options .choice-option-open label {\n padding-right: 30px;\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n max-width: 100%;\n }\n .multiple-choice-options .choice-option-open label span {\n width: 100%;\n }\n .multiple-choice-options .choice-option-open input:disabled + label {\n opacity: 0.6;\n }\n .multiple-choice-options .choice-option-open label input {\n position: relative;\n opacity: 1;\n flex-grow: 1;\n border: 0;\n outline: 0;\n }\n .thank-you-message-body {\n margin-top: 6px;\n font-size: 14px;\n background: ").concat((null==o?void 0:o.backgroundColor)||"#eeeded",";\n }\n .thank-you-message-header {\n margin: 10px 0px 0px;\n background: ").concat((null==o?void 0:o.backgroundColor)||"#eeeded",";\n }\n .thank-you-message-container .form-submit {\n margin-top: 20px;\n margin-bottom: 10px;\n }\n .thank-you-message-countdown {\n margin-left: 6px;\n }\n .bottom-section {\n margin-top: 14px;\n }\n ")),u=Object.assign(fn.createElement("style"),{innerText:s});Array.from(i.children).forEach((e=>{e instanceof HTMLStyleElement&&i.removeChild(e)})),i.appendChild(u);var d=Se((null===(n=r.appearance)||void 0===n?void 0:n.backgroundColor)||He.backgroundColor||"white");B(Oe(mn,{survey:r,forceDisableHtml:a,style:{position:"relative",right:0,borderBottom:"1px solid ".concat(null===(t=r.appearance)||void 0===t?void 0:t.borderColor),borderRadius:10,color:d},onPreviewSubmit:c,previewPageIndex:l,removeSurveyFromFocus:()=>{},isPopup:!0},"surveys-render-preview"),i)},vn=e=>{var n,t,{survey:o,root:r,forceDisableHtml:i}=e,l=(t=null===(n=o.appearance)||void 0===n?void 0:n.widgetColor,"\n .ph-survey-widget-tab {\n position: fixed;\n top: 50%;\n right: 0;\n background: ".concat(t||"#e0a045",";\n color: white;\n transform: rotate(-90deg) translate(0, -100%);\n transform-origin: right top;\n min-width: 40px;\n padding: 8px 12px;\n font-weight: 500;\n border-radius: 3px 3px 0 0;\n text-align: center;\n cursor: pointer;\n z-index: 9999999;\n }\n .ph-survey-widget-tab:hover {\n padding-bottom: 13px;\n }\n .ph-survey-widget-button {\n position: fixed;\n }\n ")),a=Object.assign(fn.createElement("style"),{innerText:l});r.appendChild(a),B(Oe(gn,{forceDisableHtml:i,survey:o,readOnly:!0,removeSurveyFromFocus:()=>{}},"feedback-render-preview"),r)};function mn(e){var t,o,r,i,l,a,{survey:c,forceDisableHtml:s,posthog:u,style:d,previewPageIndex:p,removeSurveyFromFocus:_,isPopup:f,onPreviewSubmit:h=(()=>{})}=e,v=Number.isInteger(p),m=null!==(t=c.appearance)&&void 0!==t&&t.surveyPopupDelaySeconds?1e3*c.appearance.surveyPopupDelaySeconds:0,{isPopupVisible:b,isSurveySent:g,setIsPopupVisible:y}=function(e,n,t,o,r){var[i,l]=te(o||0===t),[a,c]=te(!1);return oe((()=>{if(!o&&n){var i,a=()=>{r(e.id),l(!1)},s=()=>{var n,t;null!==(n=e.appearance)&&void 0!==n&&n.displayThankYouMessage?(c(!0),r(e.id),null!==(t=e.appearance)&&void 0!==t&&t.autoDisappear&&setTimeout((()=>{l(!1)}),5e3)):(r(e.id),l(!1))},u=()=>{var t;l(!0),_n.dispatchEvent(new Event("PHSurveyShown")),n.capture("survey shown",{$survey_name:e.name,$survey_id:e.id,$survey_iteration:e.current_iteration,$survey_iteration_start_date:e.current_iteration_start_date,sessionRecordingUrl:null===(t=n.get_session_replay_url)||void 0===t?void 0:t.call(n)}),localStorage.setItem("lastSeenSurveyDate",(new Date).toISOString())};return _n.addEventListener("PHSurveyClosed",a),_n.addEventListener("PHSurveySent",s),t>0?(i=setTimeout((()=>{u()}),t),()=>{clearTimeout(i),_n.removeEventListener("PHSurveyClosed",a),_n.removeEventListener("PHSurveySent",s)}):(u(),()=>{_n.removeEventListener("PHSurveyClosed",a),_n.removeEventListener("PHSurveySent",s)})}}),[]),{isPopupVisible:i,isSurveySent:a,setIsPopupVisible:l}}(c,u,m,v,_),C=g||p===c.questions.length,k=null!==(o=d)&&void 0!==o&&o.left&&ke(null===(r=d)||void 0===r?void 0:r.left)?{left:d.left-40}:{};return v&&((d=d||{}).left="unset",d.right="unset",d.transform="unset"),b?Oe(Ee.Provider,{value:{isPreviewMode:v,previewPageIndex:p,handleCloseSurveyPopup:()=>Me(c,u,v),isPopup:f||!1,onPreviewSubmit:h},children:C?Oe(Ke,{header:(null===(i=c.appearance)||void 0===i?void 0:i.thankYouMessageHeader)||"Thank you!",description:(null===(l=c.appearance)||void 0===l?void 0:l.thankYouMessageDescription)||"",forceDisableHtml:!!s,contentType:null===(a=c.appearance)||void 0===a?void 0:a.thankYouMessageDescriptionContentType,appearance:c.appearance||He,styleOverrides:n(n({},d),k),onClose:()=>y(!1)}):Oe(bn,{survey:c,forceDisableHtml:!!s,posthog:u,styleOverrides:d})}):Oe(x,{})}function bn(e){var t,o,{survey:r,forceDisableHtml:l,posthog:a,styleOverrides:c}=e,s=Se((null===(t=r.appearance)||void 0===t?void 0:t.backgroundColor)||He.backgroundColor),[u,d]=te({}),{isPreviewMode:p,previewPageIndex:_,handleCloseSurveyPopup:f,isPopup:h,onPreviewSubmit:v}=le(Ee),[m,b]=te(_||0),g=ie((()=>Ie(r)),[r]);oe((()=>{b(null!=_?_:0)}),[_]);return Oe("form",{className:"survey-form",style:h?n({color:s,borderColor:null===(o=r.appearance)||void 0===o?void 0:o.borderColor},c):{},children:g.map(((e,t)=>{var o,{originalQuestionIndex:c}=e;return(p?m===c:m===t)&&Oe("div",{className:"survey-box",style:h?{backgroundColor:(null===(o=r.appearance)||void 0===o?void 0:o.backgroundColor)||He.backgroundColor}:{},children:[h&&Oe(Je,{onClick:()=>f()}),yn({question:e,forceDisableHtml:l,displayQuestionIndex:t,appearance:r.appearance||He,onSubmit:e=>(e=>{var{res:t,originalQuestionIndex:o,displayQuestionIndex:l}=e;if(a){var c=0===o?"$survey_response":"$survey_response_".concat(o);if(d(n(n({},u),{},{[c]:t})),a.getNextSurveyStep){var s=a.getNextSurveyStep(r,l,t);s===i.End?Le(n(n({},u),{},{[c]:t}),r,a):b(s)}else l===r.questions.length-1?Le(n(n({},u),{},{[c]:t}),r,a):b(l+1)}})({res:e,originalQuestionIndex:c,displayQuestionIndex:t}),onPreviewSubmit:v})]})}))})}function gn(e){var n,t,{survey:o,forceDisableHtml:r,posthog:i,readOnly:l,removeSurveyFromFocus:a}=e,[c,s]=te(!1),[u,d]=te({}),p=re(null);return oe((()=>{var e,n;if(!l&&i){if("tab"===(null===(e=o.appearance)||void 0===e?void 0:e.widgetType)&&p.current){var t,r=p.current.getBoundingClientRect(),a={top:"50%",left:parseInt("".concat(r.right-360)),bottom:"auto",borderRadius:10,borderBottom:"1.5px solid ".concat((null===(t=o.appearance)||void 0===t?void 0:t.borderColor)||"#c9c6c6")};d(a)}if("selector"===(null===(n=o.appearance)||void 0===n?void 0:n.widgetType)){var u=fn.querySelector(o.appearance.widgetSelector||"");null==u||u.addEventListener("click",(()=>{s(!c)})),null==u||u.setAttribute("PHWidgetSurveyClickListener","true")}}}),[]),Oe(x,{children:["tab"===(null===(n=o.appearance)||void 0===n?void 0:n.widgetType)&&Oe("div",{className:"ph-survey-widget-tab",ref:p,onClick:()=>!l&&s(!c),style:{color:Se(o.appearance.widgetColor)},children:[Oe("div",{className:"ph-survey-widget-tab-icon"}),(null===(t=o.appearance)||void 0===t?void 0:t.widgetLabel)||""]}),c&&Oe(mn,{posthog:i,survey:o,forceDisableHtml:r,style:u,removeSurveyFromFocus:a,isPopup:!0},"feedback-widget-survey")]})}var yn=e=>{var{question:t,forceDisableHtml:o,displayQuestionIndex:i,appearance:l,onSubmit:a,onPreviewSubmit:c}=e,s={[r.Open]:nn,[r.Link]:tn,[r.Rating]:on,[r.SingleChoice]:ln,[r.MultipleChoice]:ln},u={question:t,forceDisableHtml:o,appearance:l,onPreviewSubmit:e=>{c(e)},onSubmit:e=>{a(e)}},d={[r.Open]:{},[r.Link]:{},[r.Rating]:{displayQuestionIndex:i},[r.SingleChoice]:{displayQuestionIndex:i},[r.MultipleChoice]:{displayQuestionIndex:i}},p=s[t.type],_=n(n({},u),d[t.type]);return Oe(p,n({},_))};export{vn as renderFeedbackWidgetPreview,hn as renderSurveysPreview}; | ||
function e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function n(n){for(var o=1;o<arguments.length;o++){var r=null!=arguments[o]?arguments[o]:{};o%2?e(Object(r),!0).forEach((function(e){t(n,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):e(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}function t(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var o,r,i;!function(e){e.Popover="popover",e.API="api",e.Widget="widget"}(o||(o={})),function(e){e.Open="open",e.MultipleChoice="multiple_choice",e.SingleChoice="single_choice",e.Rating="rating",e.Link="link"}(r||(r={})),function(e){e.NextQuestion="next_question",e.End="end",e.ResponseBased="response_based",e.SpecificQuestion="specific_question"}(i||(i={}));var l,a,c,s,u,d,p,_,f={},h=[],v=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,m=Array.isArray;function b(e,n){for(var t in n)e[t]=n[t];return e}function g(e){var n=e.parentNode;n&&n.removeChild(e)}function y(e,n,t){var o,r,i,a={};for(i in n)"key"==i?o=n[i]:"ref"==i?r=n[i]:a[i]=n[i];if(arguments.length>2&&(a.children=arguments.length>3?l.call(arguments,2):t),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===a[i]&&(a[i]=e.defaultProps[i]);return C(e,a,o,r,null)}function C(e,n,t,o,r){var i={type:e,props:n,key:t,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==r?++c:r,__i:-1,__u:0};return null==r&&null!=a.vnode&&a.vnode(i),i}function x(e){return e.children}function k(e,n){this.props=e,this.context=n}function w(e,n){if(null==n)return e.__?w(e.__,e.__i+1):null;for(var t;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e)return t.__e;return"function"==typeof e.type?w(e):null}function q(e){var n,t;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,n=0;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e){e.__e=e.__c.base=t.__e;break}return q(e)}}function T(e){(!e.__d&&(e.__d=!0)&&s.push(e)&&!S.__r++||u!==a.debounceRendering)&&((u=a.debounceRendering)||d)(S)}function S(){var e,n,t,o,r,i,l,c,u;for(s.sort(p);e=s.shift();)e.__d&&(n=s.length,o=void 0,i=(r=(t=e).__v).__e,c=[],u=[],(l=t.__P)&&((o=b({},r)).__v=r.__v+1,a.vnode&&a.vnode(o),N(l,o,r,t.__n,void 0!==l.ownerSVGElement,32&r.__u?[i]:null,c,null==i?w(r):i,!!(32&r.__u),u),o.__.__k[o.__i]=o,V(c,o,u),o.__e!=i&&q(o)),s.length>n&&s.sort(p));S.__r=0}function H(e,n,t,o,r,i,l,a,c,s,u){var d,p,_,v,b,g=o&&o.__k||h,y=n.length;for(t.__d=c,function(e,n,t){var o,r,i,l,a,c=n.length,s=t.length,u=s,d=0;for(e.__k=[],o=0;o<c;o++)null!=(r=e.__k[o]=null==(r=n[o])||"boolean"==typeof r||"function"==typeof r?null:"string"==typeof r||"number"==typeof r||"bigint"==typeof r||r.constructor==String?C(null,r,null,null,r):m(r)?C(x,{children:r},null,null,null):void 0===r.constructor&&r.__b>0?C(r.type,r.props,r.key,r.ref?r.ref:null,r.__v):r)?(r.__=e,r.__b=e.__b+1,a=L(r,t,l=o+d,u),r.__i=a,i=null,-1!==a&&(u--,(i=t[a])&&(i.__u|=131072)),null==i||null===i.__v?(-1==a&&d--,"function"!=typeof r.type&&(r.__u|=65536)):a!==l&&(a===l+1?d++:a>l?u>c-l?d+=a-l:d--:d=a<l&&a==l-1?a-l:0,a!==o+d&&(r.__u|=65536))):(i=t[o])&&null==i.key&&i.__e&&(i.__e==e.__d&&(e.__d=w(i)),j(i,i,!1),t[o]=null,u--);if(u)for(o=0;o<s;o++)null!=(i=t[o])&&0==(131072&i.__u)&&(i.__e==e.__d&&(e.__d=w(i)),j(i,i))}(t,n,g),c=t.__d,d=0;d<y;d++)null!=(_=t.__k[d])&&"boolean"!=typeof _&&"function"!=typeof _&&(p=-1===_.__i?f:g[_.__i]||f,_.__i=d,N(e,_,p,r,i,l,a,c,s,u),v=_.__e,_.ref&&p.ref!=_.ref&&(p.ref&&Q(p.ref,null,_),u.push(_.ref,_.__c||v,_)),null==b&&null!=v&&(b=v),65536&_.__u||p.__k===_.__k?c=P(_,c,e):"function"==typeof _.type&&void 0!==_.__d?c=_.__d:v&&(c=v.nextSibling),_.__d=void 0,_.__u&=-196609);t.__d=c,t.__e=b}function P(e,n,t){var o,r;if("function"==typeof e.type){for(o=e.__k,r=0;o&&r<o.length;r++)o[r]&&(o[r].__=e,n=P(o[r],n,t));return n}return e.__e!=n&&(t.insertBefore(e.__e,n||null),n=e.__e),n&&n.nextSibling}function L(e,n,t,o){var r=e.key,i=e.type,l=t-1,a=t+1,c=n[t];if(null===c||c&&r==c.key&&i===c.type)return t;if(o>(null!=c&&0==(131072&c.__u)?1:0))for(;l>=0||a<n.length;){if(l>=0){if((c=n[l])&&0==(131072&c.__u)&&r==c.key&&i===c.type)return l;l--}if(a<n.length){if((c=n[a])&&0==(131072&c.__u)&&r==c.key&&i===c.type)return a;a++}}return-1}function M(e,n,t){"-"===n[0]?e.setProperty(n,null==t?"":t):e[n]=null==t?"":"number"!=typeof t||v.test(n)?t:t+"px"}function Z(e,n,t,o,r){var i;e:if("style"===n)if("string"==typeof t)e.style.cssText=t;else{if("string"==typeof o&&(e.style.cssText=o=""),o)for(n in o)t&&n in t||M(e.style,n,"");if(t)for(n in t)o&&t[n]===o[n]||M(e.style,n,t[n])}else if("o"===n[0]&&"n"===n[1])i=n!==(n=n.replace(/(PointerCapture)$|Capture$/,"$1")),n=n.toLowerCase()in e?n.toLowerCase().slice(2):n.slice(2),e.l||(e.l={}),e.l[n+i]=t,t?o?t.u=o.u:(t.u=Date.now(),e.addEventListener(n,i?I:D,i)):e.removeEventListener(n,i?I:D,i);else{if(r)n=n.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==n&&"height"!==n&&"href"!==n&&"list"!==n&&"form"!==n&&"tabIndex"!==n&&"download"!==n&&"rowSpan"!==n&&"colSpan"!==n&&"role"!==n&&n in e)try{e[n]=null==t?"":t;break e}catch(e){}"function"==typeof t||(null==t||!1===t&&"-"!==n[4]?e.removeAttribute(n):e.setAttribute(n,t))}}function D(e){var n=this.l[e.type+!1];if(e.t){if(e.t<=n.u)return}else e.t=Date.now();return n(a.event?a.event(e):e)}function I(e){return this.l[e.type+!0](a.event?a.event(e):e)}function N(e,n,t,o,r,i,l,c,s,u){var d,p,_,f,h,v,g,y,C,w,q,T,S,P,L,M=n.type;if(void 0!==n.constructor)return null;128&t.__u&&(s=!!(32&t.__u),i=[c=n.__e=t.__e]),(d=a.__b)&&d(n);e:if("function"==typeof M)try{if(y=n.props,C=(d=M.contextType)&&o[d.__c],w=d?C?C.props.value:d.__:o,t.__c?g=(p=n.__c=t.__c).__=p.__E:("prototype"in M&&M.prototype.render?n.__c=p=new M(y,w):(n.__c=p=new k(y,w),p.constructor=M,p.render=O),C&&C.sub(p),p.props=y,p.state||(p.state={}),p.context=w,p.__n=o,_=p.__d=!0,p.__h=[],p._sb=[]),null==p.__s&&(p.__s=p.state),null!=M.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=b({},p.__s)),b(p.__s,M.getDerivedStateFromProps(y,p.__s))),f=p.props,h=p.state,p.__v=n,_)null==M.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else{if(null==M.getDerivedStateFromProps&&y!==f&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(y,w),!p.__e&&(null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(y,p.__s,w)||n.__v===t.__v)){for(n.__v!==t.__v&&(p.props=y,p.state=p.__s,p.__d=!1),n.__e=t.__e,n.__k=t.__k,n.__k.forEach((function(e){e&&(e.__=n)})),q=0;q<p._sb.length;q++)p.__h.push(p._sb[q]);p._sb=[],p.__h.length&&l.push(p);break e}null!=p.componentWillUpdate&&p.componentWillUpdate(y,p.__s,w),null!=p.componentDidUpdate&&p.__h.push((function(){p.componentDidUpdate(f,h,v)}))}if(p.context=w,p.props=y,p.__P=e,p.__e=!1,T=a.__r,S=0,"prototype"in M&&M.prototype.render){for(p.state=p.__s,p.__d=!1,T&&T(n),d=p.render(p.props,p.state,p.context),P=0;P<p._sb.length;P++)p.__h.push(p._sb[P]);p._sb=[]}else do{p.__d=!1,T&&T(n),d=p.render(p.props,p.state,p.context),p.state=p.__s}while(p.__d&&++S<25);p.state=p.__s,null!=p.getChildContext&&(o=b(b({},o),p.getChildContext())),_||null==p.getSnapshotBeforeUpdate||(v=p.getSnapshotBeforeUpdate(f,h)),H(e,m(L=null!=d&&d.type===x&&null==d.key?d.props.children:d)?L:[L],n,t,o,r,i,l,c,s,u),p.base=n.__e,n.__u&=-161,p.__h.length&&l.push(p),g&&(p.__E=p.__=null)}catch(e){n.__v=null,s||null!=i?(n.__e=c,n.__u|=s?160:32,i[i.indexOf(c)]=null):(n.__e=t.__e,n.__k=t.__k),a.__e(e,n,t)}else null==i&&n.__v===t.__v?(n.__k=t.__k,n.__e=t.__e):n.__e=E(t.__e,n,t,o,r,i,l,s,u);(d=a.diffed)&&d(n)}function V(e,n,t){n.__d=void 0;for(var o=0;o<t.length;o++)Q(t[o],t[++o],t[++o]);a.__c&&a.__c(n,e),e.some((function(n){try{e=n.__h,n.__h=[],e.some((function(e){e.call(n)}))}catch(e){a.__e(e,n.__v)}}))}function E(e,n,t,o,r,i,a,c,s){var u,d,p,_,h,v,b,y=t.props,C=n.props,x=n.type;if("svg"===x&&(r=!0),null!=i)for(u=0;u<i.length;u++)if((h=i[u])&&"setAttribute"in h==!!x&&(x?h.localName===x:3===h.nodeType)){e=h,i[u]=null;break}if(null==e){if(null===x)return document.createTextNode(C);e=r?document.createElementNS("http://www.w3.org/2000/svg",x):document.createElement(x,C.is&&C),i=null,c=!1}if(null===x)y===C||c&&e.data===C||(e.data=C);else{if(i=i&&l.call(e.childNodes),y=t.props||f,!c&&null!=i)for(y={},u=0;u<e.attributes.length;u++)y[(h=e.attributes[u]).name]=h.value;for(u in y)h=y[u],"children"==u||("dangerouslySetInnerHTML"==u?p=h:"key"===u||u in C||Z(e,u,null,h,r));for(u in C)h=C[u],"children"==u?_=h:"dangerouslySetInnerHTML"==u?d=h:"value"==u?v=h:"checked"==u?b=h:"key"===u||c&&"function"!=typeof h||y[u]===h||Z(e,u,h,y[u],r);if(d)c||p&&(d.__html===p.__html||d.__html===e.innerHTML)||(e.innerHTML=d.__html),n.__k=[];else if(p&&(e.innerHTML=""),H(e,m(_)?_:[_],n,t,o,r&&"foreignObject"!==x,i,a,i?i[0]:t.__k&&w(t,0),c,s),null!=i)for(u=i.length;u--;)null!=i[u]&&g(i[u]);c||(u="value",void 0!==v&&(v!==e[u]||"progress"===x&&!v||"option"===x&&v!==y[u])&&Z(e,u,v,y[u],!1),u="checked",void 0!==b&&b!==e[u]&&Z(e,u,b,y[u],!1))}return e}function Q(e,n,t){try{"function"==typeof e?e(n):e.current=n}catch(e){a.__e(e,t)}}function j(e,n,t){var o,r;if(a.unmount&&a.unmount(e),(o=e.ref)&&(o.current&&o.current!==e.__e||Q(o,null,n)),null!=(o=e.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(e){a.__e(e,n)}o.base=o.__P=null,e.__c=void 0}if(o=e.__k)for(r=0;r<o.length;r++)o[r]&&j(o[r],n,t||"function"!=typeof e.type);t||null==e.__e||g(e.__e),e.__=e.__e=e.__d=void 0}function O(e,n,t){return this.constructor(e,t)}function B(e,n,t){var o,r,i,c;a.__&&a.__(e,n),r=(o="function"==typeof t)?null:n.__k,i=[],c=[],N(n,e=(!o&&t||n).__k=y(x,null,[e]),r||f,f,void 0!==n.ownerSVGElement,!o&&t?[t]:r?null:n.firstChild?l.call(n.childNodes):null,i,!o&&t?t:r?r.__e:n.firstChild,o,c),V(i,e,c)}function A(e,n,t){var o,r,i,a,c=b({},e.props);for(i in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),n)"key"==i?o=n[i]:"ref"==i?r=n[i]:c[i]=void 0===n[i]&&void 0!==a?a[i]:n[i];return arguments.length>2&&(c.children=arguments.length>3?l.call(arguments,2):t),C(e.type,c,o||e.key,r||e.ref,null)}l=h.slice,a={__e:function(e,n,t,o){for(var r,i,l;n=n.__;)if((r=n.__c)&&!r.__)try{if((i=r.constructor)&&null!=i.getDerivedStateFromError&&(r.setState(i.getDerivedStateFromError(e)),l=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(e,o||{}),l=r.__d),l)return r.__E=r}catch(n){e=n}throw e}},c=0,k.prototype.setState=function(e,n){var t;t=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=b({},this.state),"function"==typeof e&&(e=e(b({},t),this.props)),e&&b(t,e),null!=e&&this.__v&&(n&&this._sb.push(n),T(this))},k.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),T(this))},k.prototype.render=x,s=[],d="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,p=function(e,n){return e.__v.__b-n.__v.__b},S.__r=0,_=0;var F,U,$,z,R=0,W=[],Y=[],X=a.__b,G=a.__r,J=a.diffed,K=a.__c,ee=a.unmount;function ne(e,n){a.__h&&a.__h(U,e,R||n),R=0;var t=U.__H||(U.__H={__:[],__h:[]});return e>=t.__.length&&t.__.push({__V:Y}),t.__[e]}function te(e){return R=1,function(e,n,t){var o=ne(F++,2);if(o.t=e,!o.__c&&(o.__=[_e(void 0,n),function(e){var n=o.__N?o.__N[0]:o.__[0],t=o.t(n,e);n!==t&&(o.__N=[t,o.__[1]],o.__c.setState({}))}],o.__c=U,!U.u)){var r=function(e,n,t){if(!o.__c.__H)return!0;var r=o.__c.__H.__.filter((function(e){return e.__c}));if(r.every((function(e){return!e.__N})))return!i||i.call(this,e,n,t);var l=!1;return r.forEach((function(e){if(e.__N){var n=e.__[0];e.__=e.__N,e.__N=void 0,n!==e.__[0]&&(l=!0)}})),!(!l&&o.__c.props===e)&&(!i||i.call(this,e,n,t))};U.u=!0;var i=U.shouldComponentUpdate,l=U.componentWillUpdate;U.componentWillUpdate=function(e,n,t){if(this.__e){var o=i;i=void 0,r(e,n,t),i=o}l&&l.call(this,e,n,t)},U.shouldComponentUpdate=r}return o.__N||o.__}(_e,e)}function oe(e,n){var t=ne(F++,3);!a.__s&&pe(t.__H,n)&&(t.__=e,t.i=n,U.__H.__h.push(t))}function re(e){return R=5,ie((function(){return{current:e}}),[])}function ie(e,n){var t=ne(F++,7);return pe(t.__H,n)?(t.__V=e(),t.i=n,t.__h=e,t.__V):t.__}function le(e){var n=U.context[e.__c],t=ne(F++,9);return t.c=e,n?(null==t.__&&(t.__=!0,n.sub(U)),n.props.value):e.__}function ae(){for(var e;e=W.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ue),e.__H.__h.forEach(de),e.__H.__h=[]}catch(n){e.__H.__h=[],a.__e(n,e.__v)}}a.__b=function(e){U=null,X&&X(e)},a.__r=function(e){G&&G(e),F=0;var n=(U=e.__c).__H;n&&($===U?(n.__h=[],U.__h=[],n.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=Y,e.__N=e.i=void 0}))):(n.__h.forEach(ue),n.__h.forEach(de),n.__h=[],F=0)),$=U},a.diffed=function(e){J&&J(e);var n=e.__c;n&&n.__H&&(n.__H.__h.length&&(1!==W.push(n)&&z===a.requestAnimationFrame||((z=a.requestAnimationFrame)||se)(ae)),n.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==Y&&(e.__=e.__V),e.i=void 0,e.__V=Y}))),$=U=null},a.__c=function(e,n){n.some((function(e){try{e.__h.forEach(ue),e.__h=e.__h.filter((function(e){return!e.__||de(e)}))}catch(t){n.some((function(e){e.__h&&(e.__h=[])})),n=[],a.__e(t,e.__v)}})),K&&K(e,n)},a.unmount=function(e){ee&&ee(e);var n,t=e.__c;t&&t.__H&&(t.__H.__.forEach((function(e){try{ue(e)}catch(e){n=e}})),t.__H=void 0,n&&a.__e(n,t.__v))};var ce="function"==typeof requestAnimationFrame;function se(e){var n,t=function(){clearTimeout(o),ce&&cancelAnimationFrame(n),setTimeout(e)},o=setTimeout(t,100);ce&&(n=requestAnimationFrame(t))}function ue(e){var n=U,t=e.__c;"function"==typeof t&&(e.__c=void 0,t()),U=n}function de(e){var n=U;e.__c=e.__(),U=n}function pe(e,n){return!e||e.length!==n.length||n.some((function(n,t){return n!==e[t]}))}function _e(e,n){return"function"==typeof n?n(e):n}var fe,he="undefined"!=typeof window?window:void 0,ve="undefined"!=typeof globalThis?globalThis:he,me=null==ve?void 0:ve.navigator,be=null==ve?void 0:ve.document;null==ve||ve.location,null==ve||ve.fetch,null!=ve&&ve.XMLHttpRequest&&"withCredentials"in new ve.XMLHttpRequest&&ve.XMLHttpRequest,null==ve||ve.AbortController,null==me||me.userAgent,function(e){e.GZipJS="gzip-js",e.Base64="base64"}(fe||(fe={}));var ge=Array.isArray,ye=Object.prototype.toString,Ce=ge||function(e){return"[object Array]"===ye.call(e)},xe=e=>null===e,ke=e=>"[object Number]"==ye.call(e);var we=he,qe="seenSurvey_";function Te(e){if("#"===e[0]){var n=e.replace(/^#/,"");return"rgb("+parseInt(n.slice(0,2),16)+","+parseInt(n.slice(2,4),16)+","+parseInt(n.slice(4,6),16)+")"}return"rgb(255, 255, 255)"}function Se(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Pe;"#"===n[0]&&(e=Te(n)),n.startsWith("rgb")&&(e=n);var t={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}[n.toLowerCase()];if(t&&(e=Te(t)),!e)return"black";var o=e.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);if(o){var r=parseInt(o[1]),i=parseInt(o[2]),l=parseInt(o[3]);return Math.sqrt(r*r*.299+i*i*.587+l*l*.114)>127.5?"black":"white"}return"black"}var He={backgroundColor:"#eeeded",submitButtonColor:"black",submitButtonTextColor:"white",ratingButtonColor:"white",ratingButtonActiveColor:"black",borderColor:"#c9c6c6",placeholder:"Start typing...",whiteLabel:!1,displayThankYouMessage:!0,thankYouMessageHeader:"Thank you for your feedback!",position:"right"},Pe="#eeeded",Le=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;r&&(localStorage.setItem(Ne(o),"true"),r.capture("survey sent",n(n({$survey_name:o.name,$survey_id:o.id,$survey_iteration:o.current_iteration,$survey_iteration_start_date:o.current_iteration_start_date,$survey_questions:o.questions.map((e=>e.question)),sessionRecordingUrl:null===(e=r.get_session_replay_url)||void 0===e?void 0:e.call(r)},t),{},{$set:{[Ve(o,"responded")]:!0}})),we.dispatchEvent(new Event("PHSurveySent")))},Me=(e,n,t)=>{var o;!t&&n&&(n.capture("survey dismissed",{$survey_name:e.name,$survey_id:e.id,$survey_iteration:e.current_iteration,$survey_iteration_start_date:e.current_iteration_start_date,sessionRecordingUrl:null===(o=n.get_session_replay_url)||void 0===o?void 0:o.call(n),$set:{[Ve(e,"dismissed")]:!0}}),localStorage.setItem(Ne(e),"true"),we.dispatchEvent(new Event("PHSurveyClosed")))},Ze=e=>e.map((e=>({sort:Math.floor(10*Math.random()),value:e}))).sort(((e,n)=>e.sort-n.sort)).map((e=>e.value)),De=(e,n)=>e.length===n.length&&e.every(((e,t)=>e===n[t]))?n.reverse():n,Ie=e=>(e.questions.forEach(((e,n)=>{e.originalQuestionIndex=n})),e.appearance&&e.appearance.shuffleQuestions?De(e.questions,Ze(e.questions)):e.questions),Ne=e=>{var n="".concat(qe).concat(e.id);return e.current_iteration&&e.current_iteration>0&&(n="".concat(qe).concat(e.id,"_").concat(e.current_iteration)),n},Ve=(e,n)=>{var t="$survey_".concat(n,"/").concat(e.id);return e.current_iteration&&e.current_iteration>0&&(t="$survey_".concat(n,"/").concat(e.id,"/").concat(e.current_iteration)),t},Ee=function(e,n){var t={__c:n="__cC"+_++,__:e,Consumer:function(e,n){return e.children(n)},Provider:function(e){var t,o;return this.getChildContext||(t=[],(o={})[n]=this,this.getChildContext=function(){return o},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&t.some((function(e){e.__e=!0,T(e)}))},this.sub=function(e){t.push(e);var n=e.componentWillUnmount;e.componentWillUnmount=function(){t.splice(t.indexOf(e),1),n&&n.call(e)}}),e.children}};return t.Provider.__=t.Consumer.contextType=t}({isPreviewMode:!1,previewPageIndex:0,handleCloseSurveyPopup:()=>{},isPopup:!0,onPreviewSubmit:()=>{}}),Qe=e=>{var{component:n,children:t,renderAsHtml:o,style:r}=e;return A(n,o?{dangerouslySetInnerHTML:{__html:t},style:r}:{children:t,style:r})},je=0;function Oe(e,n,t,o,r,i){var l,c,s={};for(c in n)"ref"==c?l=n[c]:s[c]=n[c];var u={type:e,props:s,key:t,ref:l,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--je,__i:-1,__u:0,__source:r,__self:i};if("function"==typeof e&&(l=e.defaultProps))for(c in l)void 0===s[c]&&(s[c]=l[c]);return a.vnode&&a.vnode(u),u}var Be=Oe("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Oe("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm146 272q66 0 121.5-35.5T682-393h-52q-23 40-63 61.5T480.5-310q-46.5 0-87-21T331-393h-53q26 61 81 96.5T480-261Zm0 181q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),Ae=Oe("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Oe("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm20 194h253v-49H354v49ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),Fe=Oe("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Oe("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm146.174 116Q413-417 358.5-379.5T278-280h53q22-42 62.173-65t87.5-23Q528-368 567.5-344.5T630-280h52q-25-63-79.826-100-54.826-37-122-37ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),Ue=Oe("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Oe("path",{d:"M480-417q-67 0-121.5 37.5T278-280h404q-25-63-80-100t-122-37Zm-183-72 50-45 45 45 31-36-45-45 45-45-31-36-45 45-50-45-31 36 45 45-45 45 31 36Zm272 0 44-45 51 45 31-36-45-45 45-45-31-36-51 45-44-45-31 36 44 45-44 45 31 36ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142 0 241-99t99-241q0-142-99-241t-241-99q-142 0-241 99t-99 241q0 142 99 241t241 99Z"})}),$e=Oe("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Oe("path",{d:"M479.504-261Q537-261 585.5-287q48.5-26 78.5-72.4 6-11.6-.75-22.6-6.75-11-20.25-11H316.918Q303-393 296.5-382t-.5 22.6q30 46.4 78.5 72.4 48.5 26 105.004 26ZM347-578l27 27q7.636 8 17.818 8Q402-543 410-551q8-8 8-18t-8-18l-42-42q-8.8-9-20.9-9-12.1 0-21.1 9l-42 42q-8 7.636-8 17.818Q276-559 284-551q8 8 18 8t18-8l27-27Zm267 0 27 27q7.714 8 18 8t18-8q8-7.636 8-17.818Q685-579 677-587l-42-42q-8.8-9-20.9-9-12.1 0-21.1 9l-42 42q-8 7.714-8 18t8 18q7.636 8 17.818 8Q579-543 587-551l27-27ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),ze=Oe("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Oe("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.164752 0.164752C0.384422 -0.0549175 0.740578 -0.0549175 0.960248 0.164752L6 5.20451L11.0398 0.164752C11.2594 -0.0549175 11.6156 -0.0549175 11.8352 0.164752C12.0549 0.384422 12.0549 0.740578 11.8352 0.960248L6.79549 6L11.8352 11.0398C12.0549 11.2594 12.0549 11.6156 11.8352 11.8352C11.6156 12.0549 11.2594 12.0549 11.0398 11.8352L6 6.79549L0.960248 11.8352C0.740578 12.0549 0.384422 12.0549 0.164752 11.8352C-0.0549175 11.6156 -0.0549175 11.2594 0.164752 11.0398L5.20451 6L0.164752 0.960248C-0.0549175 0.740578 -0.0549175 0.384422 0.164752 0.164752Z",fill:"black"})}),Re=Oe("svg",{width:"77",height:"14",viewBox:"0 0 77 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Oe("g",{"clip-path":"url(#clip0_2415_6911)",children:[Oe("mask",{id:"mask0_2415_6911",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"77",height:"14",children:Oe("path",{d:"M0.5 0H76.5V14H0.5V0Z",fill:"white"})}),Oe("g",{mask:"url(#mask0_2415_6911)",children:[Oe("path",{d:"M5.77226 8.02931C5.59388 8.37329 5.08474 8.37329 4.90634 8.02931L4.4797 7.20672C4.41155 7.07535 4.41155 6.9207 4.4797 6.78933L4.90634 5.96669C5.08474 5.62276 5.59388 5.62276 5.77226 5.96669L6.19893 6.78933C6.26709 6.9207 6.26709 7.07535 6.19893 7.20672L5.77226 8.02931ZM5.77226 12.6946C5.59388 13.0386 5.08474 13.0386 4.90634 12.6946L4.4797 11.872C4.41155 11.7406 4.41155 11.586 4.4797 11.4546L4.90634 10.632C5.08474 10.288 5.59388 10.288 5.77226 10.632L6.19893 11.4546C6.26709 11.586 6.26709 11.7406 6.19893 11.872L5.77226 12.6946Z",fill:"#1D4AFF"}),Oe("path",{d:"M0.5 10.9238C0.5 10.508 1.02142 10.2998 1.32637 10.5938L3.54508 12.7327C3.85003 13.0267 3.63405 13.5294 3.20279 13.5294H0.984076C0.716728 13.5294 0.5 13.3205 0.5 13.0627V10.9238ZM0.5 8.67083C0.5 8.79459 0.551001 8.91331 0.641783 9.00081L5.19753 13.3927C5.28831 13.4802 5.41144 13.5294 5.53982 13.5294H8.0421C8.47337 13.5294 8.68936 13.0267 8.3844 12.7327L1.32637 5.92856C1.02142 5.63456 0.5 5.84278 0.5 6.25854V8.67083ZM0.5 4.00556C0.5 4.12932 0.551001 4.24802 0.641783 4.33554L10.0368 13.3927C10.1276 13.4802 10.2508 13.5294 10.3791 13.5294H12.8814C13.3127 13.5294 13.5287 13.0267 13.2237 12.7327L1.32637 1.26329C1.02142 0.969312 0.5 1.17752 0.5 1.59327V4.00556ZM5.33931 4.00556C5.33931 4.12932 5.39033 4.24802 5.4811 4.33554L14.1916 12.7327C14.4965 13.0267 15.0179 12.8185 15.0179 12.4028V9.99047C15.0179 9.86671 14.9669 9.74799 14.8762 9.66049L6.16568 1.26329C5.86071 0.969307 5.33931 1.17752 5.33931 1.59327V4.00556ZM11.005 1.26329C10.7 0.969307 10.1786 1.17752 10.1786 1.59327V4.00556C10.1786 4.12932 10.2296 4.24802 10.3204 4.33554L14.1916 8.06748C14.4965 8.36148 15.0179 8.15325 15.0179 7.7375V5.3252C15.0179 5.20144 14.9669 5.08272 14.8762 4.99522L11.005 1.26329Z",fill:"#F9BD2B"}),Oe("path",{d:"M21.0852 10.981L16.5288 6.58843C16.2238 6.29443 15.7024 6.50266 15.7024 6.91841V13.0627C15.7024 13.3205 15.9191 13.5294 16.1865 13.5294H23.2446C23.5119 13.5294 23.7287 13.3205 23.7287 13.0627V12.5032C23.7287 12.2455 23.511 12.0396 23.2459 12.0063C22.4323 11.9042 21.6713 11.546 21.0852 10.981ZM18.0252 12.0365C17.5978 12.0365 17.251 11.7021 17.251 11.2901C17.251 10.878 17.5978 10.5436 18.0252 10.5436C18.4527 10.5436 18.7996 10.878 18.7996 11.2901C18.7996 11.7021 18.4527 12.0365 18.0252 12.0365Z",fill:"currentColor"}),Oe("path",{d:"M0.5 13.0627C0.5 13.3205 0.716728 13.5294 0.984076 13.5294H3.20279C3.63405 13.5294 3.85003 13.0267 3.54508 12.7327L1.32637 10.5938C1.02142 10.2998 0.5 10.508 0.5 10.9238V13.0627ZM5.33931 5.13191L1.32637 1.26329C1.02142 0.969306 0.5 1.17752 0.5 1.59327V4.00556C0.5 4.12932 0.551001 4.24802 0.641783 4.33554L5.33931 8.86412V5.13191ZM1.32637 5.92855C1.02142 5.63455 0.5 5.84278 0.5 6.25853V8.67083C0.5 8.79459 0.551001 8.91331 0.641783 9.00081L5.33931 13.5294V9.79717L1.32637 5.92855Z",fill:"#1D4AFF"}),Oe("path",{d:"M10.1787 5.3252C10.1787 5.20144 10.1277 5.08272 10.0369 4.99522L6.16572 1.26329C5.8608 0.969306 5.33936 1.17752 5.33936 1.59327V4.00556C5.33936 4.12932 5.39037 4.24802 5.48114 4.33554L10.1787 8.86412V5.3252ZM5.33936 13.5294H8.04214C8.47341 13.5294 8.6894 13.0267 8.38443 12.7327L5.33936 9.79717V13.5294ZM5.33936 5.13191V8.67083C5.33936 8.79459 5.39037 8.91331 5.48114 9.00081L10.1787 13.5294V9.99047C10.1787 9.86671 10.1277 9.74803 10.0369 9.66049L5.33936 5.13191Z",fill:"#F54E00"}),Oe("path",{d:"M29.375 11.6667H31.3636V8.48772H33.0249C34.8499 8.48772 36.0204 7.4443 36.0204 5.83052C36.0204 4.21681 34.8499 3.17334 33.0249 3.17334H29.375V11.6667ZM31.3636 6.84972V4.81136H32.8236C33.5787 4.81136 34.0318 5.19958 34.0318 5.83052C34.0318 6.4615 33.5787 6.84972 32.8236 6.84972H31.3636ZM39.618 11.7637C41.5563 11.7637 42.9659 10.429 42.9659 8.60905C42.9659 6.78905 41.5563 5.45438 39.618 5.45438C37.6546 5.45438 36.2701 6.78905 36.2701 8.60905C36.2701 10.429 37.6546 11.7637 39.618 11.7637ZM38.1077 8.60905C38.1077 7.63838 38.7118 6.97105 39.618 6.97105C40.5116 6.97105 41.1157 7.63838 41.1157 8.60905C41.1157 9.57972 40.5116 10.2471 39.618 10.2471C38.7118 10.2471 38.1077 9.57972 38.1077 8.60905ZM46.1482 11.7637C47.6333 11.7637 48.6402 10.8658 48.6402 9.81025C48.6402 7.33505 45.2294 8.13585 45.2294 7.16518C45.2294 6.8983 45.5189 6.72843 45.9342 6.72843C46.3622 6.72843 46.8782 6.98318 47.0418 7.54132L48.527 6.94678C48.2375 6.06105 47.1677 5.45438 45.8713 5.45438C44.4743 5.45438 43.6058 6.25518 43.6058 7.21372C43.6058 9.53118 46.9663 8.88812 46.9663 9.84665C46.9663 10.1864 46.6391 10.417 46.1482 10.417C45.4434 10.417 44.9525 9.94376 44.8015 9.3735L43.3164 9.93158C43.6436 10.8537 44.6001 11.7637 46.1482 11.7637ZM53.4241 11.606L53.2982 10.0651C53.0843 10.1743 52.8074 10.2106 52.5808 10.2106C52.1278 10.2106 51.8257 9.89523 51.8257 9.34918V7.03172H53.3612V5.55145H51.8257V3.78001H49.9755V5.55145H48.9687V7.03172H49.9755V9.57972C49.9755 11.06 51.0202 11.7637 52.3921 11.7637C52.7696 11.7637 53.122 11.7031 53.4241 11.606ZM59.8749 3.17334V6.47358H56.376V3.17334H54.3874V11.6667H56.376V8.11158H59.8749V11.6667H61.8761V3.17334H59.8749ZM66.2899 11.7637C68.2281 11.7637 69.6378 10.429 69.6378 8.60905C69.6378 6.78905 68.2281 5.45438 66.2899 5.45438C64.3265 5.45438 62.942 6.78905 62.942 8.60905C62.942 10.429 64.3265 11.7637 66.2899 11.7637ZM64.7796 8.60905C64.7796 7.63838 65.3837 6.97105 66.2899 6.97105C67.1835 6.97105 67.7876 7.63838 67.7876 8.60905C67.7876 9.57972 67.1835 10.2471 66.2899 10.2471C65.3837 10.2471 64.7796 9.57972 64.7796 8.60905ZM73.2088 11.4725C73.901 11.4725 74.5177 11.242 74.845 10.8416V11.424C74.845 12.1034 74.2786 12.5767 73.4102 12.5767C72.7935 12.5767 72.2523 12.2854 72.1642 11.788L70.4776 12.0428C70.7042 13.1955 71.925 13.972 73.4102 13.972C75.361 13.972 76.6574 12.8679 76.6574 11.2298V5.55145H74.8324V6.07318C74.4926 5.69705 73.9136 5.45438 73.171 5.45438C71.409 5.45438 70.3014 6.61918 70.3014 8.46345C70.3014 10.3077 71.409 11.4725 73.2088 11.4725ZM72.1012 8.46345C72.1012 7.55345 72.655 6.97105 73.5109 6.97105C74.3793 6.97105 74.9331 7.55345 74.9331 8.46345C74.9331 9.37345 74.3793 9.95585 73.5109 9.95585C72.655 9.95585 72.1012 9.37345 72.1012 8.46345Z",fill:"currentColor"})]})]}),Oe("defs",{children:Oe("clipPath",{id:"clip0_2415_6911",children:Oe("rect",{width:"76",height:"14",fill:"white",transform:"translate(0.5)"})})})]}),We=Oe("svg",{width:"16",height:"12",viewBox:"0 0 16 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Oe("path",{d:"M5.30769 10.6923L4.77736 11.2226C4.91801 11.3633 5.10878 11.4423 5.30769 11.4423C5.5066 11.4423 5.69737 11.3633 5.83802 11.2226L5.30769 10.6923ZM15.5303 1.53033C15.8232 1.23744 15.8232 0.762563 15.5303 0.46967C15.2374 0.176777 14.7626 0.176777 14.4697 0.46967L15.5303 1.53033ZM1.53033 5.85429C1.23744 5.56139 0.762563 5.56139 0.46967 5.85429C0.176777 6.14718 0.176777 6.62205 0.46967 6.91495L1.53033 5.85429ZM5.83802 11.2226L15.5303 1.53033L14.4697 0.46967L4.77736 10.162L5.83802 11.2226ZM0.46967 6.91495L4.77736 11.2226L5.83802 10.162L1.53033 5.85429L0.46967 6.91495Z",fill:"currentColor"})});function Ye(){return Oe("a",{href:"https://posthog.com",target:"_blank",rel:"noopener",className:"footer-branding",children:["Survey by ",Re]})}function Xe(e){var{text:n,submitDisabled:t,appearance:o,onSubmit:r,link:i,onPreviewSubmit:l}=e,{isPreviewMode:a,isPopup:c}=le(Ee),s=o.submitButtonTextColor||Se(o.submitButtonColor||He.submitButtonColor);return Oe("div",{className:"bottom-section",children:[Oe("div",{className:"buttons",children:Oe("button",{className:"form-submit",disabled:t,type:"button",style:c?{color:s}:{},onClick:()=>{a?null==l||l():(i&&(null==he||he.open(i)),r())},children:n})}),!o.whiteLabel&&Oe(Ye,{})]})}function Ge(e){var{question:n,description:t,descriptionContentType:o,backgroundColor:r,forceDisableHtml:i}=e,{isPopup:l}=le(Ee);return Oe("div",{style:l?{backgroundColor:r||He.backgroundColor}:{},children:[Oe("div",{className:"survey-question",children:n}),t&&Qe({component:y("div",{className:"survey-question-description"}),children:t,renderAsHtml:!i&&"text"!==o})]})}function Je(e){var{onClick:n}=e,{isPreviewMode:t}=le(Ee);return Oe("div",{className:"cancel-btn-wrapper",onClick:n,disabled:t,children:Oe("button",{className:"form-cancel",onClick:n,disabled:t,children:ze})})}function Ke(e){var{header:t,description:o,contentType:r,forceDisableHtml:i,appearance:l,onClose:a,styleOverrides:c}=e,s=Se(l.backgroundColor||He.backgroundColor),{isPopup:u}=le(Ee);return Oe(x,{children:Oe("div",{className:"thank-you-message",style:n({},c),children:Oe("div",{className:"thank-you-message-container",children:[u&&Oe(Je,{onClick:()=>a()}),Oe("h3",{className:"thank-you-message-header",style:{color:s},children:t}),o&&Qe({component:y("div",{className:"thank-you-message-body"}),children:o,renderAsHtml:!i&&"text"!==r,style:{color:s}}),u&&Oe(Xe,{text:l.thankYouMessageCloseButtonText||"Close",submitDisabled:!1,appearance:l,onSubmit:()=>a()})]})})})}function en(e){var n,t=re(null),[o,r]=te(null!==(n=e.defaultTextColor)&&void 0!==n?n:"black");return oe((()=>{if(t.current){var e=function(e){var n=we.getComputedStyle(e).backgroundColor;if("rgba(0, 0, 0, 0)"===n)return"black";var t=n.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);if(!t)return"black";var o=parseInt(t[1]),r=parseInt(t[2]),i=parseInt(t[3]);return Math.sqrt(o*o*.299+r*r*.587+i*i*.114)>127.5?"black":"white"}(t.current);r(e)}}),[e.appearance,e.forceUpdate]),{ref:t,textColor:o}}function nn(e){var{question:n,forceDisableHtml:t,appearance:o,onSubmit:r,onPreviewSubmit:i}=e,l=re(null),[a,c]=te("");return Oe("div",{ref:l,children:[Oe(Ge,{question:n.question,description:n.description,descriptionContentType:n.descriptionContentType,backgroundColor:o.backgroundColor,forceDisableHtml:t}),Oe("textarea",{rows:4,placeholder:null==o?void 0:o.placeholder,onInput:e=>c(e.currentTarget.value)}),Oe(Xe,{text:n.buttonText||"Submit",submitDisabled:!a&&!n.optional,appearance:o,onSubmit:()=>r(a),onPreviewSubmit:()=>i(a)})]})}function tn(e){var{question:n,forceDisableHtml:t,appearance:o,onSubmit:r,onPreviewSubmit:i}=e;return Oe(x,{children:[Oe(Ge,{question:n.question,description:n.description,descriptionContentType:n.descriptionContentType,forceDisableHtml:t}),Oe(Xe,{text:n.buttonText||"Submit",submitDisabled:!1,link:n.link,appearance:o,onSubmit:()=>r("link clicked"),onPreviewSubmit:()=>i("link clicked")})]})}function on(e){var{question:n,forceDisableHtml:t,displayQuestionIndex:o,appearance:r,onSubmit:i,onPreviewSubmit:l}=e,a=n.scale,c=10===n.scale?0:1,[s,u]=te(null);return Oe(x,{children:[Oe(Ge,{question:n.question,description:n.description,descriptionContentType:n.descriptionContentType,forceDisableHtml:t,backgroundColor:r.backgroundColor}),Oe("div",{className:"rating-section",children:[Oe("div",{className:"rating-options",children:["emoji"===n.display&&Oe("div",{className:"rating-options-emoji",children:(3===n.scale?an:cn).map(((e,n)=>{var t=n+1===s;return Oe("button",{className:"ratings-emoji question-".concat(o,"-rating-").concat(n," ").concat(t?"rating-active":null),value:n+1,type:"button",onClick:()=>{u(n+1)},style:{fill:t?r.ratingButtonActiveColor:r.ratingButtonColor,borderColor:r.borderColor},children:e},n)}))}),"number"===n.display&&Oe("div",{className:"rating-options-number",style:{gridTemplateColumns:"repeat(".concat(a-c+1,", minmax(0, 1fr))")},children:pn(n.scale).map(((e,n)=>Oe(rn,{displayQuestionIndex:o,active:s===e,appearance:r,num:e,setActiveNumber:e=>{u(e)}},n)))})]}),Oe("div",{className:"rating-text",children:[Oe("div",{children:n.lowerBoundLabel}),Oe("div",{children:n.upperBoundLabel})]})]}),Oe(Xe,{text:n.buttonText||(null==r?void 0:r.submitButtonText)||"Submit",submitDisabled:xe(s)&&!n.optional,appearance:r,onSubmit:()=>i(s),onPreviewSubmit:()=>l(s)})]})}function rn(e){var{num:n,active:t,displayQuestionIndex:o,appearance:r,setActiveNumber:i}=e,{textColor:l,ref:a}=en({appearance:r,defaultTextColor:"black",forceUpdate:t});return Oe("button",{ref:a,className:"ratings-number question-".concat(o,"-rating-").concat(n," ").concat(t?"rating-active":null),type:"button",onClick:()=>{i(n)},style:{color:l,backgroundColor:t?r.ratingButtonActiveColor:r.ratingButtonColor,borderColor:r.borderColor},children:n})}function ln(e){var{question:n,forceDisableHtml:t,displayQuestionIndex:o,appearance:i,onSubmit:l,onPreviewSubmit:a}=e,c=re(null),s=ie((()=>(e=>{if(!e.shuffleOptions)return e.choices;var n=e.choices,t="";e.hasOpenChoice&&(t=n.pop());var o=De(n,Ze(n));return e.hasOpenChoice&&(e.choices.push(t),o.push(t)),o})(n)),[n]),[u,d]=te(n.type===r.MultipleChoice?[]:null),[p,_]=te(!1),[f,h]=te(""),v=n.type===r.SingleChoice?"radio":"checkbox";return Oe("div",{ref:c,children:[Oe(Ge,{question:n.question,description:n.description,descriptionContentType:n.descriptionContentType,forceDisableHtml:t,backgroundColor:i.backgroundColor}),Oe("div",{className:"multiple-choice-options",children:s.map(((e,t)=>{var i="choice-option",l=e,a=e;return n.hasOpenChoice&&t===n.choices.length-1&&(i+=" choice-option-open"),Oe("div",{className:i,children:[Oe("input",{type:v,id:"surveyQuestion".concat(o,"Choice").concat(t),name:"question".concat(o),value:l,disabled:!l,onInput:()=>n.hasOpenChoice&&t===n.choices.length-1?_(!p):n.type===r.SingleChoice?d(l):n.type===r.MultipleChoice&&Ce(u)?u.includes(l)?d(u.filter((e=>e!==l))):d([...u,l]):void 0}),Oe("label",{htmlFor:"surveyQuestion".concat(o,"Choice").concat(t),style:{color:"black"},children:n.hasOpenChoice&&t===n.choices.length-1?Oe(x,{children:[Oe("span",{children:[a,":"]}),Oe("input",{type:"text",id:"surveyQuestion".concat(o,"Choice").concat(t,"Open"),name:"question".concat(o),onInput:e=>{var t=e.currentTarget.value;return n.type===r.SingleChoice?d(t):n.type===r.MultipleChoice&&Ce(u)?h(t):void 0}})]}):a}),Oe("span",{className:"choice-check",style:{color:"black"},children:We})]})}))}),Oe(Xe,{text:n.buttonText||"Submit",submitDisabled:(xe(u)||Ce(u)&&!p&&0===u.length||Ce(u)&&p&&!f&&0===u.length&&!n.optional)&&!n.optional,appearance:i,onSubmit:()=>{p&&n.type===r.MultipleChoice?Ce(u)&&l([...u,f]):l(u)},onPreviewSubmit:()=>{p&&n.type===r.MultipleChoice?Ce(u)&&a([...u,f]):a(u)}})]})}var an=[Fe,Ae,Be],cn=[Ue,Fe,Ae,Be,$e],sn=[1,2,3,4,5],un=[1,2,3,4,5,6,7],dn=[0,1,2,3,4,5,6,7,8,9,10];function pn(e){switch(e){case 5:default:return sn;case 7:return un;case 10:return dn}}var _n=he,fn=be,hn=e=>{var n,t,o,{survey:r,parentElement:i,previewPageIndex:l,forceDisableHtml:a,onPreviewSubmit:c}=e,s=(o=r.appearance,"\n .survey-form, .thank-you-message {\n position: fixed;\n margin: 0px;\n bottom: 0px;\n color: black;\n font-weight: normal;\n font-family: ".concat((null==o?void 0:o.fontFamily)||"-apple-system",', BlinkMacSystemFont, "Inter", "Segoe UI", "Roboto", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n text-align: left;\n max-width: ').concat(parseInt((null==o?void 0:o.maxWidth)||"300"),"px;\n width: 100%;\n z-index: ").concat(parseInt((null==o?void 0:o.zIndex)||"99999"),";\n border: 1.5px solid ").concat((null==o?void 0:o.borderColor)||"#c9c6c6",";\n border-bottom: 0px;\n ").concat({left:"left: 30px;",right:"right: 30px;",center:"\n left: 50%;\n transform: translateX(-50%);\n "}[(null==o?void 0:o.position)||"right"]||"right: 30px;","\n flex-direction: column;\n background: ").concat((null==o?void 0:o.backgroundColor)||"#eeeded",";\n border-top-left-radius: 10px;\n border-top-right-radius: 10px;\n box-shadow: -6px 0 16px -8px rgb(0 0 0 / 8%), -9px 0 28px 0 rgb(0 0 0 / 5%), -12px 0 48px 16px rgb(0 0 0 / 3%);\n }\n\n .survey-box, .thank-you-message-container {\n padding: 20px 25px 10px;\n display: flex;\n flex-direction: column;\n border-radius: 10px;\n }\n\n .thank-you-message {\n text-align: center;\n }\n\n .form-submit[disabled] {\n opacity: 0.6;\n filter: grayscale(50%);\n cursor: not-allowed;\n }\n .survey-form textarea {\n color: #2d2d2d;\n font-size: 14px;\n font-family: ").concat((null==o?void 0:o.fontFamily)||"-apple-system",', BlinkMacSystemFont, "Inter", "Segoe UI", "Roboto", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n background: white;\n color: black;\n outline: none;\n padding-left: 10px;\n padding-right: 10px;\n padding-top: 10px;\n border-radius: 6px;\n border-color: ').concat((null==o?void 0:o.borderColor)||"#c9c6c6",";\n margin-top: 14px;\n width: 100%;\n box-sizing: border-box;\n }\n .survey-box:has(.survey-question:empty):not(:has(.survey-question-description)) textarea {\n margin-top: 0;\n }\n .form-submit {\n box-sizing: border-box;\n margin: 0;\n font-family: inherit;\n overflow: visible;\n text-transform: none;\n position: relative;\n display: inline-block;\n font-weight: 700;\n white-space: nowrap;\n text-align: center;\n border: 1.5px solid transparent;\n cursor: pointer;\n user-select: none;\n touch-action: manipulation;\n padding: 12px;\n font-size: 14px;\n border-radius: 6px;\n outline: 0;\n background: ").concat((null==o?void 0:o.submitButtonColor)||"black"," !important;\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.12);\n box-shadow: 0 2px 0 rgba(0, 0, 0, 0.045);\n width: 100%;\n }\n .form-cancel {\n display: flex;\n float: right;\n border: none;\n background: none;\n cursor: pointer;\n }\n .cancel-btn-wrapper {\n position: absolute;\n width: 35px;\n height: 35px;\n border-radius: 100%;\n top: 0;\n right: 0;\n transform: translate(50%, -50%);\n background: white;\n border: 1.5px solid ").concat((null==o?void 0:o.borderColor)||"#c9c6c6",";\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .bolded { font-weight: 600; }\n .buttons {\n display: flex;\n justify-content: center;\n }\n .footer-branding {\n font-size: 11px;\n margin-top: 10px;\n text-align: center;\n display: flex;\n justify-content: center;\n gap: 4px;\n align-items: center;\n font-weight: 500;\n background: ").concat((null==o?void 0:o.backgroundColor)||"#eeeded",";\n text-decoration: none;\n backgroundColor: ").concat((null==o?void 0:o.backgroundColor)||"#eeeded",";\n color: ").concat(Se((null==o?void 0:o.backgroundColor)||"#eeeded"),";\n }\n .survey-question {\n font-weight: 500;\n font-size: 14px;\n background: ").concat((null==o?void 0:o.backgroundColor)||"#eeeded",";\n }\n .question-textarea-wrapper {\n display: flex;\n flex-direction: column;\n }\n .survey-question-description {\n font-size: 13px;\n padding-top: 5px;\n background: ").concat((null==o?void 0:o.backgroundColor)||"#eeeded",";\n }\n .ratings-number {\n font-size: 16px;\n font-weight: 600;\n padding: 8px 0px;\n border: none;\n }\n .ratings-number:hover {\n cursor: pointer;\n }\n .rating-options {\n margin-top: 14px;\n }\n .rating-options-number {\n display: grid;\n border-radius: 6px;\n overflow: hidden;\n border: 1.5px solid ").concat((null==o?void 0:o.borderColor)||"#c9c6c6",";\n }\n .rating-options-number > .ratings-number {\n border-right: 1px solid ").concat((null==o?void 0:o.borderColor)||"#c9c6c6",";\n }\n .rating-options-number > .ratings-number:last-of-type {\n border-right: 0px;\n }\n .rating-options-number .rating-active {\n background: ").concat((null==o?void 0:o.ratingButtonActiveColor)||"black",";\n }\n .rating-options-emoji {\n display: flex;\n justify-content: space-between;\n }\n .ratings-emoji {\n font-size: 16px;\n background-color: transparent;\n border: none;\n padding: 0px;\n }\n .ratings-emoji:hover {\n cursor: pointer;\n }\n .ratings-emoji.rating-active svg {\n fill: ").concat((null==o?void 0:o.ratingButtonActiveColor)||"black",";\n }\n .emoji-svg {\n fill: '#939393';\n }\n .rating-text {\n display: flex;\n flex-direction: row;\n font-size: 11px;\n justify-content: space-between;\n margin-top: 6px;\n background: ").concat((null==o?void 0:o.backgroundColor)||"#eeeded",";\n opacity: .60;\n }\n .multiple-choice-options {\n margin-top: 13px;\n font-size: 14px;\n }\n .survey-box:has(.survey-question:empty):not(:has(.survey-question-description)) .multiple-choice-options {\n margin-top: 0;\n }\n .multiple-choice-options .choice-option {\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 13px;\n cursor: pointer;\n margin-bottom: 5px;\n position: relative;\n }\n .multiple-choice-options > .choice-option:last-of-type {\n margin-bottom: 0px;\n }\n .multiple-choice-options input {\n cursor: pointer;\n position: absolute;\n opacity: 0;\n }\n .choice-check {\n position: absolute;\n right: 10px;\n background: white;\n }\n .choice-check svg {\n display: none;\n }\n .multiple-choice-options .choice-option:hover .choice-check svg {\n display: inline-block;\n opacity: .25;\n }\n .multiple-choice-options input:checked + label + .choice-check svg {\n display: inline-block;\n opacity: 100% !important;\n }\n .multiple-choice-options input:checked + label {\n font-weight: bold;\n border: 1.5px solid rgba(0,0,0);\n }\n .multiple-choice-options input:checked + label input {\n font-weight: bold;\n }\n .multiple-choice-options label {\n width: 100%;\n cursor: pointer;\n padding: 10px;\n border: 1.5px solid rgba(0,0,0,.25);\n border-radius: 4px;\n background: white;\n }\n .multiple-choice-options .choice-option-open label {\n padding-right: 30px;\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n max-width: 100%;\n }\n .multiple-choice-options .choice-option-open label span {\n width: 100%;\n }\n .multiple-choice-options .choice-option-open input:disabled + label {\n opacity: 0.6;\n }\n .multiple-choice-options .choice-option-open label input {\n position: relative;\n opacity: 1;\n flex-grow: 1;\n border: 0;\n outline: 0;\n }\n .thank-you-message-body {\n margin-top: 6px;\n font-size: 14px;\n background: ").concat((null==o?void 0:o.backgroundColor)||"#eeeded",";\n }\n .thank-you-message-header {\n margin: 10px 0px 0px;\n background: ").concat((null==o?void 0:o.backgroundColor)||"#eeeded",";\n }\n .thank-you-message-container .form-submit {\n margin-top: 20px;\n margin-bottom: 10px;\n }\n .thank-you-message-countdown {\n margin-left: 6px;\n }\n .bottom-section {\n margin-top: 14px;\n }\n ")),u=Object.assign(fn.createElement("style"),{innerText:s});Array.from(i.children).forEach((e=>{e instanceof HTMLStyleElement&&i.removeChild(e)})),i.appendChild(u);var d=Se((null===(n=r.appearance)||void 0===n?void 0:n.backgroundColor)||He.backgroundColor||"white");B(Oe(mn,{survey:r,forceDisableHtml:a,style:{position:"relative",right:0,borderBottom:"1px solid ".concat(null===(t=r.appearance)||void 0===t?void 0:t.borderColor),borderRadius:10,color:d},onPreviewSubmit:c,previewPageIndex:l,removeSurveyFromFocus:()=>{},isPopup:!0},"surveys-render-preview"),i)},vn=e=>{var n,t,{survey:o,root:r,forceDisableHtml:i}=e,l=(t=null===(n=o.appearance)||void 0===n?void 0:n.widgetColor,"\n .ph-survey-widget-tab {\n position: fixed;\n top: 50%;\n right: 0;\n background: ".concat(t||"#e0a045",";\n color: white;\n transform: rotate(-90deg) translate(0, -100%);\n transform-origin: right top;\n min-width: 40px;\n padding: 8px 12px;\n font-weight: 500;\n border-radius: 3px 3px 0 0;\n text-align: center;\n cursor: pointer;\n z-index: 9999999;\n }\n .ph-survey-widget-tab:hover {\n padding-bottom: 13px;\n }\n .ph-survey-widget-button {\n position: fixed;\n }\n ")),a=Object.assign(fn.createElement("style"),{innerText:l});r.appendChild(a),B(Oe(gn,{forceDisableHtml:i,survey:o,readOnly:!0,removeSurveyFromFocus:()=>{}},"feedback-render-preview"),r)};function mn(e){var t,o,r,i,l,a,{survey:c,forceDisableHtml:s,posthog:u,style:d,previewPageIndex:p,removeSurveyFromFocus:_,isPopup:f,onPreviewSubmit:h=(()=>{})}=e,v=Number.isInteger(p),m=null!==(t=c.appearance)&&void 0!==t&&t.surveyPopupDelaySeconds?1e3*c.appearance.surveyPopupDelaySeconds:0,{isPopupVisible:b,isSurveySent:g,setIsPopupVisible:y}=function(e,n,t,o,r){var[i,l]=te(o||0===t),[a,c]=te(!1);return oe((()=>{if(!o&&n){var i,a=()=>{r(e.id),l(!1)},s=()=>{var n,t;null!==(n=e.appearance)&&void 0!==n&&n.displayThankYouMessage?(c(!0),r(e.id),null!==(t=e.appearance)&&void 0!==t&&t.autoDisappear&&setTimeout((()=>{l(!1)}),5e3)):(r(e.id),l(!1))},u=()=>{var t;l(!0),_n.dispatchEvent(new Event("PHSurveyShown")),n.capture("survey shown",{$survey_name:e.name,$survey_id:e.id,$survey_iteration:e.current_iteration,$survey_iteration_start_date:e.current_iteration_start_date,sessionRecordingUrl:null===(t=n.get_session_replay_url)||void 0===t?void 0:t.call(n)}),localStorage.setItem("lastSeenSurveyDate",(new Date).toISOString())};return _n.addEventListener("PHSurveyClosed",a),_n.addEventListener("PHSurveySent",s),t>0?(i=setTimeout((()=>{u()}),t),()=>{clearTimeout(i),_n.removeEventListener("PHSurveyClosed",a),_n.removeEventListener("PHSurveySent",s)}):(u(),()=>{_n.removeEventListener("PHSurveyClosed",a),_n.removeEventListener("PHSurveySent",s)})}}),[]),{isPopupVisible:i,isSurveySent:a,setIsPopupVisible:l}}(c,u,m,v,_),C=g||p===c.questions.length,k=null!==(o=d)&&void 0!==o&&o.left&&ke(null===(r=d)||void 0===r?void 0:r.left)?{left:d.left-40}:{};return v&&((d=d||{}).left="unset",d.right="unset",d.transform="unset"),b?Oe(Ee.Provider,{value:{isPreviewMode:v,previewPageIndex:p,handleCloseSurveyPopup:()=>Me(c,u,v),isPopup:f||!1,onPreviewSubmit:h},children:C?Oe(Ke,{header:(null===(i=c.appearance)||void 0===i?void 0:i.thankYouMessageHeader)||"Thank you!",description:(null===(l=c.appearance)||void 0===l?void 0:l.thankYouMessageDescription)||"",forceDisableHtml:!!s,contentType:null===(a=c.appearance)||void 0===a?void 0:a.thankYouMessageDescriptionContentType,appearance:c.appearance||He,styleOverrides:n(n({},d),k),onClose:()=>y(!1)}):Oe(bn,{survey:c,forceDisableHtml:!!s,posthog:u,styleOverrides:d})}):Oe(x,{})}function bn(e){var t,o,{survey:r,forceDisableHtml:l,posthog:a,styleOverrides:c}=e,s=Se((null===(t=r.appearance)||void 0===t?void 0:t.backgroundColor)||He.backgroundColor),[u,d]=te({}),{isPreviewMode:p,previewPageIndex:_,handleCloseSurveyPopup:f,isPopup:h,onPreviewSubmit:v}=le(Ee),[m,b]=te(_||0),g=ie((()=>Ie(r)),[r]);oe((()=>{b(null!=_?_:0)}),[_]);return Oe("form",{className:"survey-form",style:h?n({color:s,borderColor:null===(o=r.appearance)||void 0===o?void 0:o.borderColor},c):{},children:g.map(((e,t)=>{var o,{originalQuestionIndex:c}=e;return(p?m===c:m===t)&&Oe("div",{className:"survey-box",style:h?{backgroundColor:(null===(o=r.appearance)||void 0===o?void 0:o.backgroundColor)||He.backgroundColor}:{},children:[h&&Oe(Je,{onClick:()=>f()}),yn({question:e,forceDisableHtml:l,displayQuestionIndex:t,appearance:r.appearance||He,onSubmit:e=>(e=>{var{res:t,originalQuestionIndex:o,displayQuestionIndex:l}=e;if(a){var c=0===o?"$survey_response":"$survey_response_".concat(o);if(d(n(n({},u),{},{[c]:t})),a.getNextSurveyStep){var s=a.getNextSurveyStep(r,l,t);s===i.End?Le(n(n({},u),{},{[c]:t}),r,a):b(s)}else l===r.questions.length-1?Le(n(n({},u),{},{[c]:t}),r,a):b(l+1)}})({res:e,originalQuestionIndex:c,displayQuestionIndex:t}),onPreviewSubmit:v})]})}))})}function gn(e){var n,t,{survey:o,forceDisableHtml:r,posthog:i,readOnly:l,removeSurveyFromFocus:a}=e,[c,s]=te(!1),[u,d]=te({}),p=re(null);return oe((()=>{var e,n;if(!l&&i){if("tab"===(null===(e=o.appearance)||void 0===e?void 0:e.widgetType)&&p.current){var t,r=p.current.getBoundingClientRect(),a={top:"50%",left:parseInt("".concat(r.right-360)),bottom:"auto",borderRadius:10,borderBottom:"1.5px solid ".concat((null===(t=o.appearance)||void 0===t?void 0:t.borderColor)||"#c9c6c6")};d(a)}if("selector"===(null===(n=o.appearance)||void 0===n?void 0:n.widgetType)){var u=fn.querySelector(o.appearance.widgetSelector||"");null==u||u.addEventListener("click",(()=>{s(!c)})),null==u||u.setAttribute("PHWidgetSurveyClickListener","true")}}}),[]),Oe(x,{children:["tab"===(null===(n=o.appearance)||void 0===n?void 0:n.widgetType)&&Oe("div",{className:"ph-survey-widget-tab",ref:p,onClick:()=>!l&&s(!c),style:{color:Se(o.appearance.widgetColor)},children:[Oe("div",{className:"ph-survey-widget-tab-icon"}),(null===(t=o.appearance)||void 0===t?void 0:t.widgetLabel)||""]}),c&&Oe(mn,{posthog:i,survey:o,forceDisableHtml:r,style:u,removeSurveyFromFocus:a,isPopup:!0},"feedback-widget-survey")]})}var yn=e=>{var{question:t,forceDisableHtml:o,displayQuestionIndex:i,appearance:l,onSubmit:a,onPreviewSubmit:c}=e,s={[r.Open]:nn,[r.Link]:tn,[r.Rating]:on,[r.SingleChoice]:ln,[r.MultipleChoice]:ln},u={question:t,forceDisableHtml:o,appearance:l,onPreviewSubmit:e=>{c(e)},onSubmit:e=>{a(e)}},d={[r.Open]:{},[r.Link]:{},[r.Rating]:{displayQuestionIndex:i},[r.SingleChoice]:{displayQuestionIndex:i},[r.MultipleChoice]:{displayQuestionIndex:i}},p=s[t.type],_=n(n({},u),d[t.type]);return Oe(p,n({},_))};export{vn as renderFeedbackWidgetPreview,hn as renderSurveysPreview}; | ||
//# sourceMappingURL=surveys-preview.js.map |
@@ -1,2 +0,2 @@ | ||
!function(){"use strict";function e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function n(n){for(var o=1;o<arguments.length;o++){var r=null!=arguments[o]?arguments[o]:{};o%2?e(Object(r),!0).forEach((function(e){t(n,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):e(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}function t(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var o,r,i;!function(e){e.Popover="popover",e.API="api",e.Widget="widget"}(o||(o={})),function(e){e.Open="open",e.MultipleChoice="multiple_choice",e.SingleChoice="single_choice",e.Rating="rating",e.Link="link"}(r||(r={})),function(e){e.NextQuestion="next_question",e.End="end",e.ResponseBased="response_based",e.SpecificQuestion="specific_question"}(i||(i={}));var l,a,s,c,u,d,p,_,f={},v=[],h=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,g=Array.isArray;function m(e,n){for(var t in n)e[t]=n[t];return e}function y(e){var n=e.parentNode;n&&n.removeChild(e)}function b(e,n,t){var o,r,i,a={};for(i in n)"key"==i?o=n[i]:"ref"==i?r=n[i]:a[i]=n[i];if(arguments.length>2&&(a.children=arguments.length>3?l.call(arguments,2):t),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===a[i]&&(a[i]=e.defaultProps[i]);return C(e,a,o,r,null)}function C(e,n,t,o,r){var i={type:e,props:n,key:t,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==r?++s:r,__i:-1,__u:0};return null==r&&null!=a.vnode&&a.vnode(i),i}function x(e){return e.children}function w(e,n){this.props=e,this.context=n}function k(e,n){if(null==n)return e.__?k(e.__,e.__i+1):null;for(var t;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e)return t.__e;return"function"==typeof e.type?k(e):null}function S(e){var n,t;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,n=0;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e){e.__e=e.__c.base=t.__e;break}return S(e)}}function q(e){(!e.__d&&(e.__d=!0)&&c.push(e)&&!T.__r++||u!==a.debounceRendering)&&((u=a.debounceRendering)||d)(T)}function T(){var e,n,t,o,r,i,l,s,u;for(c.sort(p);e=c.shift();)e.__d&&(n=c.length,o=void 0,i=(r=(t=e).__v).__e,s=[],u=[],(l=t.__P)&&((o=m({},r)).__v=r.__v+1,a.vnode&&a.vnode(o),F(l,o,r,t.__n,void 0!==l.ownerSVGElement,32&r.__u?[i]:null,s,null==i?k(r):i,!!(32&r.__u),u),o.__.__k[o.__i]=o,Z(s,o,u),o.__e!=i&&S(o)),c.length>n&&c.sort(p));T.__r=0}function P(e,n,t,o,r,i,l,a,s,c,u){var d,p,_,h,m,y=o&&o.__k||v,b=n.length;for(t.__d=s,function(e,n,t){var o,r,i,l,a,s=n.length,c=t.length,u=c,d=0;for(e.__k=[],o=0;o<s;o++)null!=(r=e.__k[o]=null==(r=n[o])||"boolean"==typeof r||"function"==typeof r?null:"string"==typeof r||"number"==typeof r||"bigint"==typeof r||r.constructor==String?C(null,r,null,null,r):g(r)?C(x,{children:r},null,null,null):void 0===r.constructor&&r.__b>0?C(r.type,r.props,r.key,r.ref?r.ref:null,r.__v):r)?(r.__=e,r.__b=e.__b+1,a=L(r,t,l=o+d,u),r.__i=a,i=null,-1!==a&&(u--,(i=t[a])&&(i.__u|=131072)),null==i||null===i.__v?(-1==a&&d--,"function"!=typeof r.type&&(r.__u|=65536)):a!==l&&(a===l+1?d++:a>l?u>s-l?d+=a-l:d--:d=a<l&&a==l-1?a-l:0,a!==o+d&&(r.__u|=65536))):(i=t[o])&&null==i.key&&i.__e&&(i.__e==e.__d&&(e.__d=k(i)),V(i,i,!1),t[o]=null,u--);if(u)for(o=0;o<c;o++)null!=(i=t[o])&&0==(131072&i.__u)&&(i.__e==e.__d&&(e.__d=k(i)),V(i,i))}(t,n,y),s=t.__d,d=0;d<b;d++)null!=(_=t.__k[d])&&"boolean"!=typeof _&&"function"!=typeof _&&(p=-1===_.__i?f:y[_.__i]||f,_.__i=d,F(e,_,p,r,i,l,a,s,c,u),h=_.__e,_.ref&&p.ref!=_.ref&&(p.ref&&A(p.ref,null,_),u.push(_.ref,_.__c||h,_)),null==m&&null!=h&&(m=h),65536&_.__u||p.__k===_.__k?s=H(_,s,e):"function"==typeof _.type&&void 0!==_.__d?s=_.__d:h&&(s=h.nextSibling),_.__d=void 0,_.__u&=-196609);t.__d=s,t.__e=m}function H(e,n,t){var o,r;if("function"==typeof e.type){for(o=e.__k,r=0;o&&r<o.length;r++)o[r]&&(o[r].__=e,n=H(o[r],n,t));return n}return e.__e!=n&&(t.insertBefore(e.__e,n||null),n=e.__e),n&&n.nextSibling}function L(e,n,t,o){var r=e.key,i=e.type,l=t-1,a=t+1,s=n[t];if(null===s||s&&r==s.key&&i===s.type)return t;if(o>(null!=s&&0==(131072&s.__u)?1:0))for(;l>=0||a<n.length;){if(l>=0){if((s=n[l])&&0==(131072&s.__u)&&r==s.key&&i===s.type)return l;l--}if(a<n.length){if((s=n[a])&&0==(131072&s.__u)&&r==s.key&&i===s.type)return a;a++}}return-1}function M(e,n,t){"-"===n[0]?e.setProperty(n,null==t?"":t):e[n]=null==t?"":"number"!=typeof t||h.test(n)?t:t+"px"}function I(e,n,t,o,r){var i;e:if("style"===n)if("string"==typeof t)e.style.cssText=t;else{if("string"==typeof o&&(e.style.cssText=o=""),o)for(n in o)t&&n in t||M(e.style,n,"");if(t)for(n in t)o&&t[n]===o[n]||M(e.style,n,t[n])}else if("o"===n[0]&&"n"===n[1])i=n!==(n=n.replace(/(PointerCapture)$|Capture$/,"$1")),n=n.toLowerCase()in e?n.toLowerCase().slice(2):n.slice(2),e.l||(e.l={}),e.l[n+i]=t,t?o?t.u=o.u:(t.u=Date.now(),e.addEventListener(n,i?D:E,i)):e.removeEventListener(n,i?D:E,i);else{if(r)n=n.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==n&&"height"!==n&&"href"!==n&&"list"!==n&&"form"!==n&&"tabIndex"!==n&&"download"!==n&&"rowSpan"!==n&&"colSpan"!==n&&"role"!==n&&n in e)try{e[n]=null==t?"":t;break e}catch(e){}"function"==typeof t||(null==t||!1===t&&"-"!==n[4]?e.removeAttribute(n):e.setAttribute(n,t))}}function E(e){var n=this.l[e.type+!1];if(e.t){if(e.t<=n.u)return}else e.t=Date.now();return n(a.event?a.event(e):e)}function D(e){return this.l[e.type+!0](a.event?a.event(e):e)}function F(e,n,t,o,r,i,l,s,c,u){var d,p,_,f,v,h,y,b,C,k,S,q,T,H,L,M=n.type;if(void 0!==n.constructor)return null;128&t.__u&&(c=!!(32&t.__u),i=[s=n.__e=t.__e]),(d=a.__b)&&d(n);e:if("function"==typeof M)try{if(b=n.props,C=(d=M.contextType)&&o[d.__c],k=d?C?C.props.value:d.__:o,t.__c?y=(p=n.__c=t.__c).__=p.__E:("prototype"in M&&M.prototype.render?n.__c=p=new M(b,k):(n.__c=p=new w(b,k),p.constructor=M,p.render=B),C&&C.sub(p),p.props=b,p.state||(p.state={}),p.context=k,p.__n=o,_=p.__d=!0,p.__h=[],p._sb=[]),null==p.__s&&(p.__s=p.state),null!=M.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=m({},p.__s)),m(p.__s,M.getDerivedStateFromProps(b,p.__s))),f=p.props,v=p.state,p.__v=n,_)null==M.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else{if(null==M.getDerivedStateFromProps&&b!==f&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(b,k),!p.__e&&(null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(b,p.__s,k)||n.__v===t.__v)){for(n.__v!==t.__v&&(p.props=b,p.state=p.__s,p.__d=!1),n.__e=t.__e,n.__k=t.__k,n.__k.forEach((function(e){e&&(e.__=n)})),S=0;S<p._sb.length;S++)p.__h.push(p._sb[S]);p._sb=[],p.__h.length&&l.push(p);break e}null!=p.componentWillUpdate&&p.componentWillUpdate(b,p.__s,k),null!=p.componentDidUpdate&&p.__h.push((function(){p.componentDidUpdate(f,v,h)}))}if(p.context=k,p.props=b,p.__P=e,p.__e=!1,q=a.__r,T=0,"prototype"in M&&M.prototype.render){for(p.state=p.__s,p.__d=!1,q&&q(n),d=p.render(p.props,p.state,p.context),H=0;H<p._sb.length;H++)p.__h.push(p._sb[H]);p._sb=[]}else do{p.__d=!1,q&&q(n),d=p.render(p.props,p.state,p.context),p.state=p.__s}while(p.__d&&++T<25);p.state=p.__s,null!=p.getChildContext&&(o=m(m({},o),p.getChildContext())),_||null==p.getSnapshotBeforeUpdate||(h=p.getSnapshotBeforeUpdate(f,v)),P(e,g(L=null!=d&&d.type===x&&null==d.key?d.props.children:d)?L:[L],n,t,o,r,i,l,s,c,u),p.base=n.__e,n.__u&=-161,p.__h.length&&l.push(p),y&&(p.__E=p.__=null)}catch(e){n.__v=null,c||null!=i?(n.__e=s,n.__u|=c?160:32,i[i.indexOf(s)]=null):(n.__e=t.__e,n.__k=t.__k),a.__e(e,n,t)}else null==i&&n.__v===t.__v?(n.__k=t.__k,n.__e=t.__e):n.__e=N(t.__e,n,t,o,r,i,l,c,u);(d=a.diffed)&&d(n)}function Z(e,n,t){n.__d=void 0;for(var o=0;o<t.length;o++)A(t[o],t[++o],t[++o]);a.__c&&a.__c(n,e),e.some((function(n){try{e=n.__h,n.__h=[],e.some((function(e){e.call(n)}))}catch(e){a.__e(e,n.__v)}}))}function N(e,n,t,o,r,i,a,s,c){var u,d,p,_,v,h,m,b=t.props,C=n.props,x=n.type;if("svg"===x&&(r=!0),null!=i)for(u=0;u<i.length;u++)if((v=i[u])&&"setAttribute"in v==!!x&&(x?v.localName===x:3===v.nodeType)){e=v,i[u]=null;break}if(null==e){if(null===x)return document.createTextNode(C);e=r?document.createElementNS("http://www.w3.org/2000/svg",x):document.createElement(x,C.is&&C),i=null,s=!1}if(null===x)b===C||s&&e.data===C||(e.data=C);else{if(i=i&&l.call(e.childNodes),b=t.props||f,!s&&null!=i)for(b={},u=0;u<e.attributes.length;u++)b[(v=e.attributes[u]).name]=v.value;for(u in b)v=b[u],"children"==u||("dangerouslySetInnerHTML"==u?p=v:"key"===u||u in C||I(e,u,null,v,r));for(u in C)v=C[u],"children"==u?_=v:"dangerouslySetInnerHTML"==u?d=v:"value"==u?h=v:"checked"==u?m=v:"key"===u||s&&"function"!=typeof v||b[u]===v||I(e,u,v,b[u],r);if(d)s||p&&(d.__html===p.__html||d.__html===e.innerHTML)||(e.innerHTML=d.__html),n.__k=[];else if(p&&(e.innerHTML=""),P(e,g(_)?_:[_],n,t,o,r&&"foreignObject"!==x,i,a,i?i[0]:t.__k&&k(t,0),s,c),null!=i)for(u=i.length;u--;)null!=i[u]&&y(i[u]);s||(u="value",void 0!==h&&(h!==e[u]||"progress"===x&&!h||"option"===x&&h!==b[u])&&I(e,u,h,b[u],!1),u="checked",void 0!==m&&m!==e[u]&&I(e,u,m,b[u],!1))}return e}function A(e,n,t){try{"function"==typeof e?e(n):e.current=n}catch(e){a.__e(e,t)}}function V(e,n,t){var o,r;if(a.unmount&&a.unmount(e),(o=e.ref)&&(o.current&&o.current!==e.__e||A(o,null,n)),null!=(o=e.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(e){a.__e(e,n)}o.base=o.__P=null,e.__c=void 0}if(o=e.__k)for(r=0;r<o.length;r++)o[r]&&V(o[r],n,t||"function"!=typeof e.type);t||null==e.__e||y(e.__e),e.__=e.__e=e.__d=void 0}function B(e,n,t){return this.constructor(e,t)}function O(e,n,t){var o,r,i,s;a.__&&a.__(e,n),r=(o="function"==typeof t)?null:n.__k,i=[],s=[],F(n,e=(!o&&t||n).__k=b(x,null,[e]),r||f,f,void 0!==n.ownerSVGElement,!o&&t?[t]:r?null:n.firstChild?l.call(n.childNodes):null,i,!o&&t?t:r?r.__e:n.firstChild,o,s),Z(i,e,s)}function Q(e,n,t){var o,r,i,a,s=m({},e.props);for(i in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),n)"key"==i?o=n[i]:"ref"==i?r=n[i]:s[i]=void 0===n[i]&&void 0!==a?a[i]:n[i];return arguments.length>2&&(s.children=arguments.length>3?l.call(arguments,2):t),C(e.type,s,o||e.key,r||e.ref,null)}l=v.slice,a={__e:function(e,n,t,o){for(var r,i,l;n=n.__;)if((r=n.__c)&&!r.__)try{if((i=r.constructor)&&null!=i.getDerivedStateFromError&&(r.setState(i.getDerivedStateFromError(e)),l=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(e,o||{}),l=r.__d),l)return r.__E=r}catch(n){e=n}throw e}},s=0,w.prototype.setState=function(e,n){var t;t=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=m({},this.state),"function"==typeof e&&(e=e(m({},t),this.props)),e&&m(t,e),null!=e&&this.__v&&(n&&this._sb.push(n),q(this))},w.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),q(this))},w.prototype.render=x,c=[],d="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,p=function(e,n){return e.__v.__b-n.__v.__b},T.__r=0,_=0;var j,W,U,R,$=0,z=[],Y=[],G=a.__b,X=a.__r,J=a.diffed,K=a.__c,ee=a.unmount;function ne(e,n){a.__h&&a.__h(W,e,$||n),$=0;var t=W.__H||(W.__H={__:[],__h:[]});return e>=t.__.length&&t.__.push({__V:Y}),t.__[e]}function te(e){return $=1,function(e,n,t){var o=ne(j++,2);if(o.t=e,!o.__c&&(o.__=[_e(void 0,n),function(e){var n=o.__N?o.__N[0]:o.__[0],t=o.t(n,e);n!==t&&(o.__N=[t,o.__[1]],o.__c.setState({}))}],o.__c=W,!W.u)){var r=function(e,n,t){if(!o.__c.__H)return!0;var r=o.__c.__H.__.filter((function(e){return e.__c}));if(r.every((function(e){return!e.__N})))return!i||i.call(this,e,n,t);var l=!1;return r.forEach((function(e){if(e.__N){var n=e.__[0];e.__=e.__N,e.__N=void 0,n!==e.__[0]&&(l=!0)}})),!(!l&&o.__c.props===e)&&(!i||i.call(this,e,n,t))};W.u=!0;var i=W.shouldComponentUpdate,l=W.componentWillUpdate;W.componentWillUpdate=function(e,n,t){if(this.__e){var o=i;i=void 0,r(e,n,t),i=o}l&&l.call(this,e,n,t)},W.shouldComponentUpdate=r}return o.__N||o.__}(_e,e)}function oe(e,n){var t=ne(j++,3);!a.__s&&pe(t.__H,n)&&(t.__=e,t.i=n,W.__H.__h.push(t))}function re(e){return $=5,ie((function(){return{current:e}}),[])}function ie(e,n){var t=ne(j++,7);return pe(t.__H,n)?(t.__V=e(),t.i=n,t.__h=e,t.__V):t.__}function le(e){var n=W.context[e.__c],t=ne(j++,9);return t.c=e,n?(null==t.__&&(t.__=!0,n.sub(W)),n.props.value):e.__}function ae(){for(var e;e=z.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ue),e.__H.__h.forEach(de),e.__H.__h=[]}catch(n){e.__H.__h=[],a.__e(n,e.__v)}}a.__b=function(e){W=null,G&&G(e)},a.__r=function(e){X&&X(e),j=0;var n=(W=e.__c).__H;n&&(U===W?(n.__h=[],W.__h=[],n.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=Y,e.__N=e.i=void 0}))):(n.__h.forEach(ue),n.__h.forEach(de),n.__h=[],j=0)),U=W},a.diffed=function(e){J&&J(e);var n=e.__c;n&&n.__H&&(n.__H.__h.length&&(1!==z.push(n)&&R===a.requestAnimationFrame||((R=a.requestAnimationFrame)||ce)(ae)),n.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==Y&&(e.__=e.__V),e.i=void 0,e.__V=Y}))),U=W=null},a.__c=function(e,n){n.some((function(e){try{e.__h.forEach(ue),e.__h=e.__h.filter((function(e){return!e.__||de(e)}))}catch(t){n.some((function(e){e.__h&&(e.__h=[])})),n=[],a.__e(t,e.__v)}})),K&&K(e,n)},a.unmount=function(e){ee&&ee(e);var n,t=e.__c;t&&t.__H&&(t.__H.__.forEach((function(e){try{ue(e)}catch(e){n=e}})),t.__H=void 0,n&&a.__e(n,t.__v))};var se="function"==typeof requestAnimationFrame;function ce(e){var n,t=function(){clearTimeout(o),se&&cancelAnimationFrame(n),setTimeout(e)},o=setTimeout(t,100);se&&(n=requestAnimationFrame(t))}function ue(e){var n=W,t=e.__c;"function"==typeof t&&(e.__c=void 0,t()),W=n}function de(e){var n=W;e.__c=e.__(),W=n}function pe(e,n){return!e||e.length!==n.length||n.some((function(n,t){return n!==e[t]}))}function _e(e,n){return"function"==typeof n?n(e):n}var fe="undefined"!=typeof window?window:void 0,ve="undefined"!=typeof globalThis?globalThis:fe,he=null==ve?void 0:ve.navigator,ge=null==ve?void 0:ve.document;null==ve||ve.location,null==ve||ve.fetch,null!=ve&&ve.XMLHttpRequest&&"withCredentials"in new ve.XMLHttpRequest&&ve.XMLHttpRequest,null==ve||ve.AbortController,null==he||he.userAgent;var me,ye=null!=fe?fe:{};!function(e){e.GZipJS="gzip-js",e.Base64="base64"}(me||(me={}));var be=Array.isArray,Ce=Object.prototype.toString,xe=be||function(e){return"[object Array]"===Ce.call(e)},we=e=>null===e,ke=e=>"[object Number]"==Ce.call(e),Se=e=>{var n={_log:function(n){if(fe&&ye.POSTHOG_DEBUG&&!(e=>void 0===e)(fe.console)&&fe.console){for(var t=("__rrweb_original__"in fe.console[n]?fe.console[n].__rrweb_original__:fe.console[n]),o=arguments.length,r=new Array(o>1?o-1:0),i=1;i<o;i++)r[i-1]=arguments[i];t(e,...r)}},info:function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];n._log("log",...t)},warn:function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];n._log("warn",...t)},error:function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];n._log("error",...t)},critical:function(){for(var n=arguments.length,t=new Array(n),o=0;o<n;o++)t[o]=arguments[o];console.error(e,...t)},uninitializedWarning:e=>{n.error("You must initialize PostHog before calling ".concat(e))},createLogger:n=>Se("".concat(e," ").concat(n))};return n},qe=Se("[PostHog.js]").createLogger,Te=ge;var Pe=fe,He=ge,Le="seenSurvey_",Me=e=>'\n .survey-form, .thank-you-message {\n position: fixed;\n margin: 0px;\n bottom: 0px;\n color: black;\n font-weight: normal;\n font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "Roboto", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n text-align: left;\n max-width: '.concat(parseInt((null==e?void 0:e.maxWidth)||"300"),"px;\n width: 100%;\n z-index: ").concat(parseInt((null==e?void 0:e.zIndex)||"99999"),";\n border: 1.5px solid ").concat((null==e?void 0:e.borderColor)||"#c9c6c6",";\n border-bottom: 0px;\n ").concat({left:"left: 30px;",right:"right: 30px;",center:"\n left: 50%;\n transform: translateX(-50%);\n "}[(null==e?void 0:e.position)||"right"]||"right: 30px;","\n flex-direction: column;\n background: ").concat((null==e?void 0:e.backgroundColor)||"#eeeded",';\n border-top-left-radius: 10px;\n border-top-right-radius: 10px;\n box-shadow: -6px 0 16px -8px rgb(0 0 0 / 8%), -9px 0 28px 0 rgb(0 0 0 / 5%), -12px 0 48px 16px rgb(0 0 0 / 3%);\n }\n\n .survey-box, .thank-you-message-container {\n padding: 20px 25px 10px;\n display: flex;\n flex-direction: column;\n border-radius: 10px;\n }\n\n .thank-you-message {\n text-align: center;\n }\n\n .form-submit[disabled] {\n opacity: 0.6;\n filter: grayscale(50%);\n cursor: not-allowed;\n }\n .survey-form textarea {\n color: #2d2d2d;\n font-size: 14px;\n font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "Roboto", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n background: white;\n color: black;\n outline: none;\n padding-left: 10px;\n padding-right: 10px;\n padding-top: 10px;\n border-radius: 6px;\n border-color: ').concat((null==e?void 0:e.borderColor)||"#c9c6c6",";\n margin-top: 14px;\n width: 100%;\n box-sizing: border-box;\n }\n .survey-box:has(.survey-question:empty):not(:has(.survey-question-description)) textarea {\n margin-top: 0;\n }\n .form-submit {\n box-sizing: border-box;\n margin: 0;\n font-family: inherit;\n overflow: visible;\n text-transform: none;\n position: relative;\n display: inline-block;\n font-weight: 700;\n white-space: nowrap;\n text-align: center;\n border: 1.5px solid transparent;\n cursor: pointer;\n user-select: none;\n touch-action: manipulation;\n padding: 12px;\n font-size: 14px;\n border-radius: 6px;\n outline: 0;\n background: ").concat((null==e?void 0:e.submitButtonColor)||"black"," !important;\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.12);\n box-shadow: 0 2px 0 rgba(0, 0, 0, 0.045);\n width: 100%;\n }\n .form-cancel {\n display: flex;\n float: right;\n border: none;\n background: none;\n cursor: pointer;\n }\n .cancel-btn-wrapper {\n position: absolute;\n width: 35px;\n height: 35px;\n border-radius: 100%;\n top: 0;\n right: 0;\n transform: translate(50%, -50%);\n background: white;\n border: 1.5px solid ").concat((null==e?void 0:e.borderColor)||"#c9c6c6",";\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .bolded { font-weight: 600; }\n .buttons {\n display: flex;\n justify-content: center;\n }\n .footer-branding {\n font-size: 11px;\n margin-top: 10px;\n text-align: center;\n display: flex;\n justify-content: center;\n gap: 4px;\n align-items: center;\n font-weight: 500;\n background: ").concat((null==e?void 0:e.backgroundColor)||"#eeeded",";\n text-decoration: none;\n backgroundColor: ").concat((null==e?void 0:e.backgroundColor)||"#eeeded",";\n color: ").concat(Ee((null==e?void 0:e.backgroundColor)||"#eeeded"),";\n }\n .survey-question {\n font-weight: 500;\n font-size: 14px;\n background: ").concat((null==e?void 0:e.backgroundColor)||"#eeeded",";\n }\n .question-textarea-wrapper {\n display: flex;\n flex-direction: column;\n }\n .survey-question-description {\n font-size: 13px;\n padding-top: 5px;\n background: ").concat((null==e?void 0:e.backgroundColor)||"#eeeded",";\n }\n .ratings-number {\n font-size: 16px;\n font-weight: 600;\n padding: 8px 0px;\n border: none;\n }\n .ratings-number:hover {\n cursor: pointer;\n }\n .rating-options {\n margin-top: 14px;\n }\n .rating-options-number {\n display: grid;\n border-radius: 6px;\n overflow: hidden;\n border: 1.5px solid ").concat((null==e?void 0:e.borderColor)||"#c9c6c6",";\n }\n .rating-options-number > .ratings-number {\n border-right: 1px solid ").concat((null==e?void 0:e.borderColor)||"#c9c6c6",";\n }\n .rating-options-number > .ratings-number:last-of-type {\n border-right: 0px;\n }\n .rating-options-number .rating-active {\n background: ").concat((null==e?void 0:e.ratingButtonActiveColor)||"black",";\n }\n .rating-options-emoji {\n display: flex;\n justify-content: space-between;\n }\n .ratings-emoji {\n font-size: 16px;\n background-color: transparent;\n border: none;\n padding: 0px;\n }\n .ratings-emoji:hover {\n cursor: pointer;\n }\n .ratings-emoji.rating-active svg {\n fill: ").concat((null==e?void 0:e.ratingButtonActiveColor)||"black",";\n }\n .emoji-svg {\n fill: '#939393';\n }\n .rating-text {\n display: flex;\n flex-direction: row;\n font-size: 11px;\n justify-content: space-between;\n margin-top: 6px;\n background: ").concat((null==e?void 0:e.backgroundColor)||"#eeeded",";\n opacity: .60;\n }\n .multiple-choice-options {\n margin-top: 13px;\n font-size: 14px;\n }\n .survey-box:has(.survey-question:empty):not(:has(.survey-question-description)) .multiple-choice-options {\n margin-top: 0;\n }\n .multiple-choice-options .choice-option {\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 13px;\n cursor: pointer;\n margin-bottom: 5px;\n position: relative;\n }\n .multiple-choice-options > .choice-option:last-of-type {\n margin-bottom: 0px;\n }\n .multiple-choice-options input {\n cursor: pointer;\n position: absolute;\n opacity: 0;\n }\n .choice-check {\n position: absolute;\n right: 10px;\n background: white;\n }\n .choice-check svg {\n display: none;\n }\n .multiple-choice-options .choice-option:hover .choice-check svg {\n display: inline-block;\n opacity: .25;\n }\n .multiple-choice-options input:checked + label + .choice-check svg {\n display: inline-block;\n opacity: 100% !important;\n }\n .multiple-choice-options input:checked + label {\n font-weight: bold;\n border: 1.5px solid rgba(0,0,0);\n }\n .multiple-choice-options input:checked + label input {\n font-weight: bold;\n }\n .multiple-choice-options label {\n width: 100%;\n cursor: pointer;\n padding: 10px;\n border: 1.5px solid rgba(0,0,0,.25);\n border-radius: 4px;\n background: white;\n }\n .multiple-choice-options .choice-option-open label {\n padding-right: 30px;\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n max-width: 100%;\n }\n .multiple-choice-options .choice-option-open label span {\n width: 100%;\n }\n .multiple-choice-options .choice-option-open input:disabled + label {\n opacity: 0.6;\n }\n .multiple-choice-options .choice-option-open label input {\n position: relative;\n opacity: 1;\n flex-grow: 1;\n border: 0;\n outline: 0;\n }\n .thank-you-message-body {\n margin-top: 6px;\n font-size: 14px;\n background: ").concat((null==e?void 0:e.backgroundColor)||"#eeeded",";\n }\n .thank-you-message-header {\n margin: 10px 0px 0px;\n background: ").concat((null==e?void 0:e.backgroundColor)||"#eeeded",";\n }\n .thank-you-message-container .form-submit {\n margin-top: 20px;\n margin-bottom: 10px;\n }\n .thank-you-message-countdown {\n margin-left: 6px;\n }\n .bottom-section {\n margin-top: 14px;\n }\n ");function Ie(e){if("#"===e[0]){var n=e.replace(/^#/,"");return"rgb("+parseInt(n.slice(0,2),16)+","+parseInt(n.slice(2,4),16)+","+parseInt(n.slice(4,6),16)+")"}return"rgb(255, 255, 255)"}function Ee(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Fe;"#"===n[0]&&(e=Ie(n)),n.startsWith("rgb")&&(e=n);var t={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}[n.toLowerCase()];if(t&&(e=Ie(t)),!e)return"black";var o=e.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);if(o){var r=parseInt(o[1]),i=parseInt(o[2]),l=parseInt(o[3]);return Math.sqrt(r*r*.299+i*i*.587+l*l*.114)>127.5?"black":"white"}return"black"}var De={backgroundColor:"#eeeded",submitButtonColor:"black",submitButtonTextColor:"white",ratingButtonColor:"white",ratingButtonActiveColor:"black",borderColor:"#c9c6c6",placeholder:"Start typing...",whiteLabel:!1,displayThankYouMessage:!0,thankYouMessageHeader:"Thank you for your feedback!",position:"right"},Fe="#eeeded",Ze=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;r&&(localStorage.setItem(Qe(o),"true"),r.capture("survey sent",n(n({$survey_name:o.name,$survey_id:o.id,$survey_iteration:o.current_iteration,$survey_iteration_start_date:o.current_iteration_start_date,$survey_questions:o.questions.map((e=>e.question)),sessionRecordingUrl:null===(e=r.get_session_replay_url)||void 0===e?void 0:e.call(r)},t),{},{$set:{[je(o,"responded")]:!0}})),Pe.dispatchEvent(new Event("PHSurveySent")))},Ne=(e,n,t)=>{var o;!t&&n&&(n.capture("survey dismissed",{$survey_name:e.name,$survey_id:e.id,$survey_iteration:e.current_iteration,$survey_iteration_start_date:e.current_iteration_start_date,sessionRecordingUrl:null===(o=n.get_session_replay_url)||void 0===o?void 0:o.call(n),$set:{[je(e,"dismissed")]:!0}}),localStorage.setItem(Qe(e),"true"),Pe.dispatchEvent(new Event("PHSurveyClosed")))},Ae=e=>e.map((e=>({sort:Math.floor(10*Math.random()),value:e}))).sort(((e,n)=>e.sort-n.sort)).map((e=>e.value)),Ve=(e,n)=>e.length===n.length&&e.every(((e,t)=>e===n[t]))?n.reverse():n,Be=e=>(e.questions.forEach(((e,n)=>{e.originalQuestionIndex=n})),e.appearance&&e.appearance.shuffleQuestions?Ve(e.questions,Ae(e.questions)):e.questions),Oe=e=>{var n,t;return!(null===(n=e.conditions)||void 0===n||null===(t=n.events)||void 0===t||!t.repeatedActivation||!(e=>{var n,t,o,r,i,l;return null!=(null===(n=e.conditions)||void 0===n||null===(t=n.events)||void 0===t||null===(o=t.values)||void 0===o?void 0:o.length)&&(null===(r=e.conditions)||void 0===r||null===(i=r.events)||void 0===i||null===(l=i.values)||void 0===l?void 0:l.length)>0})(e))},Qe=e=>{var n="".concat(Le).concat(e.id);return e.current_iteration&&e.current_iteration>0&&(n="".concat(Le).concat(e.id,"_").concat(e.current_iteration)),n},je=(e,n)=>{var t="$survey_".concat(n,"/").concat(e.id);return e.current_iteration&&e.current_iteration>0&&(t="$survey_".concat(n,"/").concat(e.id,"/").concat(e.current_iteration)),t},We=function(e,n){var t={__c:n="__cC"+_++,__:e,Consumer:function(e,n){return e.children(n)},Provider:function(e){var t,o;return this.getChildContext||(t=[],(o={})[n]=this,this.getChildContext=function(){return o},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&t.some((function(e){e.__e=!0,q(e)}))},this.sub=function(e){t.push(e);var n=e.componentWillUnmount;e.componentWillUnmount=function(){t.splice(t.indexOf(e),1),n&&n.call(e)}}),e.children}};return t.Provider.__=t.Consumer.contextType=t}({isPreviewMode:!1,previewPageIndex:0,handleCloseSurveyPopup:()=>{},isPopup:!0,onPreviewSubmit:()=>{}}),Ue=e=>{var{component:n,children:t,renderAsHtml:o,style:r}=e;return Q(n,o?{dangerouslySetInnerHTML:{__html:t},style:r}:{children:t,style:r})},Re=0;function $e(e,n,t,o,r,i){var l,s,c={};for(s in n)"ref"==s?l=n[s]:c[s]=n[s];var u={type:e,props:c,key:t,ref:l,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--Re,__i:-1,__u:0,__source:r,__self:i};if("function"==typeof e&&(l=e.defaultProps))for(s in l)void 0===c[s]&&(c[s]=l[s]);return a.vnode&&a.vnode(u),u}var ze=$e("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:$e("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm146 272q66 0 121.5-35.5T682-393h-52q-23 40-63 61.5T480.5-310q-46.5 0-87-21T331-393h-53q26 61 81 96.5T480-261Zm0 181q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),Ye=$e("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:$e("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm20 194h253v-49H354v49ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),Ge=$e("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:$e("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm146.174 116Q413-417 358.5-379.5T278-280h53q22-42 62.173-65t87.5-23Q528-368 567.5-344.5T630-280h52q-25-63-79.826-100-54.826-37-122-37ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),Xe=$e("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:$e("path",{d:"M480-417q-67 0-121.5 37.5T278-280h404q-25-63-80-100t-122-37Zm-183-72 50-45 45 45 31-36-45-45 45-45-31-36-45 45-50-45-31 36 45 45-45 45 31 36Zm272 0 44-45 51 45 31-36-45-45 45-45-31-36-51 45-44-45-31 36 44 45-44 45 31 36ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142 0 241-99t99-241q0-142-99-241t-241-99q-142 0-241 99t-99 241q0 142 99 241t241 99Z"})}),Je=$e("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:$e("path",{d:"M479.504-261Q537-261 585.5-287q48.5-26 78.5-72.4 6-11.6-.75-22.6-6.75-11-20.25-11H316.918Q303-393 296.5-382t-.5 22.6q30 46.4 78.5 72.4 48.5 26 105.004 26ZM347-578l27 27q7.636 8 17.818 8Q402-543 410-551q8-8 8-18t-8-18l-42-42q-8.8-9-20.9-9-12.1 0-21.1 9l-42 42q-8 7.636-8 17.818Q276-559 284-551q8 8 18 8t18-8l27-27Zm267 0 27 27q7.714 8 18 8t18-8q8-7.636 8-17.818Q685-579 677-587l-42-42q-8.8-9-20.9-9-12.1 0-21.1 9l-42 42q-8 7.714-8 18t8 18q7.636 8 17.818 8Q579-543 587-551l27-27ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),Ke=$e("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:$e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.164752 0.164752C0.384422 -0.0549175 0.740578 -0.0549175 0.960248 0.164752L6 5.20451L11.0398 0.164752C11.2594 -0.0549175 11.6156 -0.0549175 11.8352 0.164752C12.0549 0.384422 12.0549 0.740578 11.8352 0.960248L6.79549 6L11.8352 11.0398C12.0549 11.2594 12.0549 11.6156 11.8352 11.8352C11.6156 12.0549 11.2594 12.0549 11.0398 11.8352L6 6.79549L0.960248 11.8352C0.740578 12.0549 0.384422 12.0549 0.164752 11.8352C-0.0549175 11.6156 -0.0549175 11.2594 0.164752 11.0398L5.20451 6L0.164752 0.960248C-0.0549175 0.740578 -0.0549175 0.384422 0.164752 0.164752Z",fill:"black"})}),en=$e("svg",{width:"77",height:"14",viewBox:"0 0 77 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[$e("g",{"clip-path":"url(#clip0_2415_6911)",children:[$e("mask",{id:"mask0_2415_6911",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"77",height:"14",children:$e("path",{d:"M0.5 0H76.5V14H0.5V0Z",fill:"white"})}),$e("g",{mask:"url(#mask0_2415_6911)",children:[$e("path",{d:"M5.77226 8.02931C5.59388 8.37329 5.08474 8.37329 4.90634 8.02931L4.4797 7.20672C4.41155 7.07535 4.41155 6.9207 4.4797 6.78933L4.90634 5.96669C5.08474 5.62276 5.59388 5.62276 5.77226 5.96669L6.19893 6.78933C6.26709 6.9207 6.26709 7.07535 6.19893 7.20672L5.77226 8.02931ZM5.77226 12.6946C5.59388 13.0386 5.08474 13.0386 4.90634 12.6946L4.4797 11.872C4.41155 11.7406 4.41155 11.586 4.4797 11.4546L4.90634 10.632C5.08474 10.288 5.59388 10.288 5.77226 10.632L6.19893 11.4546C6.26709 11.586 6.26709 11.7406 6.19893 11.872L5.77226 12.6946Z",fill:"#1D4AFF"}),$e("path",{d:"M0.5 10.9238C0.5 10.508 1.02142 10.2998 1.32637 10.5938L3.54508 12.7327C3.85003 13.0267 3.63405 13.5294 3.20279 13.5294H0.984076C0.716728 13.5294 0.5 13.3205 0.5 13.0627V10.9238ZM0.5 8.67083C0.5 8.79459 0.551001 8.91331 0.641783 9.00081L5.19753 13.3927C5.28831 13.4802 5.41144 13.5294 5.53982 13.5294H8.0421C8.47337 13.5294 8.68936 13.0267 8.3844 12.7327L1.32637 5.92856C1.02142 5.63456 0.5 5.84278 0.5 6.25854V8.67083ZM0.5 4.00556C0.5 4.12932 0.551001 4.24802 0.641783 4.33554L10.0368 13.3927C10.1276 13.4802 10.2508 13.5294 10.3791 13.5294H12.8814C13.3127 13.5294 13.5287 13.0267 13.2237 12.7327L1.32637 1.26329C1.02142 0.969312 0.5 1.17752 0.5 1.59327V4.00556ZM5.33931 4.00556C5.33931 4.12932 5.39033 4.24802 5.4811 4.33554L14.1916 12.7327C14.4965 13.0267 15.0179 12.8185 15.0179 12.4028V9.99047C15.0179 9.86671 14.9669 9.74799 14.8762 9.66049L6.16568 1.26329C5.86071 0.969307 5.33931 1.17752 5.33931 1.59327V4.00556ZM11.005 1.26329C10.7 0.969307 10.1786 1.17752 10.1786 1.59327V4.00556C10.1786 4.12932 10.2296 4.24802 10.3204 4.33554L14.1916 8.06748C14.4965 8.36148 15.0179 8.15325 15.0179 7.7375V5.3252C15.0179 5.20144 14.9669 5.08272 14.8762 4.99522L11.005 1.26329Z",fill:"#F9BD2B"}),$e("path",{d:"M21.0852 10.981L16.5288 6.58843C16.2238 6.29443 15.7024 6.50266 15.7024 6.91841V13.0627C15.7024 13.3205 15.9191 13.5294 16.1865 13.5294H23.2446C23.5119 13.5294 23.7287 13.3205 23.7287 13.0627V12.5032C23.7287 12.2455 23.511 12.0396 23.2459 12.0063C22.4323 11.9042 21.6713 11.546 21.0852 10.981ZM18.0252 12.0365C17.5978 12.0365 17.251 11.7021 17.251 11.2901C17.251 10.878 17.5978 10.5436 18.0252 10.5436C18.4527 10.5436 18.7996 10.878 18.7996 11.2901C18.7996 11.7021 18.4527 12.0365 18.0252 12.0365Z",fill:"currentColor"}),$e("path",{d:"M0.5 13.0627C0.5 13.3205 0.716728 13.5294 0.984076 13.5294H3.20279C3.63405 13.5294 3.85003 13.0267 3.54508 12.7327L1.32637 10.5938C1.02142 10.2998 0.5 10.508 0.5 10.9238V13.0627ZM5.33931 5.13191L1.32637 1.26329C1.02142 0.969306 0.5 1.17752 0.5 1.59327V4.00556C0.5 4.12932 0.551001 4.24802 0.641783 4.33554L5.33931 8.86412V5.13191ZM1.32637 5.92855C1.02142 5.63455 0.5 5.84278 0.5 6.25853V8.67083C0.5 8.79459 0.551001 8.91331 0.641783 9.00081L5.33931 13.5294V9.79717L1.32637 5.92855Z",fill:"#1D4AFF"}),$e("path",{d:"M10.1787 5.3252C10.1787 5.20144 10.1277 5.08272 10.0369 4.99522L6.16572 1.26329C5.8608 0.969306 5.33936 1.17752 5.33936 1.59327V4.00556C5.33936 4.12932 5.39037 4.24802 5.48114 4.33554L10.1787 8.86412V5.3252ZM5.33936 13.5294H8.04214C8.47341 13.5294 8.6894 13.0267 8.38443 12.7327L5.33936 9.79717V13.5294ZM5.33936 5.13191V8.67083C5.33936 8.79459 5.39037 8.91331 5.48114 9.00081L10.1787 13.5294V9.99047C10.1787 9.86671 10.1277 9.74803 10.0369 9.66049L5.33936 5.13191Z",fill:"#F54E00"}),$e("path",{d:"M29.375 11.6667H31.3636V8.48772H33.0249C34.8499 8.48772 36.0204 7.4443 36.0204 5.83052C36.0204 4.21681 34.8499 3.17334 33.0249 3.17334H29.375V11.6667ZM31.3636 6.84972V4.81136H32.8236C33.5787 4.81136 34.0318 5.19958 34.0318 5.83052C34.0318 6.4615 33.5787 6.84972 32.8236 6.84972H31.3636ZM39.618 11.7637C41.5563 11.7637 42.9659 10.429 42.9659 8.60905C42.9659 6.78905 41.5563 5.45438 39.618 5.45438C37.6546 5.45438 36.2701 6.78905 36.2701 8.60905C36.2701 10.429 37.6546 11.7637 39.618 11.7637ZM38.1077 8.60905C38.1077 7.63838 38.7118 6.97105 39.618 6.97105C40.5116 6.97105 41.1157 7.63838 41.1157 8.60905C41.1157 9.57972 40.5116 10.2471 39.618 10.2471C38.7118 10.2471 38.1077 9.57972 38.1077 8.60905ZM46.1482 11.7637C47.6333 11.7637 48.6402 10.8658 48.6402 9.81025C48.6402 7.33505 45.2294 8.13585 45.2294 7.16518C45.2294 6.8983 45.5189 6.72843 45.9342 6.72843C46.3622 6.72843 46.8782 6.98318 47.0418 7.54132L48.527 6.94678C48.2375 6.06105 47.1677 5.45438 45.8713 5.45438C44.4743 5.45438 43.6058 6.25518 43.6058 7.21372C43.6058 9.53118 46.9663 8.88812 46.9663 9.84665C46.9663 10.1864 46.6391 10.417 46.1482 10.417C45.4434 10.417 44.9525 9.94376 44.8015 9.3735L43.3164 9.93158C43.6436 10.8537 44.6001 11.7637 46.1482 11.7637ZM53.4241 11.606L53.2982 10.0651C53.0843 10.1743 52.8074 10.2106 52.5808 10.2106C52.1278 10.2106 51.8257 9.89523 51.8257 9.34918V7.03172H53.3612V5.55145H51.8257V3.78001H49.9755V5.55145H48.9687V7.03172H49.9755V9.57972C49.9755 11.06 51.0202 11.7637 52.3921 11.7637C52.7696 11.7637 53.122 11.7031 53.4241 11.606ZM59.8749 3.17334V6.47358H56.376V3.17334H54.3874V11.6667H56.376V8.11158H59.8749V11.6667H61.8761V3.17334H59.8749ZM66.2899 11.7637C68.2281 11.7637 69.6378 10.429 69.6378 8.60905C69.6378 6.78905 68.2281 5.45438 66.2899 5.45438C64.3265 5.45438 62.942 6.78905 62.942 8.60905C62.942 10.429 64.3265 11.7637 66.2899 11.7637ZM64.7796 8.60905C64.7796 7.63838 65.3837 6.97105 66.2899 6.97105C67.1835 6.97105 67.7876 7.63838 67.7876 8.60905C67.7876 9.57972 67.1835 10.2471 66.2899 10.2471C65.3837 10.2471 64.7796 9.57972 64.7796 8.60905ZM73.2088 11.4725C73.901 11.4725 74.5177 11.242 74.845 10.8416V11.424C74.845 12.1034 74.2786 12.5767 73.4102 12.5767C72.7935 12.5767 72.2523 12.2854 72.1642 11.788L70.4776 12.0428C70.7042 13.1955 71.925 13.972 73.4102 13.972C75.361 13.972 76.6574 12.8679 76.6574 11.2298V5.55145H74.8324V6.07318C74.4926 5.69705 73.9136 5.45438 73.171 5.45438C71.409 5.45438 70.3014 6.61918 70.3014 8.46345C70.3014 10.3077 71.409 11.4725 73.2088 11.4725ZM72.1012 8.46345C72.1012 7.55345 72.655 6.97105 73.5109 6.97105C74.3793 6.97105 74.9331 7.55345 74.9331 8.46345C74.9331 9.37345 74.3793 9.95585 73.5109 9.95585C72.655 9.95585 72.1012 9.37345 72.1012 8.46345Z",fill:"currentColor"})]})]}),$e("defs",{children:$e("clipPath",{id:"clip0_2415_6911",children:$e("rect",{width:"76",height:"14",fill:"white",transform:"translate(0.5)"})})})]}),nn=$e("svg",{width:"16",height:"12",viewBox:"0 0 16 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:$e("path",{d:"M5.30769 10.6923L4.77736 11.2226C4.91801 11.3633 5.10878 11.4423 5.30769 11.4423C5.5066 11.4423 5.69737 11.3633 5.83802 11.2226L5.30769 10.6923ZM15.5303 1.53033C15.8232 1.23744 15.8232 0.762563 15.5303 0.46967C15.2374 0.176777 14.7626 0.176777 14.4697 0.46967L15.5303 1.53033ZM1.53033 5.85429C1.23744 5.56139 0.762563 5.56139 0.46967 5.85429C0.176777 6.14718 0.176777 6.62205 0.46967 6.91495L1.53033 5.85429ZM5.83802 11.2226L15.5303 1.53033L14.4697 0.46967L4.77736 10.162L5.83802 11.2226ZM0.46967 6.91495L4.77736 11.2226L5.83802 10.162L1.53033 5.85429L0.46967 6.91495Z",fill:"currentColor"})});function tn(){return $e("a",{href:"https://posthog.com",target:"_blank",rel:"noopener",className:"footer-branding",children:["Survey by ",en]})}function on(e){var{text:n,submitDisabled:t,appearance:o,onSubmit:r,link:i,onPreviewSubmit:l}=e,{isPreviewMode:a,isPopup:s}=le(We),c=o.submitButtonTextColor||Ee(o.submitButtonColor||De.submitButtonColor);return $e("div",{className:"bottom-section",children:[$e("div",{className:"buttons",children:$e("button",{className:"form-submit",disabled:t,type:"button",style:s?{color:c}:{},onClick:()=>{a?null==l||l():(i&&(null==fe||fe.open(i)),r())},children:n})}),!o.whiteLabel&&$e(tn,{})]})}function rn(e){var{question:n,description:t,descriptionContentType:o,backgroundColor:r,forceDisableHtml:i}=e,{isPopup:l}=le(We);return $e("div",{style:l?{backgroundColor:r||De.backgroundColor}:{},children:[$e("div",{className:"survey-question",children:n}),t&&Ue({component:b("div",{className:"survey-question-description"}),children:t,renderAsHtml:!i&&"text"!==o})]})}function ln(e){var{onClick:n}=e,{isPreviewMode:t}=le(We);return $e("div",{className:"cancel-btn-wrapper",onClick:n,disabled:t,children:$e("button",{className:"form-cancel",onClick:n,disabled:t,children:Ke})})}function an(e){var{header:t,description:o,contentType:r,forceDisableHtml:i,appearance:l,onClose:a,styleOverrides:s}=e,c=Ee(l.backgroundColor||De.backgroundColor),{isPopup:u}=le(We);return $e(x,{children:$e("div",{className:"thank-you-message",style:n({},s),children:$e("div",{className:"thank-you-message-container",children:[u&&$e(ln,{onClick:()=>a()}),$e("h3",{className:"thank-you-message-header",style:{color:c},children:t}),o&&Ue({component:b("div",{className:"thank-you-message-body"}),children:o,renderAsHtml:!i&&"text"!==r,style:{color:c}}),u&&$e(on,{text:l.thankYouMessageCloseButtonText||"Close",submitDisabled:!1,appearance:l,onSubmit:()=>a()})]})})})}function sn(e){var n,t=re(null),[o,r]=te(null!==(n=e.defaultTextColor)&&void 0!==n?n:"black");return oe((()=>{if(t.current){var e=function(e){var n=Pe.getComputedStyle(e).backgroundColor;if("rgba(0, 0, 0, 0)"===n)return"black";var t=n.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);if(!t)return"black";var o=parseInt(t[1]),r=parseInt(t[2]),i=parseInt(t[3]);return Math.sqrt(o*o*.299+r*r*.587+i*i*.114)>127.5?"black":"white"}(t.current);r(e)}}),[e.appearance,e.forceUpdate]),{ref:t,textColor:o}}function cn(e){var{question:n,forceDisableHtml:t,appearance:o,onSubmit:r,onPreviewSubmit:i}=e,l=re(null),[a,s]=te("");return $e("div",{ref:l,children:[$e(rn,{question:n.question,description:n.description,descriptionContentType:n.descriptionContentType,backgroundColor:o.backgroundColor,forceDisableHtml:t}),$e("textarea",{rows:4,placeholder:null==o?void 0:o.placeholder,onInput:e=>s(e.currentTarget.value)}),$e(on,{text:n.buttonText||"Submit",submitDisabled:!a&&!n.optional,appearance:o,onSubmit:()=>r(a),onPreviewSubmit:()=>i(a)})]})}function un(e){var{question:n,forceDisableHtml:t,appearance:o,onSubmit:r,onPreviewSubmit:i}=e;return $e(x,{children:[$e(rn,{question:n.question,description:n.description,descriptionContentType:n.descriptionContentType,forceDisableHtml:t}),$e(on,{text:n.buttonText||"Submit",submitDisabled:!1,link:n.link,appearance:o,onSubmit:()=>r("link clicked"),onPreviewSubmit:()=>i("link clicked")})]})}function dn(e){var{question:n,forceDisableHtml:t,displayQuestionIndex:o,appearance:r,onSubmit:i,onPreviewSubmit:l}=e,a=n.scale,s=10===n.scale?0:1,[c,u]=te(null);return $e(x,{children:[$e(rn,{question:n.question,description:n.description,descriptionContentType:n.descriptionContentType,forceDisableHtml:t,backgroundColor:r.backgroundColor}),$e("div",{className:"rating-section",children:[$e("div",{className:"rating-options",children:["emoji"===n.display&&$e("div",{className:"rating-options-emoji",children:(3===n.scale?fn:vn).map(((e,n)=>{var t=n+1===c;return $e("button",{className:"ratings-emoji question-".concat(o,"-rating-").concat(n," ").concat(t?"rating-active":null),value:n+1,type:"button",onClick:()=>{u(n+1)},style:{fill:t?r.ratingButtonActiveColor:r.ratingButtonColor,borderColor:r.borderColor},children:e},n)}))}),"number"===n.display&&$e("div",{className:"rating-options-number",style:{gridTemplateColumns:"repeat(".concat(a-s+1,", minmax(0, 1fr))")},children:yn(n.scale).map(((e,n)=>$e(pn,{displayQuestionIndex:o,active:c===e,appearance:r,num:e,setActiveNumber:e=>{u(e)}},n)))})]}),$e("div",{className:"rating-text",children:[$e("div",{children:n.lowerBoundLabel}),$e("div",{children:n.upperBoundLabel})]})]}),$e(on,{text:n.buttonText||(null==r?void 0:r.submitButtonText)||"Submit",submitDisabled:we(c)&&!n.optional,appearance:r,onSubmit:()=>i(c),onPreviewSubmit:()=>l(c)})]})}function pn(e){var{num:n,active:t,displayQuestionIndex:o,appearance:r,setActiveNumber:i}=e,{textColor:l,ref:a}=sn({appearance:r,defaultTextColor:"black",forceUpdate:t});return $e("button",{ref:a,className:"ratings-number question-".concat(o,"-rating-").concat(n," ").concat(t?"rating-active":null),type:"button",onClick:()=>{i(n)},style:{color:l,backgroundColor:t?r.ratingButtonActiveColor:r.ratingButtonColor,borderColor:r.borderColor},children:n})}function _n(e){var{question:n,forceDisableHtml:t,displayQuestionIndex:o,appearance:i,onSubmit:l,onPreviewSubmit:a}=e,s=re(null),c=ie((()=>(e=>{if(!e.shuffleOptions)return e.choices;var n=e.choices,t="";e.hasOpenChoice&&(t=n.pop());var o=Ve(n,Ae(n));return e.hasOpenChoice&&(e.choices.push(t),o.push(t)),o})(n)),[n]),[u,d]=te(n.type===r.MultipleChoice?[]:null),[p,_]=te(!1),[f,v]=te(""),h=n.type===r.SingleChoice?"radio":"checkbox";return $e("div",{ref:s,children:[$e(rn,{question:n.question,description:n.description,descriptionContentType:n.descriptionContentType,forceDisableHtml:t,backgroundColor:i.backgroundColor}),$e("div",{className:"multiple-choice-options",children:c.map(((e,t)=>{var i="choice-option",l=e,a=e;return n.hasOpenChoice&&t===n.choices.length-1&&(i+=" choice-option-open"),$e("div",{className:i,children:[$e("input",{type:h,id:"surveyQuestion".concat(o,"Choice").concat(t),name:"question".concat(o),value:l,disabled:!l,onInput:()=>n.hasOpenChoice&&t===n.choices.length-1?_(!p):n.type===r.SingleChoice?d(l):n.type===r.MultipleChoice&&xe(u)?u.includes(l)?d(u.filter((e=>e!==l))):d([...u,l]):void 0}),$e("label",{htmlFor:"surveyQuestion".concat(o,"Choice").concat(t),style:{color:"black"},children:n.hasOpenChoice&&t===n.choices.length-1?$e(x,{children:[$e("span",{children:[a,":"]}),$e("input",{type:"text",id:"surveyQuestion".concat(o,"Choice").concat(t,"Open"),name:"question".concat(o),onInput:e=>{var t=e.currentTarget.value;return n.type===r.SingleChoice?d(t):n.type===r.MultipleChoice&&xe(u)?v(t):void 0}})]}):a}),$e("span",{className:"choice-check",style:{color:"black"},children:nn})]})}))}),$e(on,{text:n.buttonText||"Submit",submitDisabled:(we(u)||xe(u)&&!p&&0===u.length||xe(u)&&p&&!f&&0===u.length&&!n.optional)&&!n.optional,appearance:i,onSubmit:()=>{p&&n.type===r.MultipleChoice?xe(u)&&l([...u,f]):l(u)},onPreviewSubmit:()=>{p&&n.type===r.MultipleChoice?xe(u)&&a([...u,f]):a(u)}})]})}var fn=[Ge,Ye,ze],vn=[Xe,Ge,Ye,ze,Je],hn=[1,2,3,4,5],gn=[1,2,3,4,5,6,7],mn=[0,1,2,3,4,5,6,7,8,9,10];function yn(e){switch(e){case 5:default:return hn;case 7:return gn;case 10:return mn}}var bn=qe("[Surveys]"),Cn=fe,xn=ge;class wn{constructor(e){var n=this;t(this,"canShowNextEventBasedSurvey",(()=>{var e,n=xn.querySelectorAll("div[class^=PostHogSurvey]");return!(n.length>0)||1===(null===(e=n[n.length-1].shadowRoot)||void 0===e?void 0:e.childElementCount)})),t(this,"handlePopoverSurvey",(e=>{var n,t=null===(n=e.conditions)||void 0===n?void 0:n.seenSurveyWaitPeriodInDays,o=localStorage.getItem("lastSeenSurveyDate");if(t&&o){var r=new Date,i=Math.abs(r.getTime()-new Date(o).getTime());if(Math.ceil(i/864e5)<t)return}var l=(e=>!!localStorage.getItem(Qe(e))&&!Oe(e))(e);if(!l){this.addSurveyToFocus(e.id);var a=((e,n,t)=>{var o=He.createElement("div");o.className="PostHogSurvey".concat(n);var r=o.attachShadow({mode:"open"});if(e){var i=Object.assign(He.createElement("style"),{innerText:e});r.appendChild(i)}return He.body.appendChild(o),r})(Me(null==e?void 0:e.appearance),e.id);O($e(Sn,{posthog:this.posthog,survey:e,removeSurveyFromFocus:this.removeSurveyFromFocus,isPopup:!0},"popover-survey"),a)}})),t(this,"handleWidget",(e=>{var n=function(e){var n,t=Te.createElement("div");t.className="PostHogWidget".concat(e.id);var o,r=t.attachShadow({mode:"open"}),i=(o=null===(n=e.appearance)||void 0===n?void 0:n.widgetColor,"\n .ph-survey-widget-tab {\n position: fixed;\n top: 50%;\n right: 0;\n background: ".concat(o||"#e0a045",";\n color: white;\n transform: rotate(-90deg) translate(0, -100%);\n transform-origin: right top;\n min-width: 40px;\n padding: 8px 12px;\n font-weight: 500;\n border-radius: 3px 3px 0 0;\n text-align: center;\n cursor: pointer;\n z-index: 9999999;\n }\n .ph-survey-widget-tab:hover {\n padding-bottom: 13px;\n }\n .ph-survey-widget-button {\n position: fixed;\n }\n "));return r.append(Object.assign(Te.createElement("style"),{innerText:i})),Te.body.appendChild(t),r}(e),t=Me(e.appearance);n.appendChild(Object.assign(xn.createElement("style"),{innerText:t})),O($e(Tn,{posthog:this.posthog,survey:e,removeSurveyFromFocus:this.removeSurveyFromFocus},"feedback-survey"),n)})),t(this,"handleWidgetSelector",(e=>{var n,t=(null===(n=e.appearance)||void 0===n?void 0:n.widgetSelector)&&xn.querySelector(e.appearance.widgetSelector);if(t)if(0===xn.querySelectorAll(".PostHogWidget".concat(e.id)).length)this.handleWidget(e);else if(1===xn.querySelectorAll(".PostHogWidget".concat(e.id)).length&&!t.getAttribute("PHWidgetSurveyClickListener")){var o,r,i=null===(o=xn.querySelector(".PostHogWidget".concat(e.id)))||void 0===o||null===(r=o.shadowRoot)||void 0===r?void 0:r.querySelector(".survey-form");t.addEventListener("click",(()=>{i&&(i.style.display="none"===i.style.display?"block":"none",i.addEventListener("PHSurveyClosed",(()=>{this.removeSurveyFromFocus(e.id),i.style.display="none"})))})),t.setAttribute("PHWidgetSurveyClickListener","true")}})),t(this,"canRenderSurvey",(e=>{var n={visible:!1};return e.end_date?(n.disabledReason="survey was completed on ".concat(e.end_date),n):e.type!=o.Popover?(n.disabledReason="Only Popover survey types can be rendered",n):!e.linked_flag_key||this.posthog.featureFlags.isFeatureEnabled(e.linked_flag_key)?!e.targeting_flag_key||this.posthog.featureFlags.isFeatureEnabled(e.targeting_flag_key)?!e.internal_targeting_flag_key||this.posthog.featureFlags.isFeatureEnabled(e.internal_targeting_flag_key)?(n.visible=!0,n):(n.disabledReason="internal targeting feature flag ".concat(e.internal_targeting_flag_key," is false"),n):(n.disabledReason="targeting feature flag ".concat(e.targeting_flag_key," is false"),n):(n.disabledReason="linked feature flag ".concat(e.linked_flag_key," is false"),n)})),t(this,"renderSurvey",((e,n)=>{O($e(Sn,{posthog:this.posthog,survey:e,removeSurveyFromFocus:this.removeSurveyFromFocus,isPopup:!1},"popover-survey"),n)})),t(this,"callSurveysAndEvaluateDisplayLogic",(function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];null===(e=n.posthog)||void 0===e||e.getActiveMatchingSurveys((e=>{var t=e.filter((e=>"api"!==e.type));n.sortSurveysByAppearanceDelay(t).forEach((e=>{if(we(n.surveyInFocus)){var t,r,i;if(e.type===o.Widget)"tab"===(null===(t=e.appearance)||void 0===t?void 0:t.widgetType)&&0===xn.querySelectorAll(".PostHogWidget".concat(e.id)).length&&n.handleWidget(e),"selector"===(null===(r=e.appearance)||void 0===r?void 0:r.widgetType)&&null!==(i=e.appearance)&&void 0!==i&&i.widgetSelector&&n.handleWidgetSelector(e);e.type===o.Popover&&n.canShowNextEventBasedSurvey()&&n.handlePopoverSurvey(e)}}))}),t)})),t(this,"addSurveyToFocus",(e=>{we(this.surveyInFocus)||bn.error("Survey ".concat([...this.surveyInFocus]," already in focus. Cannot add survey ").concat(e,".")),this.surveyInFocus=e})),t(this,"removeSurveyFromFocus",(e=>{this.surveyInFocus!==e&&bn.error("Survey ".concat(e," is not in focus. Cannot remove survey ").concat(e,".")),this.surveyInFocus=null})),this.posthog=e,this.surveyInFocus=null}sortSurveysByAppearanceDelay(e){return e.sort(((e,n)=>{var t,o;return((null===(t=e.appearance)||void 0===t?void 0:t.surveyPopupDelaySeconds)||0)-((null===(o=n.appearance)||void 0===o?void 0:o.surveyPopupDelaySeconds)||0)}))}getTestAPI(){return{addSurveyToFocus:this.addSurveyToFocus,removeSurveyFromFocus:this.removeSurveyFromFocus,surveyInFocus:this.surveyInFocus,canShowNextEventBasedSurvey:this.canShowNextEventBasedSurvey,handleWidget:this.handleWidget,handlePopoverSurvey:this.handlePopoverSurvey,handleWidgetSelector:this.handleWidgetSelector,sortSurveysByAppearanceDelay:this.sortSurveysByAppearanceDelay}}}function kn(e){if(xn&&Cn){var n=new wn(e);return n.callSurveysAndEvaluateDisplayLogic(!0),setInterval((()=>{n.callSurveysAndEvaluateDisplayLogic(!1)}),1e3),n}}function Sn(e){var t,o,r,i,l,a,{survey:s,forceDisableHtml:c,posthog:u,style:d,previewPageIndex:p,removeSurveyFromFocus:_,isPopup:f,onPreviewSubmit:v=(()=>{})}=e,h=Number.isInteger(p),g=null!==(t=s.appearance)&&void 0!==t&&t.surveyPopupDelaySeconds?1e3*s.appearance.surveyPopupDelaySeconds:0,{isPopupVisible:m,isSurveySent:y,setIsPopupVisible:b}=function(e,n,t,o,r){var[i,l]=te(o||0===t),[a,s]=te(!1);return oe((()=>{if(!o&&n){var i,a=()=>{r(e.id),l(!1)},c=()=>{var n,t;null!==(n=e.appearance)&&void 0!==n&&n.displayThankYouMessage?(s(!0),r(e.id),null!==(t=e.appearance)&&void 0!==t&&t.autoDisappear&&setTimeout((()=>{l(!1)}),5e3)):(r(e.id),l(!1))},u=()=>{var t;l(!0),Cn.dispatchEvent(new Event("PHSurveyShown")),n.capture("survey shown",{$survey_name:e.name,$survey_id:e.id,$survey_iteration:e.current_iteration,$survey_iteration_start_date:e.current_iteration_start_date,sessionRecordingUrl:null===(t=n.get_session_replay_url)||void 0===t?void 0:t.call(n)}),localStorage.setItem("lastSeenSurveyDate",(new Date).toISOString())};return Cn.addEventListener("PHSurveyClosed",a),Cn.addEventListener("PHSurveySent",c),t>0?(i=setTimeout((()=>{u()}),t),()=>{clearTimeout(i),Cn.removeEventListener("PHSurveyClosed",a),Cn.removeEventListener("PHSurveySent",c)}):(u(),()=>{Cn.removeEventListener("PHSurveyClosed",a),Cn.removeEventListener("PHSurveySent",c)})}}),[]),{isPopupVisible:i,isSurveySent:a,setIsPopupVisible:l}}(s,u,g,h,_),C=y||p===s.questions.length,w=null!==(o=d)&&void 0!==o&&o.left&&ke(null===(r=d)||void 0===r?void 0:r.left)?{left:d.left-40}:{};return h&&((d=d||{}).left="unset",d.right="unset",d.transform="unset"),m?$e(We.Provider,{value:{isPreviewMode:h,previewPageIndex:p,handleCloseSurveyPopup:()=>Ne(s,u,h),isPopup:f||!1,onPreviewSubmit:v},children:C?$e(an,{header:(null===(i=s.appearance)||void 0===i?void 0:i.thankYouMessageHeader)||"Thank you!",description:(null===(l=s.appearance)||void 0===l?void 0:l.thankYouMessageDescription)||"",forceDisableHtml:!!c,contentType:null===(a=s.appearance)||void 0===a?void 0:a.thankYouMessageDescriptionContentType,appearance:s.appearance||De,styleOverrides:n(n({},d),w),onClose:()=>b(!1)}):$e(qn,{survey:s,forceDisableHtml:!!c,posthog:u,styleOverrides:d})}):$e(x,{})}function qn(e){var t,o,{survey:r,forceDisableHtml:l,posthog:a,styleOverrides:s}=e,c=Ee((null===(t=r.appearance)||void 0===t?void 0:t.backgroundColor)||De.backgroundColor),[u,d]=te({}),{isPreviewMode:p,previewPageIndex:_,handleCloseSurveyPopup:f,isPopup:v,onPreviewSubmit:h}=le(We),[g,m]=te(_||0),y=ie((()=>Be(r)),[r]);oe((()=>{m(null!=_?_:0)}),[_]);return $e("form",{className:"survey-form",style:v?n({color:c,borderColor:null===(o=r.appearance)||void 0===o?void 0:o.borderColor},s):{},children:y.map(((e,t)=>{var o,{originalQuestionIndex:s}=e;return(p?g===s:g===t)&&$e("div",{className:"survey-box",style:v?{backgroundColor:(null===(o=r.appearance)||void 0===o?void 0:o.backgroundColor)||De.backgroundColor}:{},children:[v&&$e(ln,{onClick:()=>f()}),Pn({question:e,forceDisableHtml:l,displayQuestionIndex:t,appearance:r.appearance||De,onSubmit:e=>(e=>{var{res:t,originalQuestionIndex:o,displayQuestionIndex:l}=e;if(a){var s=0===o?"$survey_response":"$survey_response_".concat(o);if(d(n(n({},u),{},{[s]:t})),a.getNextSurveyStep){var c=a.getNextSurveyStep(r,l,t);c===i.End?Ze(n(n({},u),{},{[s]:t}),r,a):m(c)}else l===r.questions.length-1?Ze(n(n({},u),{},{[s]:t}),r,a):m(l+1)}})({res:e,originalQuestionIndex:s,displayQuestionIndex:t}),onPreviewSubmit:h})]})}))})}function Tn(e){var n,t,{survey:o,forceDisableHtml:r,posthog:i,readOnly:l,removeSurveyFromFocus:a}=e,[s,c]=te(!1),[u,d]=te({}),p=re(null);return oe((()=>{var e,n;if(!l&&i){if("tab"===(null===(e=o.appearance)||void 0===e?void 0:e.widgetType)&&p.current){var t,r=p.current.getBoundingClientRect(),a={top:"50%",left:parseInt("".concat(r.right-360)),bottom:"auto",borderRadius:10,borderBottom:"1.5px solid ".concat((null===(t=o.appearance)||void 0===t?void 0:t.borderColor)||"#c9c6c6")};d(a)}if("selector"===(null===(n=o.appearance)||void 0===n?void 0:n.widgetType)){var u=xn.querySelector(o.appearance.widgetSelector||"");null==u||u.addEventListener("click",(()=>{c(!s)})),null==u||u.setAttribute("PHWidgetSurveyClickListener","true")}}}),[]),$e(x,{children:["tab"===(null===(n=o.appearance)||void 0===n?void 0:n.widgetType)&&$e("div",{className:"ph-survey-widget-tab",ref:p,onClick:()=>!l&&c(!s),style:{color:Ee(o.appearance.widgetColor)},children:[$e("div",{className:"ph-survey-widget-tab-icon"}),(null===(t=o.appearance)||void 0===t?void 0:t.widgetLabel)||""]}),s&&$e(Sn,{posthog:i,survey:o,forceDisableHtml:r,style:u,removeSurveyFromFocus:a,isPopup:!0},"feedback-widget-survey")]})}var Pn=e=>{var{question:t,forceDisableHtml:o,displayQuestionIndex:i,appearance:l,onSubmit:a,onPreviewSubmit:s}=e,c={[r.Open]:cn,[r.Link]:un,[r.Rating]:dn,[r.SingleChoice]:_n,[r.MultipleChoice]:_n},u={question:t,forceDisableHtml:o,appearance:l,onPreviewSubmit:e=>{s(e)},onSubmit:e=>{a(e)}},d={[r.Open]:{},[r.Link]:{},[r.Rating]:{displayQuestionIndex:i},[r.SingleChoice]:{displayQuestionIndex:i},[r.MultipleChoice]:{displayQuestionIndex:i}},p=c[t.type],_=n(n({},u),d[t.type]);return $e(p,n({},_))};ye.__PosthogExtensions__=ye.__PosthogExtensions__||{},ye.__PosthogExtensions__.canActivateRepeatedly=Oe,ye.__PosthogExtensions__.generateSurveys=kn,ye.extendPostHogWithSurveys=kn}(); | ||
!function(){"use strict";function e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function n(n){for(var o=1;o<arguments.length;o++){var r=null!=arguments[o]?arguments[o]:{};o%2?e(Object(r),!0).forEach((function(e){t(n,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):e(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}function t(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var o,r,i;!function(e){e.Popover="popover",e.API="api",e.Widget="widget"}(o||(o={})),function(e){e.Open="open",e.MultipleChoice="multiple_choice",e.SingleChoice="single_choice",e.Rating="rating",e.Link="link"}(r||(r={})),function(e){e.NextQuestion="next_question",e.End="end",e.ResponseBased="response_based",e.SpecificQuestion="specific_question"}(i||(i={}));var l,a,s,c,u,d,p,_,f={},v=[],h=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,g=Array.isArray;function m(e,n){for(var t in n)e[t]=n[t];return e}function y(e){var n=e.parentNode;n&&n.removeChild(e)}function b(e,n,t){var o,r,i,a={};for(i in n)"key"==i?o=n[i]:"ref"==i?r=n[i]:a[i]=n[i];if(arguments.length>2&&(a.children=arguments.length>3?l.call(arguments,2):t),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===a[i]&&(a[i]=e.defaultProps[i]);return C(e,a,o,r,null)}function C(e,n,t,o,r){var i={type:e,props:n,key:t,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==r?++s:r,__i:-1,__u:0};return null==r&&null!=a.vnode&&a.vnode(i),i}function x(e){return e.children}function w(e,n){this.props=e,this.context=n}function k(e,n){if(null==n)return e.__?k(e.__,e.__i+1):null;for(var t;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e)return t.__e;return"function"==typeof e.type?k(e):null}function S(e){var n,t;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,n=0;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e){e.__e=e.__c.base=t.__e;break}return S(e)}}function q(e){(!e.__d&&(e.__d=!0)&&c.push(e)&&!T.__r++||u!==a.debounceRendering)&&((u=a.debounceRendering)||d)(T)}function T(){var e,n,t,o,r,i,l,s,u;for(c.sort(p);e=c.shift();)e.__d&&(n=c.length,o=void 0,i=(r=(t=e).__v).__e,s=[],u=[],(l=t.__P)&&((o=m({},r)).__v=r.__v+1,a.vnode&&a.vnode(o),F(l,o,r,t.__n,void 0!==l.ownerSVGElement,32&r.__u?[i]:null,s,null==i?k(r):i,!!(32&r.__u),u),o.__.__k[o.__i]=o,Z(s,o,u),o.__e!=i&&S(o)),c.length>n&&c.sort(p));T.__r=0}function P(e,n,t,o,r,i,l,a,s,c,u){var d,p,_,h,m,y=o&&o.__k||v,b=n.length;for(t.__d=s,function(e,n,t){var o,r,i,l,a,s=n.length,c=t.length,u=c,d=0;for(e.__k=[],o=0;o<s;o++)null!=(r=e.__k[o]=null==(r=n[o])||"boolean"==typeof r||"function"==typeof r?null:"string"==typeof r||"number"==typeof r||"bigint"==typeof r||r.constructor==String?C(null,r,null,null,r):g(r)?C(x,{children:r},null,null,null):void 0===r.constructor&&r.__b>0?C(r.type,r.props,r.key,r.ref?r.ref:null,r.__v):r)?(r.__=e,r.__b=e.__b+1,a=L(r,t,l=o+d,u),r.__i=a,i=null,-1!==a&&(u--,(i=t[a])&&(i.__u|=131072)),null==i||null===i.__v?(-1==a&&d--,"function"!=typeof r.type&&(r.__u|=65536)):a!==l&&(a===l+1?d++:a>l?u>s-l?d+=a-l:d--:d=a<l&&a==l-1?a-l:0,a!==o+d&&(r.__u|=65536))):(i=t[o])&&null==i.key&&i.__e&&(i.__e==e.__d&&(e.__d=k(i)),V(i,i,!1),t[o]=null,u--);if(u)for(o=0;o<c;o++)null!=(i=t[o])&&0==(131072&i.__u)&&(i.__e==e.__d&&(e.__d=k(i)),V(i,i))}(t,n,y),s=t.__d,d=0;d<b;d++)null!=(_=t.__k[d])&&"boolean"!=typeof _&&"function"!=typeof _&&(p=-1===_.__i?f:y[_.__i]||f,_.__i=d,F(e,_,p,r,i,l,a,s,c,u),h=_.__e,_.ref&&p.ref!=_.ref&&(p.ref&&A(p.ref,null,_),u.push(_.ref,_.__c||h,_)),null==m&&null!=h&&(m=h),65536&_.__u||p.__k===_.__k?s=H(_,s,e):"function"==typeof _.type&&void 0!==_.__d?s=_.__d:h&&(s=h.nextSibling),_.__d=void 0,_.__u&=-196609);t.__d=s,t.__e=m}function H(e,n,t){var o,r;if("function"==typeof e.type){for(o=e.__k,r=0;o&&r<o.length;r++)o[r]&&(o[r].__=e,n=H(o[r],n,t));return n}return e.__e!=n&&(t.insertBefore(e.__e,n||null),n=e.__e),n&&n.nextSibling}function L(e,n,t,o){var r=e.key,i=e.type,l=t-1,a=t+1,s=n[t];if(null===s||s&&r==s.key&&i===s.type)return t;if(o>(null!=s&&0==(131072&s.__u)?1:0))for(;l>=0||a<n.length;){if(l>=0){if((s=n[l])&&0==(131072&s.__u)&&r==s.key&&i===s.type)return l;l--}if(a<n.length){if((s=n[a])&&0==(131072&s.__u)&&r==s.key&&i===s.type)return a;a++}}return-1}function M(e,n,t){"-"===n[0]?e.setProperty(n,null==t?"":t):e[n]=null==t?"":"number"!=typeof t||h.test(n)?t:t+"px"}function I(e,n,t,o,r){var i;e:if("style"===n)if("string"==typeof t)e.style.cssText=t;else{if("string"==typeof o&&(e.style.cssText=o=""),o)for(n in o)t&&n in t||M(e.style,n,"");if(t)for(n in t)o&&t[n]===o[n]||M(e.style,n,t[n])}else if("o"===n[0]&&"n"===n[1])i=n!==(n=n.replace(/(PointerCapture)$|Capture$/,"$1")),n=n.toLowerCase()in e?n.toLowerCase().slice(2):n.slice(2),e.l||(e.l={}),e.l[n+i]=t,t?o?t.u=o.u:(t.u=Date.now(),e.addEventListener(n,i?D:E,i)):e.removeEventListener(n,i?D:E,i);else{if(r)n=n.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==n&&"height"!==n&&"href"!==n&&"list"!==n&&"form"!==n&&"tabIndex"!==n&&"download"!==n&&"rowSpan"!==n&&"colSpan"!==n&&"role"!==n&&n in e)try{e[n]=null==t?"":t;break e}catch(e){}"function"==typeof t||(null==t||!1===t&&"-"!==n[4]?e.removeAttribute(n):e.setAttribute(n,t))}}function E(e){var n=this.l[e.type+!1];if(e.t){if(e.t<=n.u)return}else e.t=Date.now();return n(a.event?a.event(e):e)}function D(e){return this.l[e.type+!0](a.event?a.event(e):e)}function F(e,n,t,o,r,i,l,s,c,u){var d,p,_,f,v,h,y,b,C,k,S,q,T,H,L,M=n.type;if(void 0!==n.constructor)return null;128&t.__u&&(c=!!(32&t.__u),i=[s=n.__e=t.__e]),(d=a.__b)&&d(n);e:if("function"==typeof M)try{if(b=n.props,C=(d=M.contextType)&&o[d.__c],k=d?C?C.props.value:d.__:o,t.__c?y=(p=n.__c=t.__c).__=p.__E:("prototype"in M&&M.prototype.render?n.__c=p=new M(b,k):(n.__c=p=new w(b,k),p.constructor=M,p.render=B),C&&C.sub(p),p.props=b,p.state||(p.state={}),p.context=k,p.__n=o,_=p.__d=!0,p.__h=[],p._sb=[]),null==p.__s&&(p.__s=p.state),null!=M.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=m({},p.__s)),m(p.__s,M.getDerivedStateFromProps(b,p.__s))),f=p.props,v=p.state,p.__v=n,_)null==M.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else{if(null==M.getDerivedStateFromProps&&b!==f&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(b,k),!p.__e&&(null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(b,p.__s,k)||n.__v===t.__v)){for(n.__v!==t.__v&&(p.props=b,p.state=p.__s,p.__d=!1),n.__e=t.__e,n.__k=t.__k,n.__k.forEach((function(e){e&&(e.__=n)})),S=0;S<p._sb.length;S++)p.__h.push(p._sb[S]);p._sb=[],p.__h.length&&l.push(p);break e}null!=p.componentWillUpdate&&p.componentWillUpdate(b,p.__s,k),null!=p.componentDidUpdate&&p.__h.push((function(){p.componentDidUpdate(f,v,h)}))}if(p.context=k,p.props=b,p.__P=e,p.__e=!1,q=a.__r,T=0,"prototype"in M&&M.prototype.render){for(p.state=p.__s,p.__d=!1,q&&q(n),d=p.render(p.props,p.state,p.context),H=0;H<p._sb.length;H++)p.__h.push(p._sb[H]);p._sb=[]}else do{p.__d=!1,q&&q(n),d=p.render(p.props,p.state,p.context),p.state=p.__s}while(p.__d&&++T<25);p.state=p.__s,null!=p.getChildContext&&(o=m(m({},o),p.getChildContext())),_||null==p.getSnapshotBeforeUpdate||(h=p.getSnapshotBeforeUpdate(f,v)),P(e,g(L=null!=d&&d.type===x&&null==d.key?d.props.children:d)?L:[L],n,t,o,r,i,l,s,c,u),p.base=n.__e,n.__u&=-161,p.__h.length&&l.push(p),y&&(p.__E=p.__=null)}catch(e){n.__v=null,c||null!=i?(n.__e=s,n.__u|=c?160:32,i[i.indexOf(s)]=null):(n.__e=t.__e,n.__k=t.__k),a.__e(e,n,t)}else null==i&&n.__v===t.__v?(n.__k=t.__k,n.__e=t.__e):n.__e=N(t.__e,n,t,o,r,i,l,c,u);(d=a.diffed)&&d(n)}function Z(e,n,t){n.__d=void 0;for(var o=0;o<t.length;o++)A(t[o],t[++o],t[++o]);a.__c&&a.__c(n,e),e.some((function(n){try{e=n.__h,n.__h=[],e.some((function(e){e.call(n)}))}catch(e){a.__e(e,n.__v)}}))}function N(e,n,t,o,r,i,a,s,c){var u,d,p,_,v,h,m,b=t.props,C=n.props,x=n.type;if("svg"===x&&(r=!0),null!=i)for(u=0;u<i.length;u++)if((v=i[u])&&"setAttribute"in v==!!x&&(x?v.localName===x:3===v.nodeType)){e=v,i[u]=null;break}if(null==e){if(null===x)return document.createTextNode(C);e=r?document.createElementNS("http://www.w3.org/2000/svg",x):document.createElement(x,C.is&&C),i=null,s=!1}if(null===x)b===C||s&&e.data===C||(e.data=C);else{if(i=i&&l.call(e.childNodes),b=t.props||f,!s&&null!=i)for(b={},u=0;u<e.attributes.length;u++)b[(v=e.attributes[u]).name]=v.value;for(u in b)v=b[u],"children"==u||("dangerouslySetInnerHTML"==u?p=v:"key"===u||u in C||I(e,u,null,v,r));for(u in C)v=C[u],"children"==u?_=v:"dangerouslySetInnerHTML"==u?d=v:"value"==u?h=v:"checked"==u?m=v:"key"===u||s&&"function"!=typeof v||b[u]===v||I(e,u,v,b[u],r);if(d)s||p&&(d.__html===p.__html||d.__html===e.innerHTML)||(e.innerHTML=d.__html),n.__k=[];else if(p&&(e.innerHTML=""),P(e,g(_)?_:[_],n,t,o,r&&"foreignObject"!==x,i,a,i?i[0]:t.__k&&k(t,0),s,c),null!=i)for(u=i.length;u--;)null!=i[u]&&y(i[u]);s||(u="value",void 0!==h&&(h!==e[u]||"progress"===x&&!h||"option"===x&&h!==b[u])&&I(e,u,h,b[u],!1),u="checked",void 0!==m&&m!==e[u]&&I(e,u,m,b[u],!1))}return e}function A(e,n,t){try{"function"==typeof e?e(n):e.current=n}catch(e){a.__e(e,t)}}function V(e,n,t){var o,r;if(a.unmount&&a.unmount(e),(o=e.ref)&&(o.current&&o.current!==e.__e||A(o,null,n)),null!=(o=e.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(e){a.__e(e,n)}o.base=o.__P=null,e.__c=void 0}if(o=e.__k)for(r=0;r<o.length;r++)o[r]&&V(o[r],n,t||"function"!=typeof e.type);t||null==e.__e||y(e.__e),e.__=e.__e=e.__d=void 0}function B(e,n,t){return this.constructor(e,t)}function O(e,n,t){var o,r,i,s;a.__&&a.__(e,n),r=(o="function"==typeof t)?null:n.__k,i=[],s=[],F(n,e=(!o&&t||n).__k=b(x,null,[e]),r||f,f,void 0!==n.ownerSVGElement,!o&&t?[t]:r?null:n.firstChild?l.call(n.childNodes):null,i,!o&&t?t:r?r.__e:n.firstChild,o,s),Z(i,e,s)}function Q(e,n,t){var o,r,i,a,s=m({},e.props);for(i in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),n)"key"==i?o=n[i]:"ref"==i?r=n[i]:s[i]=void 0===n[i]&&void 0!==a?a[i]:n[i];return arguments.length>2&&(s.children=arguments.length>3?l.call(arguments,2):t),C(e.type,s,o||e.key,r||e.ref,null)}l=v.slice,a={__e:function(e,n,t,o){for(var r,i,l;n=n.__;)if((r=n.__c)&&!r.__)try{if((i=r.constructor)&&null!=i.getDerivedStateFromError&&(r.setState(i.getDerivedStateFromError(e)),l=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(e,o||{}),l=r.__d),l)return r.__E=r}catch(n){e=n}throw e}},s=0,w.prototype.setState=function(e,n){var t;t=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=m({},this.state),"function"==typeof e&&(e=e(m({},t),this.props)),e&&m(t,e),null!=e&&this.__v&&(n&&this._sb.push(n),q(this))},w.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),q(this))},w.prototype.render=x,c=[],d="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,p=function(e,n){return e.__v.__b-n.__v.__b},T.__r=0,_=0;var j,W,U,R,$=0,z=[],Y=[],G=a.__b,X=a.__r,J=a.diffed,K=a.__c,ee=a.unmount;function ne(e,n){a.__h&&a.__h(W,e,$||n),$=0;var t=W.__H||(W.__H={__:[],__h:[]});return e>=t.__.length&&t.__.push({__V:Y}),t.__[e]}function te(e){return $=1,function(e,n,t){var o=ne(j++,2);if(o.t=e,!o.__c&&(o.__=[_e(void 0,n),function(e){var n=o.__N?o.__N[0]:o.__[0],t=o.t(n,e);n!==t&&(o.__N=[t,o.__[1]],o.__c.setState({}))}],o.__c=W,!W.u)){var r=function(e,n,t){if(!o.__c.__H)return!0;var r=o.__c.__H.__.filter((function(e){return e.__c}));if(r.every((function(e){return!e.__N})))return!i||i.call(this,e,n,t);var l=!1;return r.forEach((function(e){if(e.__N){var n=e.__[0];e.__=e.__N,e.__N=void 0,n!==e.__[0]&&(l=!0)}})),!(!l&&o.__c.props===e)&&(!i||i.call(this,e,n,t))};W.u=!0;var i=W.shouldComponentUpdate,l=W.componentWillUpdate;W.componentWillUpdate=function(e,n,t){if(this.__e){var o=i;i=void 0,r(e,n,t),i=o}l&&l.call(this,e,n,t)},W.shouldComponentUpdate=r}return o.__N||o.__}(_e,e)}function oe(e,n){var t=ne(j++,3);!a.__s&&pe(t.__H,n)&&(t.__=e,t.i=n,W.__H.__h.push(t))}function re(e){return $=5,ie((function(){return{current:e}}),[])}function ie(e,n){var t=ne(j++,7);return pe(t.__H,n)?(t.__V=e(),t.i=n,t.__h=e,t.__V):t.__}function le(e){var n=W.context[e.__c],t=ne(j++,9);return t.c=e,n?(null==t.__&&(t.__=!0,n.sub(W)),n.props.value):e.__}function ae(){for(var e;e=z.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ue),e.__H.__h.forEach(de),e.__H.__h=[]}catch(n){e.__H.__h=[],a.__e(n,e.__v)}}a.__b=function(e){W=null,G&&G(e)},a.__r=function(e){X&&X(e),j=0;var n=(W=e.__c).__H;n&&(U===W?(n.__h=[],W.__h=[],n.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=Y,e.__N=e.i=void 0}))):(n.__h.forEach(ue),n.__h.forEach(de),n.__h=[],j=0)),U=W},a.diffed=function(e){J&&J(e);var n=e.__c;n&&n.__H&&(n.__H.__h.length&&(1!==z.push(n)&&R===a.requestAnimationFrame||((R=a.requestAnimationFrame)||ce)(ae)),n.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==Y&&(e.__=e.__V),e.i=void 0,e.__V=Y}))),U=W=null},a.__c=function(e,n){n.some((function(e){try{e.__h.forEach(ue),e.__h=e.__h.filter((function(e){return!e.__||de(e)}))}catch(t){n.some((function(e){e.__h&&(e.__h=[])})),n=[],a.__e(t,e.__v)}})),K&&K(e,n)},a.unmount=function(e){ee&&ee(e);var n,t=e.__c;t&&t.__H&&(t.__H.__.forEach((function(e){try{ue(e)}catch(e){n=e}})),t.__H=void 0,n&&a.__e(n,t.__v))};var se="function"==typeof requestAnimationFrame;function ce(e){var n,t=function(){clearTimeout(o),se&&cancelAnimationFrame(n),setTimeout(e)},o=setTimeout(t,100);se&&(n=requestAnimationFrame(t))}function ue(e){var n=W,t=e.__c;"function"==typeof t&&(e.__c=void 0,t()),W=n}function de(e){var n=W;e.__c=e.__(),W=n}function pe(e,n){return!e||e.length!==n.length||n.some((function(n,t){return n!==e[t]}))}function _e(e,n){return"function"==typeof n?n(e):n}var fe="undefined"!=typeof window?window:void 0,ve="undefined"!=typeof globalThis?globalThis:fe,he=null==ve?void 0:ve.navigator,ge=null==ve?void 0:ve.document;null==ve||ve.location,null==ve||ve.fetch,null!=ve&&ve.XMLHttpRequest&&"withCredentials"in new ve.XMLHttpRequest&&ve.XMLHttpRequest,null==ve||ve.AbortController,null==he||he.userAgent;var me,ye=null!=fe?fe:{};!function(e){e.GZipJS="gzip-js",e.Base64="base64"}(me||(me={}));var be=Array.isArray,Ce=Object.prototype.toString,xe=be||function(e){return"[object Array]"===Ce.call(e)},we=e=>null===e,ke=e=>"[object Number]"==Ce.call(e),Se=e=>{var n={_log:function(n){if(fe&&ye.POSTHOG_DEBUG&&!(e=>void 0===e)(fe.console)&&fe.console){for(var t=("__rrweb_original__"in fe.console[n]?fe.console[n].__rrweb_original__:fe.console[n]),o=arguments.length,r=new Array(o>1?o-1:0),i=1;i<o;i++)r[i-1]=arguments[i];t(e,...r)}},info:function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];n._log("log",...t)},warn:function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];n._log("warn",...t)},error:function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];n._log("error",...t)},critical:function(){for(var n=arguments.length,t=new Array(n),o=0;o<n;o++)t[o]=arguments[o];console.error(e,...t)},uninitializedWarning:e=>{n.error("You must initialize PostHog before calling ".concat(e))},createLogger:n=>Se("".concat(e," ").concat(n))};return n},qe=Se("[PostHog.js]").createLogger,Te=ge;var Pe=fe,He=ge,Le="seenSurvey_",Me=e=>"\n .survey-form, .thank-you-message {\n position: fixed;\n margin: 0px;\n bottom: 0px;\n color: black;\n font-weight: normal;\n font-family: ".concat((null==e?void 0:e.fontFamily)||"-apple-system",', BlinkMacSystemFont, "Inter", "Segoe UI", "Roboto", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n text-align: left;\n max-width: ').concat(parseInt((null==e?void 0:e.maxWidth)||"300"),"px;\n width: 100%;\n z-index: ").concat(parseInt((null==e?void 0:e.zIndex)||"99999"),";\n border: 1.5px solid ").concat((null==e?void 0:e.borderColor)||"#c9c6c6",";\n border-bottom: 0px;\n ").concat({left:"left: 30px;",right:"right: 30px;",center:"\n left: 50%;\n transform: translateX(-50%);\n "}[(null==e?void 0:e.position)||"right"]||"right: 30px;","\n flex-direction: column;\n background: ").concat((null==e?void 0:e.backgroundColor)||"#eeeded",";\n border-top-left-radius: 10px;\n border-top-right-radius: 10px;\n box-shadow: -6px 0 16px -8px rgb(0 0 0 / 8%), -9px 0 28px 0 rgb(0 0 0 / 5%), -12px 0 48px 16px rgb(0 0 0 / 3%);\n }\n\n .survey-box, .thank-you-message-container {\n padding: 20px 25px 10px;\n display: flex;\n flex-direction: column;\n border-radius: 10px;\n }\n\n .thank-you-message {\n text-align: center;\n }\n\n .form-submit[disabled] {\n opacity: 0.6;\n filter: grayscale(50%);\n cursor: not-allowed;\n }\n .survey-form textarea {\n color: #2d2d2d;\n font-size: 14px;\n font-family: ").concat((null==e?void 0:e.fontFamily)||"-apple-system",', BlinkMacSystemFont, "Inter", "Segoe UI", "Roboto", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n background: white;\n color: black;\n outline: none;\n padding-left: 10px;\n padding-right: 10px;\n padding-top: 10px;\n border-radius: 6px;\n border-color: ').concat((null==e?void 0:e.borderColor)||"#c9c6c6",";\n margin-top: 14px;\n width: 100%;\n box-sizing: border-box;\n }\n .survey-box:has(.survey-question:empty):not(:has(.survey-question-description)) textarea {\n margin-top: 0;\n }\n .form-submit {\n box-sizing: border-box;\n margin: 0;\n font-family: inherit;\n overflow: visible;\n text-transform: none;\n position: relative;\n display: inline-block;\n font-weight: 700;\n white-space: nowrap;\n text-align: center;\n border: 1.5px solid transparent;\n cursor: pointer;\n user-select: none;\n touch-action: manipulation;\n padding: 12px;\n font-size: 14px;\n border-radius: 6px;\n outline: 0;\n background: ").concat((null==e?void 0:e.submitButtonColor)||"black"," !important;\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.12);\n box-shadow: 0 2px 0 rgba(0, 0, 0, 0.045);\n width: 100%;\n }\n .form-cancel {\n display: flex;\n float: right;\n border: none;\n background: none;\n cursor: pointer;\n }\n .cancel-btn-wrapper {\n position: absolute;\n width: 35px;\n height: 35px;\n border-radius: 100%;\n top: 0;\n right: 0;\n transform: translate(50%, -50%);\n background: white;\n border: 1.5px solid ").concat((null==e?void 0:e.borderColor)||"#c9c6c6",";\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .bolded { font-weight: 600; }\n .buttons {\n display: flex;\n justify-content: center;\n }\n .footer-branding {\n font-size: 11px;\n margin-top: 10px;\n text-align: center;\n display: flex;\n justify-content: center;\n gap: 4px;\n align-items: center;\n font-weight: 500;\n background: ").concat((null==e?void 0:e.backgroundColor)||"#eeeded",";\n text-decoration: none;\n backgroundColor: ").concat((null==e?void 0:e.backgroundColor)||"#eeeded",";\n color: ").concat(Ee((null==e?void 0:e.backgroundColor)||"#eeeded"),";\n }\n .survey-question {\n font-weight: 500;\n font-size: 14px;\n background: ").concat((null==e?void 0:e.backgroundColor)||"#eeeded",";\n }\n .question-textarea-wrapper {\n display: flex;\n flex-direction: column;\n }\n .survey-question-description {\n font-size: 13px;\n padding-top: 5px;\n background: ").concat((null==e?void 0:e.backgroundColor)||"#eeeded",";\n }\n .ratings-number {\n font-size: 16px;\n font-weight: 600;\n padding: 8px 0px;\n border: none;\n }\n .ratings-number:hover {\n cursor: pointer;\n }\n .rating-options {\n margin-top: 14px;\n }\n .rating-options-number {\n display: grid;\n border-radius: 6px;\n overflow: hidden;\n border: 1.5px solid ").concat((null==e?void 0:e.borderColor)||"#c9c6c6",";\n }\n .rating-options-number > .ratings-number {\n border-right: 1px solid ").concat((null==e?void 0:e.borderColor)||"#c9c6c6",";\n }\n .rating-options-number > .ratings-number:last-of-type {\n border-right: 0px;\n }\n .rating-options-number .rating-active {\n background: ").concat((null==e?void 0:e.ratingButtonActiveColor)||"black",";\n }\n .rating-options-emoji {\n display: flex;\n justify-content: space-between;\n }\n .ratings-emoji {\n font-size: 16px;\n background-color: transparent;\n border: none;\n padding: 0px;\n }\n .ratings-emoji:hover {\n cursor: pointer;\n }\n .ratings-emoji.rating-active svg {\n fill: ").concat((null==e?void 0:e.ratingButtonActiveColor)||"black",";\n }\n .emoji-svg {\n fill: '#939393';\n }\n .rating-text {\n display: flex;\n flex-direction: row;\n font-size: 11px;\n justify-content: space-between;\n margin-top: 6px;\n background: ").concat((null==e?void 0:e.backgroundColor)||"#eeeded",";\n opacity: .60;\n }\n .multiple-choice-options {\n margin-top: 13px;\n font-size: 14px;\n }\n .survey-box:has(.survey-question:empty):not(:has(.survey-question-description)) .multiple-choice-options {\n margin-top: 0;\n }\n .multiple-choice-options .choice-option {\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 13px;\n cursor: pointer;\n margin-bottom: 5px;\n position: relative;\n }\n .multiple-choice-options > .choice-option:last-of-type {\n margin-bottom: 0px;\n }\n .multiple-choice-options input {\n cursor: pointer;\n position: absolute;\n opacity: 0;\n }\n .choice-check {\n position: absolute;\n right: 10px;\n background: white;\n }\n .choice-check svg {\n display: none;\n }\n .multiple-choice-options .choice-option:hover .choice-check svg {\n display: inline-block;\n opacity: .25;\n }\n .multiple-choice-options input:checked + label + .choice-check svg {\n display: inline-block;\n opacity: 100% !important;\n }\n .multiple-choice-options input:checked + label {\n font-weight: bold;\n border: 1.5px solid rgba(0,0,0);\n }\n .multiple-choice-options input:checked + label input {\n font-weight: bold;\n }\n .multiple-choice-options label {\n width: 100%;\n cursor: pointer;\n padding: 10px;\n border: 1.5px solid rgba(0,0,0,.25);\n border-radius: 4px;\n background: white;\n }\n .multiple-choice-options .choice-option-open label {\n padding-right: 30px;\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n max-width: 100%;\n }\n .multiple-choice-options .choice-option-open label span {\n width: 100%;\n }\n .multiple-choice-options .choice-option-open input:disabled + label {\n opacity: 0.6;\n }\n .multiple-choice-options .choice-option-open label input {\n position: relative;\n opacity: 1;\n flex-grow: 1;\n border: 0;\n outline: 0;\n }\n .thank-you-message-body {\n margin-top: 6px;\n font-size: 14px;\n background: ").concat((null==e?void 0:e.backgroundColor)||"#eeeded",";\n }\n .thank-you-message-header {\n margin: 10px 0px 0px;\n background: ").concat((null==e?void 0:e.backgroundColor)||"#eeeded",";\n }\n .thank-you-message-container .form-submit {\n margin-top: 20px;\n margin-bottom: 10px;\n }\n .thank-you-message-countdown {\n margin-left: 6px;\n }\n .bottom-section {\n margin-top: 14px;\n }\n ");function Ie(e){if("#"===e[0]){var n=e.replace(/^#/,"");return"rgb("+parseInt(n.slice(0,2),16)+","+parseInt(n.slice(2,4),16)+","+parseInt(n.slice(4,6),16)+")"}return"rgb(255, 255, 255)"}function Ee(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Fe;"#"===n[0]&&(e=Ie(n)),n.startsWith("rgb")&&(e=n);var t={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}[n.toLowerCase()];if(t&&(e=Ie(t)),!e)return"black";var o=e.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);if(o){var r=parseInt(o[1]),i=parseInt(o[2]),l=parseInt(o[3]);return Math.sqrt(r*r*.299+i*i*.587+l*l*.114)>127.5?"black":"white"}return"black"}var De={backgroundColor:"#eeeded",submitButtonColor:"black",submitButtonTextColor:"white",ratingButtonColor:"white",ratingButtonActiveColor:"black",borderColor:"#c9c6c6",placeholder:"Start typing...",whiteLabel:!1,displayThankYouMessage:!0,thankYouMessageHeader:"Thank you for your feedback!",position:"right"},Fe="#eeeded",Ze=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;r&&(localStorage.setItem(Qe(o),"true"),r.capture("survey sent",n(n({$survey_name:o.name,$survey_id:o.id,$survey_iteration:o.current_iteration,$survey_iteration_start_date:o.current_iteration_start_date,$survey_questions:o.questions.map((e=>e.question)),sessionRecordingUrl:null===(e=r.get_session_replay_url)||void 0===e?void 0:e.call(r)},t),{},{$set:{[je(o,"responded")]:!0}})),Pe.dispatchEvent(new Event("PHSurveySent")))},Ne=(e,n,t)=>{var o;!t&&n&&(n.capture("survey dismissed",{$survey_name:e.name,$survey_id:e.id,$survey_iteration:e.current_iteration,$survey_iteration_start_date:e.current_iteration_start_date,sessionRecordingUrl:null===(o=n.get_session_replay_url)||void 0===o?void 0:o.call(n),$set:{[je(e,"dismissed")]:!0}}),localStorage.setItem(Qe(e),"true"),Pe.dispatchEvent(new Event("PHSurveyClosed")))},Ae=e=>e.map((e=>({sort:Math.floor(10*Math.random()),value:e}))).sort(((e,n)=>e.sort-n.sort)).map((e=>e.value)),Ve=(e,n)=>e.length===n.length&&e.every(((e,t)=>e===n[t]))?n.reverse():n,Be=e=>(e.questions.forEach(((e,n)=>{e.originalQuestionIndex=n})),e.appearance&&e.appearance.shuffleQuestions?Ve(e.questions,Ae(e.questions)):e.questions),Oe=e=>{var n,t;return!(null===(n=e.conditions)||void 0===n||null===(t=n.events)||void 0===t||!t.repeatedActivation||!(e=>{var n,t,o,r,i,l;return null!=(null===(n=e.conditions)||void 0===n||null===(t=n.events)||void 0===t||null===(o=t.values)||void 0===o?void 0:o.length)&&(null===(r=e.conditions)||void 0===r||null===(i=r.events)||void 0===i||null===(l=i.values)||void 0===l?void 0:l.length)>0})(e))},Qe=e=>{var n="".concat(Le).concat(e.id);return e.current_iteration&&e.current_iteration>0&&(n="".concat(Le).concat(e.id,"_").concat(e.current_iteration)),n},je=(e,n)=>{var t="$survey_".concat(n,"/").concat(e.id);return e.current_iteration&&e.current_iteration>0&&(t="$survey_".concat(n,"/").concat(e.id,"/").concat(e.current_iteration)),t},We=function(e,n){var t={__c:n="__cC"+_++,__:e,Consumer:function(e,n){return e.children(n)},Provider:function(e){var t,o;return this.getChildContext||(t=[],(o={})[n]=this,this.getChildContext=function(){return o},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&t.some((function(e){e.__e=!0,q(e)}))},this.sub=function(e){t.push(e);var n=e.componentWillUnmount;e.componentWillUnmount=function(){t.splice(t.indexOf(e),1),n&&n.call(e)}}),e.children}};return t.Provider.__=t.Consumer.contextType=t}({isPreviewMode:!1,previewPageIndex:0,handleCloseSurveyPopup:()=>{},isPopup:!0,onPreviewSubmit:()=>{}}),Ue=e=>{var{component:n,children:t,renderAsHtml:o,style:r}=e;return Q(n,o?{dangerouslySetInnerHTML:{__html:t},style:r}:{children:t,style:r})},Re=0;function $e(e,n,t,o,r,i){var l,s,c={};for(s in n)"ref"==s?l=n[s]:c[s]=n[s];var u={type:e,props:c,key:t,ref:l,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--Re,__i:-1,__u:0,__source:r,__self:i};if("function"==typeof e&&(l=e.defaultProps))for(s in l)void 0===c[s]&&(c[s]=l[s]);return a.vnode&&a.vnode(u),u}var ze=$e("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:$e("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm146 272q66 0 121.5-35.5T682-393h-52q-23 40-63 61.5T480.5-310q-46.5 0-87-21T331-393h-53q26 61 81 96.5T480-261Zm0 181q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),Ye=$e("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:$e("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm20 194h253v-49H354v49ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),Ge=$e("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:$e("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm146.174 116Q413-417 358.5-379.5T278-280h53q22-42 62.173-65t87.5-23Q528-368 567.5-344.5T630-280h52q-25-63-79.826-100-54.826-37-122-37ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),Xe=$e("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:$e("path",{d:"M480-417q-67 0-121.5 37.5T278-280h404q-25-63-80-100t-122-37Zm-183-72 50-45 45 45 31-36-45-45 45-45-31-36-45 45-50-45-31 36 45 45-45 45 31 36Zm272 0 44-45 51 45 31-36-45-45 45-45-31-36-51 45-44-45-31 36 44 45-44 45 31 36ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142 0 241-99t99-241q0-142-99-241t-241-99q-142 0-241 99t-99 241q0 142 99 241t241 99Z"})}),Je=$e("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:$e("path",{d:"M479.504-261Q537-261 585.5-287q48.5-26 78.5-72.4 6-11.6-.75-22.6-6.75-11-20.25-11H316.918Q303-393 296.5-382t-.5 22.6q30 46.4 78.5 72.4 48.5 26 105.004 26ZM347-578l27 27q7.636 8 17.818 8Q402-543 410-551q8-8 8-18t-8-18l-42-42q-8.8-9-20.9-9-12.1 0-21.1 9l-42 42q-8 7.636-8 17.818Q276-559 284-551q8 8 18 8t18-8l27-27Zm267 0 27 27q7.714 8 18 8t18-8q8-7.636 8-17.818Q685-579 677-587l-42-42q-8.8-9-20.9-9-12.1 0-21.1 9l-42 42q-8 7.714-8 18t8 18q7.636 8 17.818 8Q579-543 587-551l27-27ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),Ke=$e("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:$e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.164752 0.164752C0.384422 -0.0549175 0.740578 -0.0549175 0.960248 0.164752L6 5.20451L11.0398 0.164752C11.2594 -0.0549175 11.6156 -0.0549175 11.8352 0.164752C12.0549 0.384422 12.0549 0.740578 11.8352 0.960248L6.79549 6L11.8352 11.0398C12.0549 11.2594 12.0549 11.6156 11.8352 11.8352C11.6156 12.0549 11.2594 12.0549 11.0398 11.8352L6 6.79549L0.960248 11.8352C0.740578 12.0549 0.384422 12.0549 0.164752 11.8352C-0.0549175 11.6156 -0.0549175 11.2594 0.164752 11.0398L5.20451 6L0.164752 0.960248C-0.0549175 0.740578 -0.0549175 0.384422 0.164752 0.164752Z",fill:"black"})}),en=$e("svg",{width:"77",height:"14",viewBox:"0 0 77 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[$e("g",{"clip-path":"url(#clip0_2415_6911)",children:[$e("mask",{id:"mask0_2415_6911",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"77",height:"14",children:$e("path",{d:"M0.5 0H76.5V14H0.5V0Z",fill:"white"})}),$e("g",{mask:"url(#mask0_2415_6911)",children:[$e("path",{d:"M5.77226 8.02931C5.59388 8.37329 5.08474 8.37329 4.90634 8.02931L4.4797 7.20672C4.41155 7.07535 4.41155 6.9207 4.4797 6.78933L4.90634 5.96669C5.08474 5.62276 5.59388 5.62276 5.77226 5.96669L6.19893 6.78933C6.26709 6.9207 6.26709 7.07535 6.19893 7.20672L5.77226 8.02931ZM5.77226 12.6946C5.59388 13.0386 5.08474 13.0386 4.90634 12.6946L4.4797 11.872C4.41155 11.7406 4.41155 11.586 4.4797 11.4546L4.90634 10.632C5.08474 10.288 5.59388 10.288 5.77226 10.632L6.19893 11.4546C6.26709 11.586 6.26709 11.7406 6.19893 11.872L5.77226 12.6946Z",fill:"#1D4AFF"}),$e("path",{d:"M0.5 10.9238C0.5 10.508 1.02142 10.2998 1.32637 10.5938L3.54508 12.7327C3.85003 13.0267 3.63405 13.5294 3.20279 13.5294H0.984076C0.716728 13.5294 0.5 13.3205 0.5 13.0627V10.9238ZM0.5 8.67083C0.5 8.79459 0.551001 8.91331 0.641783 9.00081L5.19753 13.3927C5.28831 13.4802 5.41144 13.5294 5.53982 13.5294H8.0421C8.47337 13.5294 8.68936 13.0267 8.3844 12.7327L1.32637 5.92856C1.02142 5.63456 0.5 5.84278 0.5 6.25854V8.67083ZM0.5 4.00556C0.5 4.12932 0.551001 4.24802 0.641783 4.33554L10.0368 13.3927C10.1276 13.4802 10.2508 13.5294 10.3791 13.5294H12.8814C13.3127 13.5294 13.5287 13.0267 13.2237 12.7327L1.32637 1.26329C1.02142 0.969312 0.5 1.17752 0.5 1.59327V4.00556ZM5.33931 4.00556C5.33931 4.12932 5.39033 4.24802 5.4811 4.33554L14.1916 12.7327C14.4965 13.0267 15.0179 12.8185 15.0179 12.4028V9.99047C15.0179 9.86671 14.9669 9.74799 14.8762 9.66049L6.16568 1.26329C5.86071 0.969307 5.33931 1.17752 5.33931 1.59327V4.00556ZM11.005 1.26329C10.7 0.969307 10.1786 1.17752 10.1786 1.59327V4.00556C10.1786 4.12932 10.2296 4.24802 10.3204 4.33554L14.1916 8.06748C14.4965 8.36148 15.0179 8.15325 15.0179 7.7375V5.3252C15.0179 5.20144 14.9669 5.08272 14.8762 4.99522L11.005 1.26329Z",fill:"#F9BD2B"}),$e("path",{d:"M21.0852 10.981L16.5288 6.58843C16.2238 6.29443 15.7024 6.50266 15.7024 6.91841V13.0627C15.7024 13.3205 15.9191 13.5294 16.1865 13.5294H23.2446C23.5119 13.5294 23.7287 13.3205 23.7287 13.0627V12.5032C23.7287 12.2455 23.511 12.0396 23.2459 12.0063C22.4323 11.9042 21.6713 11.546 21.0852 10.981ZM18.0252 12.0365C17.5978 12.0365 17.251 11.7021 17.251 11.2901C17.251 10.878 17.5978 10.5436 18.0252 10.5436C18.4527 10.5436 18.7996 10.878 18.7996 11.2901C18.7996 11.7021 18.4527 12.0365 18.0252 12.0365Z",fill:"currentColor"}),$e("path",{d:"M0.5 13.0627C0.5 13.3205 0.716728 13.5294 0.984076 13.5294H3.20279C3.63405 13.5294 3.85003 13.0267 3.54508 12.7327L1.32637 10.5938C1.02142 10.2998 0.5 10.508 0.5 10.9238V13.0627ZM5.33931 5.13191L1.32637 1.26329C1.02142 0.969306 0.5 1.17752 0.5 1.59327V4.00556C0.5 4.12932 0.551001 4.24802 0.641783 4.33554L5.33931 8.86412V5.13191ZM1.32637 5.92855C1.02142 5.63455 0.5 5.84278 0.5 6.25853V8.67083C0.5 8.79459 0.551001 8.91331 0.641783 9.00081L5.33931 13.5294V9.79717L1.32637 5.92855Z",fill:"#1D4AFF"}),$e("path",{d:"M10.1787 5.3252C10.1787 5.20144 10.1277 5.08272 10.0369 4.99522L6.16572 1.26329C5.8608 0.969306 5.33936 1.17752 5.33936 1.59327V4.00556C5.33936 4.12932 5.39037 4.24802 5.48114 4.33554L10.1787 8.86412V5.3252ZM5.33936 13.5294H8.04214C8.47341 13.5294 8.6894 13.0267 8.38443 12.7327L5.33936 9.79717V13.5294ZM5.33936 5.13191V8.67083C5.33936 8.79459 5.39037 8.91331 5.48114 9.00081L10.1787 13.5294V9.99047C10.1787 9.86671 10.1277 9.74803 10.0369 9.66049L5.33936 5.13191Z",fill:"#F54E00"}),$e("path",{d:"M29.375 11.6667H31.3636V8.48772H33.0249C34.8499 8.48772 36.0204 7.4443 36.0204 5.83052C36.0204 4.21681 34.8499 3.17334 33.0249 3.17334H29.375V11.6667ZM31.3636 6.84972V4.81136H32.8236C33.5787 4.81136 34.0318 5.19958 34.0318 5.83052C34.0318 6.4615 33.5787 6.84972 32.8236 6.84972H31.3636ZM39.618 11.7637C41.5563 11.7637 42.9659 10.429 42.9659 8.60905C42.9659 6.78905 41.5563 5.45438 39.618 5.45438C37.6546 5.45438 36.2701 6.78905 36.2701 8.60905C36.2701 10.429 37.6546 11.7637 39.618 11.7637ZM38.1077 8.60905C38.1077 7.63838 38.7118 6.97105 39.618 6.97105C40.5116 6.97105 41.1157 7.63838 41.1157 8.60905C41.1157 9.57972 40.5116 10.2471 39.618 10.2471C38.7118 10.2471 38.1077 9.57972 38.1077 8.60905ZM46.1482 11.7637C47.6333 11.7637 48.6402 10.8658 48.6402 9.81025C48.6402 7.33505 45.2294 8.13585 45.2294 7.16518C45.2294 6.8983 45.5189 6.72843 45.9342 6.72843C46.3622 6.72843 46.8782 6.98318 47.0418 7.54132L48.527 6.94678C48.2375 6.06105 47.1677 5.45438 45.8713 5.45438C44.4743 5.45438 43.6058 6.25518 43.6058 7.21372C43.6058 9.53118 46.9663 8.88812 46.9663 9.84665C46.9663 10.1864 46.6391 10.417 46.1482 10.417C45.4434 10.417 44.9525 9.94376 44.8015 9.3735L43.3164 9.93158C43.6436 10.8537 44.6001 11.7637 46.1482 11.7637ZM53.4241 11.606L53.2982 10.0651C53.0843 10.1743 52.8074 10.2106 52.5808 10.2106C52.1278 10.2106 51.8257 9.89523 51.8257 9.34918V7.03172H53.3612V5.55145H51.8257V3.78001H49.9755V5.55145H48.9687V7.03172H49.9755V9.57972C49.9755 11.06 51.0202 11.7637 52.3921 11.7637C52.7696 11.7637 53.122 11.7031 53.4241 11.606ZM59.8749 3.17334V6.47358H56.376V3.17334H54.3874V11.6667H56.376V8.11158H59.8749V11.6667H61.8761V3.17334H59.8749ZM66.2899 11.7637C68.2281 11.7637 69.6378 10.429 69.6378 8.60905C69.6378 6.78905 68.2281 5.45438 66.2899 5.45438C64.3265 5.45438 62.942 6.78905 62.942 8.60905C62.942 10.429 64.3265 11.7637 66.2899 11.7637ZM64.7796 8.60905C64.7796 7.63838 65.3837 6.97105 66.2899 6.97105C67.1835 6.97105 67.7876 7.63838 67.7876 8.60905C67.7876 9.57972 67.1835 10.2471 66.2899 10.2471C65.3837 10.2471 64.7796 9.57972 64.7796 8.60905ZM73.2088 11.4725C73.901 11.4725 74.5177 11.242 74.845 10.8416V11.424C74.845 12.1034 74.2786 12.5767 73.4102 12.5767C72.7935 12.5767 72.2523 12.2854 72.1642 11.788L70.4776 12.0428C70.7042 13.1955 71.925 13.972 73.4102 13.972C75.361 13.972 76.6574 12.8679 76.6574 11.2298V5.55145H74.8324V6.07318C74.4926 5.69705 73.9136 5.45438 73.171 5.45438C71.409 5.45438 70.3014 6.61918 70.3014 8.46345C70.3014 10.3077 71.409 11.4725 73.2088 11.4725ZM72.1012 8.46345C72.1012 7.55345 72.655 6.97105 73.5109 6.97105C74.3793 6.97105 74.9331 7.55345 74.9331 8.46345C74.9331 9.37345 74.3793 9.95585 73.5109 9.95585C72.655 9.95585 72.1012 9.37345 72.1012 8.46345Z",fill:"currentColor"})]})]}),$e("defs",{children:$e("clipPath",{id:"clip0_2415_6911",children:$e("rect",{width:"76",height:"14",fill:"white",transform:"translate(0.5)"})})})]}),nn=$e("svg",{width:"16",height:"12",viewBox:"0 0 16 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:$e("path",{d:"M5.30769 10.6923L4.77736 11.2226C4.91801 11.3633 5.10878 11.4423 5.30769 11.4423C5.5066 11.4423 5.69737 11.3633 5.83802 11.2226L5.30769 10.6923ZM15.5303 1.53033C15.8232 1.23744 15.8232 0.762563 15.5303 0.46967C15.2374 0.176777 14.7626 0.176777 14.4697 0.46967L15.5303 1.53033ZM1.53033 5.85429C1.23744 5.56139 0.762563 5.56139 0.46967 5.85429C0.176777 6.14718 0.176777 6.62205 0.46967 6.91495L1.53033 5.85429ZM5.83802 11.2226L15.5303 1.53033L14.4697 0.46967L4.77736 10.162L5.83802 11.2226ZM0.46967 6.91495L4.77736 11.2226L5.83802 10.162L1.53033 5.85429L0.46967 6.91495Z",fill:"currentColor"})});function tn(){return $e("a",{href:"https://posthog.com",target:"_blank",rel:"noopener",className:"footer-branding",children:["Survey by ",en]})}function on(e){var{text:n,submitDisabled:t,appearance:o,onSubmit:r,link:i,onPreviewSubmit:l}=e,{isPreviewMode:a,isPopup:s}=le(We),c=o.submitButtonTextColor||Ee(o.submitButtonColor||De.submitButtonColor);return $e("div",{className:"bottom-section",children:[$e("div",{className:"buttons",children:$e("button",{className:"form-submit",disabled:t,type:"button",style:s?{color:c}:{},onClick:()=>{a?null==l||l():(i&&(null==fe||fe.open(i)),r())},children:n})}),!o.whiteLabel&&$e(tn,{})]})}function rn(e){var{question:n,description:t,descriptionContentType:o,backgroundColor:r,forceDisableHtml:i}=e,{isPopup:l}=le(We);return $e("div",{style:l?{backgroundColor:r||De.backgroundColor}:{},children:[$e("div",{className:"survey-question",children:n}),t&&Ue({component:b("div",{className:"survey-question-description"}),children:t,renderAsHtml:!i&&"text"!==o})]})}function ln(e){var{onClick:n}=e,{isPreviewMode:t}=le(We);return $e("div",{className:"cancel-btn-wrapper",onClick:n,disabled:t,children:$e("button",{className:"form-cancel",onClick:n,disabled:t,children:Ke})})}function an(e){var{header:t,description:o,contentType:r,forceDisableHtml:i,appearance:l,onClose:a,styleOverrides:s}=e,c=Ee(l.backgroundColor||De.backgroundColor),{isPopup:u}=le(We);return $e(x,{children:$e("div",{className:"thank-you-message",style:n({},s),children:$e("div",{className:"thank-you-message-container",children:[u&&$e(ln,{onClick:()=>a()}),$e("h3",{className:"thank-you-message-header",style:{color:c},children:t}),o&&Ue({component:b("div",{className:"thank-you-message-body"}),children:o,renderAsHtml:!i&&"text"!==r,style:{color:c}}),u&&$e(on,{text:l.thankYouMessageCloseButtonText||"Close",submitDisabled:!1,appearance:l,onSubmit:()=>a()})]})})})}function sn(e){var n,t=re(null),[o,r]=te(null!==(n=e.defaultTextColor)&&void 0!==n?n:"black");return oe((()=>{if(t.current){var e=function(e){var n=Pe.getComputedStyle(e).backgroundColor;if("rgba(0, 0, 0, 0)"===n)return"black";var t=n.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);if(!t)return"black";var o=parseInt(t[1]),r=parseInt(t[2]),i=parseInt(t[3]);return Math.sqrt(o*o*.299+r*r*.587+i*i*.114)>127.5?"black":"white"}(t.current);r(e)}}),[e.appearance,e.forceUpdate]),{ref:t,textColor:o}}function cn(e){var{question:n,forceDisableHtml:t,appearance:o,onSubmit:r,onPreviewSubmit:i}=e,l=re(null),[a,s]=te("");return $e("div",{ref:l,children:[$e(rn,{question:n.question,description:n.description,descriptionContentType:n.descriptionContentType,backgroundColor:o.backgroundColor,forceDisableHtml:t}),$e("textarea",{rows:4,placeholder:null==o?void 0:o.placeholder,onInput:e=>s(e.currentTarget.value)}),$e(on,{text:n.buttonText||"Submit",submitDisabled:!a&&!n.optional,appearance:o,onSubmit:()=>r(a),onPreviewSubmit:()=>i(a)})]})}function un(e){var{question:n,forceDisableHtml:t,appearance:o,onSubmit:r,onPreviewSubmit:i}=e;return $e(x,{children:[$e(rn,{question:n.question,description:n.description,descriptionContentType:n.descriptionContentType,forceDisableHtml:t}),$e(on,{text:n.buttonText||"Submit",submitDisabled:!1,link:n.link,appearance:o,onSubmit:()=>r("link clicked"),onPreviewSubmit:()=>i("link clicked")})]})}function dn(e){var{question:n,forceDisableHtml:t,displayQuestionIndex:o,appearance:r,onSubmit:i,onPreviewSubmit:l}=e,a=n.scale,s=10===n.scale?0:1,[c,u]=te(null);return $e(x,{children:[$e(rn,{question:n.question,description:n.description,descriptionContentType:n.descriptionContentType,forceDisableHtml:t,backgroundColor:r.backgroundColor}),$e("div",{className:"rating-section",children:[$e("div",{className:"rating-options",children:["emoji"===n.display&&$e("div",{className:"rating-options-emoji",children:(3===n.scale?fn:vn).map(((e,n)=>{var t=n+1===c;return $e("button",{className:"ratings-emoji question-".concat(o,"-rating-").concat(n," ").concat(t?"rating-active":null),value:n+1,type:"button",onClick:()=>{u(n+1)},style:{fill:t?r.ratingButtonActiveColor:r.ratingButtonColor,borderColor:r.borderColor},children:e},n)}))}),"number"===n.display&&$e("div",{className:"rating-options-number",style:{gridTemplateColumns:"repeat(".concat(a-s+1,", minmax(0, 1fr))")},children:yn(n.scale).map(((e,n)=>$e(pn,{displayQuestionIndex:o,active:c===e,appearance:r,num:e,setActiveNumber:e=>{u(e)}},n)))})]}),$e("div",{className:"rating-text",children:[$e("div",{children:n.lowerBoundLabel}),$e("div",{children:n.upperBoundLabel})]})]}),$e(on,{text:n.buttonText||(null==r?void 0:r.submitButtonText)||"Submit",submitDisabled:we(c)&&!n.optional,appearance:r,onSubmit:()=>i(c),onPreviewSubmit:()=>l(c)})]})}function pn(e){var{num:n,active:t,displayQuestionIndex:o,appearance:r,setActiveNumber:i}=e,{textColor:l,ref:a}=sn({appearance:r,defaultTextColor:"black",forceUpdate:t});return $e("button",{ref:a,className:"ratings-number question-".concat(o,"-rating-").concat(n," ").concat(t?"rating-active":null),type:"button",onClick:()=>{i(n)},style:{color:l,backgroundColor:t?r.ratingButtonActiveColor:r.ratingButtonColor,borderColor:r.borderColor},children:n})}function _n(e){var{question:n,forceDisableHtml:t,displayQuestionIndex:o,appearance:i,onSubmit:l,onPreviewSubmit:a}=e,s=re(null),c=ie((()=>(e=>{if(!e.shuffleOptions)return e.choices;var n=e.choices,t="";e.hasOpenChoice&&(t=n.pop());var o=Ve(n,Ae(n));return e.hasOpenChoice&&(e.choices.push(t),o.push(t)),o})(n)),[n]),[u,d]=te(n.type===r.MultipleChoice?[]:null),[p,_]=te(!1),[f,v]=te(""),h=n.type===r.SingleChoice?"radio":"checkbox";return $e("div",{ref:s,children:[$e(rn,{question:n.question,description:n.description,descriptionContentType:n.descriptionContentType,forceDisableHtml:t,backgroundColor:i.backgroundColor}),$e("div",{className:"multiple-choice-options",children:c.map(((e,t)=>{var i="choice-option",l=e,a=e;return n.hasOpenChoice&&t===n.choices.length-1&&(i+=" choice-option-open"),$e("div",{className:i,children:[$e("input",{type:h,id:"surveyQuestion".concat(o,"Choice").concat(t),name:"question".concat(o),value:l,disabled:!l,onInput:()=>n.hasOpenChoice&&t===n.choices.length-1?_(!p):n.type===r.SingleChoice?d(l):n.type===r.MultipleChoice&&xe(u)?u.includes(l)?d(u.filter((e=>e!==l))):d([...u,l]):void 0}),$e("label",{htmlFor:"surveyQuestion".concat(o,"Choice").concat(t),style:{color:"black"},children:n.hasOpenChoice&&t===n.choices.length-1?$e(x,{children:[$e("span",{children:[a,":"]}),$e("input",{type:"text",id:"surveyQuestion".concat(o,"Choice").concat(t,"Open"),name:"question".concat(o),onInput:e=>{var t=e.currentTarget.value;return n.type===r.SingleChoice?d(t):n.type===r.MultipleChoice&&xe(u)?v(t):void 0}})]}):a}),$e("span",{className:"choice-check",style:{color:"black"},children:nn})]})}))}),$e(on,{text:n.buttonText||"Submit",submitDisabled:(we(u)||xe(u)&&!p&&0===u.length||xe(u)&&p&&!f&&0===u.length&&!n.optional)&&!n.optional,appearance:i,onSubmit:()=>{p&&n.type===r.MultipleChoice?xe(u)&&l([...u,f]):l(u)},onPreviewSubmit:()=>{p&&n.type===r.MultipleChoice?xe(u)&&a([...u,f]):a(u)}})]})}var fn=[Ge,Ye,ze],vn=[Xe,Ge,Ye,ze,Je],hn=[1,2,3,4,5],gn=[1,2,3,4,5,6,7],mn=[0,1,2,3,4,5,6,7,8,9,10];function yn(e){switch(e){case 5:default:return hn;case 7:return gn;case 10:return mn}}var bn=qe("[Surveys]"),Cn=fe,xn=ge;class wn{constructor(e){var n=this;t(this,"canShowNextEventBasedSurvey",(()=>{var e,n=xn.querySelectorAll("div[class^=PostHogSurvey]");return!(n.length>0)||1===(null===(e=n[n.length-1].shadowRoot)||void 0===e?void 0:e.childElementCount)})),t(this,"handlePopoverSurvey",(e=>{var n,t=null===(n=e.conditions)||void 0===n?void 0:n.seenSurveyWaitPeriodInDays,o=localStorage.getItem("lastSeenSurveyDate");if(t&&o){var r=new Date,i=Math.abs(r.getTime()-new Date(o).getTime());if(Math.ceil(i/864e5)<t)return}var l=(e=>!!localStorage.getItem(Qe(e))&&!Oe(e))(e);if(!l){this.addSurveyToFocus(e.id);var a=((e,n,t)=>{var o=He.createElement("div");o.className="PostHogSurvey".concat(n);var r=o.attachShadow({mode:"open"});if(e){var i=Object.assign(He.createElement("style"),{innerText:e});r.appendChild(i)}return He.body.appendChild(o),r})(Me(null==e?void 0:e.appearance),e.id);O($e(Sn,{posthog:this.posthog,survey:e,removeSurveyFromFocus:this.removeSurveyFromFocus,isPopup:!0},"popover-survey"),a)}})),t(this,"handleWidget",(e=>{var n=function(e){var n,t=Te.createElement("div");t.className="PostHogWidget".concat(e.id);var o,r=t.attachShadow({mode:"open"}),i=(o=null===(n=e.appearance)||void 0===n?void 0:n.widgetColor,"\n .ph-survey-widget-tab {\n position: fixed;\n top: 50%;\n right: 0;\n background: ".concat(o||"#e0a045",";\n color: white;\n transform: rotate(-90deg) translate(0, -100%);\n transform-origin: right top;\n min-width: 40px;\n padding: 8px 12px;\n font-weight: 500;\n border-radius: 3px 3px 0 0;\n text-align: center;\n cursor: pointer;\n z-index: 9999999;\n }\n .ph-survey-widget-tab:hover {\n padding-bottom: 13px;\n }\n .ph-survey-widget-button {\n position: fixed;\n }\n "));return r.append(Object.assign(Te.createElement("style"),{innerText:i})),Te.body.appendChild(t),r}(e),t=Me(e.appearance);n.appendChild(Object.assign(xn.createElement("style"),{innerText:t})),O($e(Tn,{posthog:this.posthog,survey:e,removeSurveyFromFocus:this.removeSurveyFromFocus},"feedback-survey"),n)})),t(this,"handleWidgetSelector",(e=>{var n,t=(null===(n=e.appearance)||void 0===n?void 0:n.widgetSelector)&&xn.querySelector(e.appearance.widgetSelector);if(t)if(0===xn.querySelectorAll(".PostHogWidget".concat(e.id)).length)this.handleWidget(e);else if(1===xn.querySelectorAll(".PostHogWidget".concat(e.id)).length&&!t.getAttribute("PHWidgetSurveyClickListener")){var o,r,i=null===(o=xn.querySelector(".PostHogWidget".concat(e.id)))||void 0===o||null===(r=o.shadowRoot)||void 0===r?void 0:r.querySelector(".survey-form");t.addEventListener("click",(()=>{i&&(i.style.display="none"===i.style.display?"block":"none",i.addEventListener("PHSurveyClosed",(()=>{this.removeSurveyFromFocus(e.id),i.style.display="none"})))})),t.setAttribute("PHWidgetSurveyClickListener","true")}})),t(this,"canRenderSurvey",(e=>{var n={visible:!1};return e.end_date?(n.disabledReason="survey was completed on ".concat(e.end_date),n):e.type!=o.Popover?(n.disabledReason="Only Popover survey types can be rendered",n):!e.linked_flag_key||this.posthog.featureFlags.isFeatureEnabled(e.linked_flag_key)?!e.targeting_flag_key||this.posthog.featureFlags.isFeatureEnabled(e.targeting_flag_key)?!e.internal_targeting_flag_key||this.posthog.featureFlags.isFeatureEnabled(e.internal_targeting_flag_key)?(n.visible=!0,n):(n.disabledReason="internal targeting feature flag ".concat(e.internal_targeting_flag_key," is false"),n):(n.disabledReason="targeting feature flag ".concat(e.targeting_flag_key," is false"),n):(n.disabledReason="linked feature flag ".concat(e.linked_flag_key," is false"),n)})),t(this,"renderSurvey",((e,n)=>{O($e(Sn,{posthog:this.posthog,survey:e,removeSurveyFromFocus:this.removeSurveyFromFocus,isPopup:!1},"popover-survey"),n)})),t(this,"callSurveysAndEvaluateDisplayLogic",(function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];null===(e=n.posthog)||void 0===e||e.getActiveMatchingSurveys((e=>{var t=e.filter((e=>"api"!==e.type));n.sortSurveysByAppearanceDelay(t).forEach((e=>{if(we(n.surveyInFocus)){var t,r,i;if(e.type===o.Widget)"tab"===(null===(t=e.appearance)||void 0===t?void 0:t.widgetType)&&0===xn.querySelectorAll(".PostHogWidget".concat(e.id)).length&&n.handleWidget(e),"selector"===(null===(r=e.appearance)||void 0===r?void 0:r.widgetType)&&null!==(i=e.appearance)&&void 0!==i&&i.widgetSelector&&n.handleWidgetSelector(e);e.type===o.Popover&&n.canShowNextEventBasedSurvey()&&n.handlePopoverSurvey(e)}}))}),t)})),t(this,"addSurveyToFocus",(e=>{we(this.surveyInFocus)||bn.error("Survey ".concat([...this.surveyInFocus]," already in focus. Cannot add survey ").concat(e,".")),this.surveyInFocus=e})),t(this,"removeSurveyFromFocus",(e=>{this.surveyInFocus!==e&&bn.error("Survey ".concat(e," is not in focus. Cannot remove survey ").concat(e,".")),this.surveyInFocus=null})),this.posthog=e,this.surveyInFocus=null}sortSurveysByAppearanceDelay(e){return e.sort(((e,n)=>{var t,o;return((null===(t=e.appearance)||void 0===t?void 0:t.surveyPopupDelaySeconds)||0)-((null===(o=n.appearance)||void 0===o?void 0:o.surveyPopupDelaySeconds)||0)}))}getTestAPI(){return{addSurveyToFocus:this.addSurveyToFocus,removeSurveyFromFocus:this.removeSurveyFromFocus,surveyInFocus:this.surveyInFocus,canShowNextEventBasedSurvey:this.canShowNextEventBasedSurvey,handleWidget:this.handleWidget,handlePopoverSurvey:this.handlePopoverSurvey,handleWidgetSelector:this.handleWidgetSelector,sortSurveysByAppearanceDelay:this.sortSurveysByAppearanceDelay}}}function kn(e){if(xn&&Cn){var n=new wn(e);return n.callSurveysAndEvaluateDisplayLogic(!0),setInterval((()=>{n.callSurveysAndEvaluateDisplayLogic(!1)}),1e3),n}}function Sn(e){var t,o,r,i,l,a,{survey:s,forceDisableHtml:c,posthog:u,style:d,previewPageIndex:p,removeSurveyFromFocus:_,isPopup:f,onPreviewSubmit:v=(()=>{})}=e,h=Number.isInteger(p),g=null!==(t=s.appearance)&&void 0!==t&&t.surveyPopupDelaySeconds?1e3*s.appearance.surveyPopupDelaySeconds:0,{isPopupVisible:m,isSurveySent:y,setIsPopupVisible:b}=function(e,n,t,o,r){var[i,l]=te(o||0===t),[a,s]=te(!1);return oe((()=>{if(!o&&n){var i,a=()=>{r(e.id),l(!1)},c=()=>{var n,t;null!==(n=e.appearance)&&void 0!==n&&n.displayThankYouMessage?(s(!0),r(e.id),null!==(t=e.appearance)&&void 0!==t&&t.autoDisappear&&setTimeout((()=>{l(!1)}),5e3)):(r(e.id),l(!1))},u=()=>{var t;l(!0),Cn.dispatchEvent(new Event("PHSurveyShown")),n.capture("survey shown",{$survey_name:e.name,$survey_id:e.id,$survey_iteration:e.current_iteration,$survey_iteration_start_date:e.current_iteration_start_date,sessionRecordingUrl:null===(t=n.get_session_replay_url)||void 0===t?void 0:t.call(n)}),localStorage.setItem("lastSeenSurveyDate",(new Date).toISOString())};return Cn.addEventListener("PHSurveyClosed",a),Cn.addEventListener("PHSurveySent",c),t>0?(i=setTimeout((()=>{u()}),t),()=>{clearTimeout(i),Cn.removeEventListener("PHSurveyClosed",a),Cn.removeEventListener("PHSurveySent",c)}):(u(),()=>{Cn.removeEventListener("PHSurveyClosed",a),Cn.removeEventListener("PHSurveySent",c)})}}),[]),{isPopupVisible:i,isSurveySent:a,setIsPopupVisible:l}}(s,u,g,h,_),C=y||p===s.questions.length,w=null!==(o=d)&&void 0!==o&&o.left&&ke(null===(r=d)||void 0===r?void 0:r.left)?{left:d.left-40}:{};return h&&((d=d||{}).left="unset",d.right="unset",d.transform="unset"),m?$e(We.Provider,{value:{isPreviewMode:h,previewPageIndex:p,handleCloseSurveyPopup:()=>Ne(s,u,h),isPopup:f||!1,onPreviewSubmit:v},children:C?$e(an,{header:(null===(i=s.appearance)||void 0===i?void 0:i.thankYouMessageHeader)||"Thank you!",description:(null===(l=s.appearance)||void 0===l?void 0:l.thankYouMessageDescription)||"",forceDisableHtml:!!c,contentType:null===(a=s.appearance)||void 0===a?void 0:a.thankYouMessageDescriptionContentType,appearance:s.appearance||De,styleOverrides:n(n({},d),w),onClose:()=>b(!1)}):$e(qn,{survey:s,forceDisableHtml:!!c,posthog:u,styleOverrides:d})}):$e(x,{})}function qn(e){var t,o,{survey:r,forceDisableHtml:l,posthog:a,styleOverrides:s}=e,c=Ee((null===(t=r.appearance)||void 0===t?void 0:t.backgroundColor)||De.backgroundColor),[u,d]=te({}),{isPreviewMode:p,previewPageIndex:_,handleCloseSurveyPopup:f,isPopup:v,onPreviewSubmit:h}=le(We),[g,m]=te(_||0),y=ie((()=>Be(r)),[r]);oe((()=>{m(null!=_?_:0)}),[_]);return $e("form",{className:"survey-form",style:v?n({color:c,borderColor:null===(o=r.appearance)||void 0===o?void 0:o.borderColor},s):{},children:y.map(((e,t)=>{var o,{originalQuestionIndex:s}=e;return(p?g===s:g===t)&&$e("div",{className:"survey-box",style:v?{backgroundColor:(null===(o=r.appearance)||void 0===o?void 0:o.backgroundColor)||De.backgroundColor}:{},children:[v&&$e(ln,{onClick:()=>f()}),Pn({question:e,forceDisableHtml:l,displayQuestionIndex:t,appearance:r.appearance||De,onSubmit:e=>(e=>{var{res:t,originalQuestionIndex:o,displayQuestionIndex:l}=e;if(a){var s=0===o?"$survey_response":"$survey_response_".concat(o);if(d(n(n({},u),{},{[s]:t})),a.getNextSurveyStep){var c=a.getNextSurveyStep(r,l,t);c===i.End?Ze(n(n({},u),{},{[s]:t}),r,a):m(c)}else l===r.questions.length-1?Ze(n(n({},u),{},{[s]:t}),r,a):m(l+1)}})({res:e,originalQuestionIndex:s,displayQuestionIndex:t}),onPreviewSubmit:h})]})}))})}function Tn(e){var n,t,{survey:o,forceDisableHtml:r,posthog:i,readOnly:l,removeSurveyFromFocus:a}=e,[s,c]=te(!1),[u,d]=te({}),p=re(null);return oe((()=>{var e,n;if(!l&&i){if("tab"===(null===(e=o.appearance)||void 0===e?void 0:e.widgetType)&&p.current){var t,r=p.current.getBoundingClientRect(),a={top:"50%",left:parseInt("".concat(r.right-360)),bottom:"auto",borderRadius:10,borderBottom:"1.5px solid ".concat((null===(t=o.appearance)||void 0===t?void 0:t.borderColor)||"#c9c6c6")};d(a)}if("selector"===(null===(n=o.appearance)||void 0===n?void 0:n.widgetType)){var u=xn.querySelector(o.appearance.widgetSelector||"");null==u||u.addEventListener("click",(()=>{c(!s)})),null==u||u.setAttribute("PHWidgetSurveyClickListener","true")}}}),[]),$e(x,{children:["tab"===(null===(n=o.appearance)||void 0===n?void 0:n.widgetType)&&$e("div",{className:"ph-survey-widget-tab",ref:p,onClick:()=>!l&&c(!s),style:{color:Ee(o.appearance.widgetColor)},children:[$e("div",{className:"ph-survey-widget-tab-icon"}),(null===(t=o.appearance)||void 0===t?void 0:t.widgetLabel)||""]}),s&&$e(Sn,{posthog:i,survey:o,forceDisableHtml:r,style:u,removeSurveyFromFocus:a,isPopup:!0},"feedback-widget-survey")]})}var Pn=e=>{var{question:t,forceDisableHtml:o,displayQuestionIndex:i,appearance:l,onSubmit:a,onPreviewSubmit:s}=e,c={[r.Open]:cn,[r.Link]:un,[r.Rating]:dn,[r.SingleChoice]:_n,[r.MultipleChoice]:_n},u={question:t,forceDisableHtml:o,appearance:l,onPreviewSubmit:e=>{s(e)},onSubmit:e=>{a(e)}},d={[r.Open]:{},[r.Link]:{},[r.Rating]:{displayQuestionIndex:i},[r.SingleChoice]:{displayQuestionIndex:i},[r.MultipleChoice]:{displayQuestionIndex:i}},p=c[t.type],_=n(n({},u),d[t.type]);return $e(p,n({},_))};ye.__PosthogExtensions__=ye.__PosthogExtensions__||{},ye.__PosthogExtensions__.canActivateRepeatedly=Oe,ye.__PosthogExtensions__.generateSurveys=kn,ye.extendPostHogWithSurveys=kn}(); | ||
//# sourceMappingURL=surveys.js.map |
{ | ||
"name": "posthog-js", | ||
"version": "1.205.0", | ||
"version": "1.205.1", | ||
"description": "Posthog-js allows you to automatically capture usage and send events to PostHog.", | ||
@@ -13,4 +13,4 @@ "repository": "https://github.com/PostHog/posthog-js", | ||
"build-react": "cd react; NODE_ENV=dev pnpm i; pnpm build;", | ||
"lint": "eslint src && eslint cypress", | ||
"lint:fix": "eslint src --fix && eslint cypress --fix", | ||
"lint": "eslint src && eslint playwright", | ||
"lint:fix": "eslint src --fix && eslint playwright --fix", | ||
"prettier": "prettier --write src/ functional_tests/", | ||
@@ -26,3 +26,4 @@ "prepublishOnly": "pnpm lint && pnpm build && pnpm test && pnpm test:react", | ||
"typecheck": "tsc --noEmit --project tsconfig.json", | ||
"cypress": "cypress open", | ||
"playwright": "pnpm exec playwright test --project webkit --project firefox --project chromium", | ||
"playwright-ui": "pnpm exec playwright test --ui --project webkit --project firefox --project chromium", | ||
"prepare": "husky install", | ||
@@ -56,3 +57,2 @@ "deprecate-old-versions": "node scripts/deprecate-old-versions.mjs", | ||
"@babel/preset-typescript": "^7.18.6", | ||
"@cypress/skip-test": "^2.6.1", | ||
"@jest/globals": "^27.5.1", | ||
@@ -84,4 +84,2 @@ "@playwright/test": "^1.49.1", | ||
"compare-versions": "^6.1.0", | ||
"cypress": "13.6.3", | ||
"cypress-localstorage-commands": "^2.2.6", | ||
"date-fns": "^3.6.0", | ||
@@ -127,3 +125,2 @@ "eslint": "8.57.0", | ||
"eslint src --fix", | ||
"eslint cypress --fix", | ||
"eslint playwright --fix" | ||
@@ -130,0 +127,0 @@ ] |
@@ -24,3 +24,3 @@ var __assign = (this && this.__assign) || function () { | ||
}; | ||
return "\n .survey-form, .thank-you-message {\n position: fixed;\n margin: 0px;\n bottom: 0px;\n color: black;\n font-weight: normal;\n font-family: -apple-system, BlinkMacSystemFont, \"Inter\", \"Segoe UI\", \"Roboto\", Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";\n text-align: left;\n max-width: ".concat(parseInt((appearance === null || appearance === void 0 ? void 0 : appearance.maxWidth) || '300'), "px;\n width: 100%;\n z-index: ").concat(parseInt((appearance === null || appearance === void 0 ? void 0 : appearance.zIndex) || '99999'), ";\n border: 1.5px solid ").concat((appearance === null || appearance === void 0 ? void 0 : appearance.borderColor) || '#c9c6c6', ";\n border-bottom: 0px;\n ").concat(positions[(appearance === null || appearance === void 0 ? void 0 : appearance.position) || 'right'] || 'right: 30px;', "\n flex-direction: column;\n background: ").concat((appearance === null || appearance === void 0 ? void 0 : appearance.backgroundColor) || '#eeeded', ";\n border-top-left-radius: 10px;\n border-top-right-radius: 10px;\n box-shadow: -6px 0 16px -8px rgb(0 0 0 / 8%), -9px 0 28px 0 rgb(0 0 0 / 5%), -12px 0 48px 16px rgb(0 0 0 / 3%);\n }\n\n .survey-box, .thank-you-message-container {\n padding: 20px 25px 10px;\n display: flex;\n flex-direction: column;\n border-radius: 10px;\n }\n\n .thank-you-message {\n text-align: center;\n }\n\n .form-submit[disabled] {\n opacity: 0.6;\n filter: grayscale(50%);\n cursor: not-allowed;\n }\n .survey-form textarea {\n color: #2d2d2d;\n font-size: 14px;\n font-family: -apple-system, BlinkMacSystemFont, \"Inter\", \"Segoe UI\", \"Roboto\", Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";\n background: white;\n color: black;\n outline: none;\n padding-left: 10px;\n padding-right: 10px;\n padding-top: 10px;\n border-radius: 6px;\n border-color: ").concat((appearance === null || appearance === void 0 ? void 0 : appearance.borderColor) || '#c9c6c6', ";\n margin-top: 14px;\n width: 100%;\n box-sizing: border-box;\n }\n .survey-box:has(.survey-question:empty):not(:has(.survey-question-description)) textarea {\n margin-top: 0;\n }\n .form-submit {\n box-sizing: border-box;\n margin: 0;\n font-family: inherit;\n overflow: visible;\n text-transform: none;\n position: relative;\n display: inline-block;\n font-weight: 700;\n white-space: nowrap;\n text-align: center;\n border: 1.5px solid transparent;\n cursor: pointer;\n user-select: none;\n touch-action: manipulation;\n padding: 12px;\n font-size: 14px;\n border-radius: 6px;\n outline: 0;\n background: ").concat((appearance === null || appearance === void 0 ? void 0 : appearance.submitButtonColor) || 'black', " !important;\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.12);\n box-shadow: 0 2px 0 rgba(0, 0, 0, 0.045);\n width: 100%;\n }\n .form-cancel {\n display: flex;\n float: right;\n border: none;\n background: none;\n cursor: pointer;\n }\n .cancel-btn-wrapper {\n position: absolute;\n width: 35px;\n height: 35px;\n border-radius: 100%;\n top: 0;\n right: 0;\n transform: translate(50%, -50%);\n background: white;\n border: 1.5px solid ").concat((appearance === null || appearance === void 0 ? void 0 : appearance.borderColor) || '#c9c6c6', ";\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .bolded { font-weight: 600; }\n .buttons {\n display: flex;\n justify-content: center;\n }\n .footer-branding {\n font-size: 11px;\n margin-top: 10px;\n text-align: center;\n display: flex;\n justify-content: center;\n gap: 4px;\n align-items: center;\n font-weight: 500;\n background: ").concat((appearance === null || appearance === void 0 ? void 0 : appearance.backgroundColor) || '#eeeded', ";\n text-decoration: none;\n backgroundColor: ").concat((appearance === null || appearance === void 0 ? void 0 : appearance.backgroundColor) || '#eeeded', ";\n color: ").concat(getContrastingTextColor((appearance === null || appearance === void 0 ? void 0 : appearance.backgroundColor) || '#eeeded'), ";\n }\n .survey-question {\n font-weight: 500;\n font-size: 14px;\n background: ").concat((appearance === null || appearance === void 0 ? void 0 : appearance.backgroundColor) || '#eeeded', ";\n }\n .question-textarea-wrapper {\n display: flex;\n flex-direction: column;\n }\n .survey-question-description {\n font-size: 13px;\n padding-top: 5px;\n background: ").concat((appearance === null || appearance === void 0 ? void 0 : appearance.backgroundColor) || '#eeeded', ";\n }\n .ratings-number {\n font-size: 16px;\n font-weight: 600;\n padding: 8px 0px;\n border: none;\n }\n .ratings-number:hover {\n cursor: pointer;\n }\n .rating-options {\n margin-top: 14px;\n }\n .rating-options-number {\n display: grid;\n border-radius: 6px;\n overflow: hidden;\n border: 1.5px solid ").concat((appearance === null || appearance === void 0 ? void 0 : appearance.borderColor) || '#c9c6c6', ";\n }\n .rating-options-number > .ratings-number {\n border-right: 1px solid ").concat((appearance === null || appearance === void 0 ? void 0 : appearance.borderColor) || '#c9c6c6', ";\n }\n .rating-options-number > .ratings-number:last-of-type {\n border-right: 0px;\n }\n .rating-options-number .rating-active {\n background: ").concat((appearance === null || appearance === void 0 ? void 0 : appearance.ratingButtonActiveColor) || 'black', ";\n }\n .rating-options-emoji {\n display: flex;\n justify-content: space-between;\n }\n .ratings-emoji {\n font-size: 16px;\n background-color: transparent;\n border: none;\n padding: 0px;\n }\n .ratings-emoji:hover {\n cursor: pointer;\n }\n .ratings-emoji.rating-active svg {\n fill: ").concat((appearance === null || appearance === void 0 ? void 0 : appearance.ratingButtonActiveColor) || 'black', ";\n }\n .emoji-svg {\n fill: '#939393';\n }\n .rating-text {\n display: flex;\n flex-direction: row;\n font-size: 11px;\n justify-content: space-between;\n margin-top: 6px;\n background: ").concat((appearance === null || appearance === void 0 ? void 0 : appearance.backgroundColor) || '#eeeded', ";\n opacity: .60;\n }\n .multiple-choice-options {\n margin-top: 13px;\n font-size: 14px;\n }\n .survey-box:has(.survey-question:empty):not(:has(.survey-question-description)) .multiple-choice-options {\n margin-top: 0;\n }\n .multiple-choice-options .choice-option {\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 13px;\n cursor: pointer;\n margin-bottom: 5px;\n position: relative;\n }\n .multiple-choice-options > .choice-option:last-of-type {\n margin-bottom: 0px;\n }\n .multiple-choice-options input {\n cursor: pointer;\n position: absolute;\n opacity: 0;\n }\n .choice-check {\n position: absolute;\n right: 10px;\n background: white;\n }\n .choice-check svg {\n display: none;\n }\n .multiple-choice-options .choice-option:hover .choice-check svg {\n display: inline-block;\n opacity: .25;\n }\n .multiple-choice-options input:checked + label + .choice-check svg {\n display: inline-block;\n opacity: 100% !important;\n }\n .multiple-choice-options input:checked + label {\n font-weight: bold;\n border: 1.5px solid rgba(0,0,0);\n }\n .multiple-choice-options input:checked + label input {\n font-weight: bold;\n }\n .multiple-choice-options label {\n width: 100%;\n cursor: pointer;\n padding: 10px;\n border: 1.5px solid rgba(0,0,0,.25);\n border-radius: 4px;\n background: white;\n }\n .multiple-choice-options .choice-option-open label {\n padding-right: 30px;\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n max-width: 100%;\n }\n .multiple-choice-options .choice-option-open label span {\n width: 100%;\n }\n .multiple-choice-options .choice-option-open input:disabled + label {\n opacity: 0.6;\n }\n .multiple-choice-options .choice-option-open label input {\n position: relative;\n opacity: 1;\n flex-grow: 1;\n border: 0;\n outline: 0;\n }\n .thank-you-message-body {\n margin-top: 6px;\n font-size: 14px;\n background: ").concat((appearance === null || appearance === void 0 ? void 0 : appearance.backgroundColor) || '#eeeded', ";\n }\n .thank-you-message-header {\n margin: 10px 0px 0px;\n background: ").concat((appearance === null || appearance === void 0 ? void 0 : appearance.backgroundColor) || '#eeeded', ";\n }\n .thank-you-message-container .form-submit {\n margin-top: 20px;\n margin-bottom: 10px;\n }\n .thank-you-message-countdown {\n margin-left: 6px;\n }\n .bottom-section {\n margin-top: 14px;\n }\n "); | ||
return "\n .survey-form, .thank-you-message {\n position: fixed;\n margin: 0px;\n bottom: 0px;\n color: black;\n font-weight: normal;\n font-family: ".concat((appearance === null || appearance === void 0 ? void 0 : appearance.fontFamily) || '-apple-system', ", BlinkMacSystemFont, \"Inter\", \"Segoe UI\", \"Roboto\", Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";\n text-align: left;\n max-width: ").concat(parseInt((appearance === null || appearance === void 0 ? void 0 : appearance.maxWidth) || '300'), "px;\n width: 100%;\n z-index: ").concat(parseInt((appearance === null || appearance === void 0 ? void 0 : appearance.zIndex) || '99999'), ";\n border: 1.5px solid ").concat((appearance === null || appearance === void 0 ? void 0 : appearance.borderColor) || '#c9c6c6', ";\n border-bottom: 0px;\n ").concat(positions[(appearance === null || appearance === void 0 ? void 0 : appearance.position) || 'right'] || 'right: 30px;', "\n flex-direction: column;\n background: ").concat((appearance === null || appearance === void 0 ? void 0 : appearance.backgroundColor) || '#eeeded', ";\n border-top-left-radius: 10px;\n border-top-right-radius: 10px;\n box-shadow: -6px 0 16px -8px rgb(0 0 0 / 8%), -9px 0 28px 0 rgb(0 0 0 / 5%), -12px 0 48px 16px rgb(0 0 0 / 3%);\n }\n\n .survey-box, .thank-you-message-container {\n padding: 20px 25px 10px;\n display: flex;\n flex-direction: column;\n border-radius: 10px;\n }\n\n .thank-you-message {\n text-align: center;\n }\n\n .form-submit[disabled] {\n opacity: 0.6;\n filter: grayscale(50%);\n cursor: not-allowed;\n }\n .survey-form textarea {\n color: #2d2d2d;\n font-size: 14px;\n font-family: ").concat((appearance === null || appearance === void 0 ? void 0 : appearance.fontFamily) || '-apple-system', ", BlinkMacSystemFont, \"Inter\", \"Segoe UI\", \"Roboto\", Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";\n background: white;\n color: black;\n outline: none;\n padding-left: 10px;\n padding-right: 10px;\n padding-top: 10px;\n border-radius: 6px;\n border-color: ").concat((appearance === null || appearance === void 0 ? void 0 : appearance.borderColor) || '#c9c6c6', ";\n margin-top: 14px;\n width: 100%;\n box-sizing: border-box;\n }\n .survey-box:has(.survey-question:empty):not(:has(.survey-question-description)) textarea {\n margin-top: 0;\n }\n .form-submit {\n box-sizing: border-box;\n margin: 0;\n font-family: inherit;\n overflow: visible;\n text-transform: none;\n position: relative;\n display: inline-block;\n font-weight: 700;\n white-space: nowrap;\n text-align: center;\n border: 1.5px solid transparent;\n cursor: pointer;\n user-select: none;\n touch-action: manipulation;\n padding: 12px;\n font-size: 14px;\n border-radius: 6px;\n outline: 0;\n background: ").concat((appearance === null || appearance === void 0 ? void 0 : appearance.submitButtonColor) || 'black', " !important;\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.12);\n box-shadow: 0 2px 0 rgba(0, 0, 0, 0.045);\n width: 100%;\n }\n .form-cancel {\n display: flex;\n float: right;\n border: none;\n background: none;\n cursor: pointer;\n }\n .cancel-btn-wrapper {\n position: absolute;\n width: 35px;\n height: 35px;\n border-radius: 100%;\n top: 0;\n right: 0;\n transform: translate(50%, -50%);\n background: white;\n border: 1.5px solid ").concat((appearance === null || appearance === void 0 ? void 0 : appearance.borderColor) || '#c9c6c6', ";\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .bolded { font-weight: 600; }\n .buttons {\n display: flex;\n justify-content: center;\n }\n .footer-branding {\n font-size: 11px;\n margin-top: 10px;\n text-align: center;\n display: flex;\n justify-content: center;\n gap: 4px;\n align-items: center;\n font-weight: 500;\n background: ").concat((appearance === null || appearance === void 0 ? void 0 : appearance.backgroundColor) || '#eeeded', ";\n text-decoration: none;\n backgroundColor: ").concat((appearance === null || appearance === void 0 ? void 0 : appearance.backgroundColor) || '#eeeded', ";\n color: ").concat(getContrastingTextColor((appearance === null || appearance === void 0 ? void 0 : appearance.backgroundColor) || '#eeeded'), ";\n }\n .survey-question {\n font-weight: 500;\n font-size: 14px;\n background: ").concat((appearance === null || appearance === void 0 ? void 0 : appearance.backgroundColor) || '#eeeded', ";\n }\n .question-textarea-wrapper {\n display: flex;\n flex-direction: column;\n }\n .survey-question-description {\n font-size: 13px;\n padding-top: 5px;\n background: ").concat((appearance === null || appearance === void 0 ? void 0 : appearance.backgroundColor) || '#eeeded', ";\n }\n .ratings-number {\n font-size: 16px;\n font-weight: 600;\n padding: 8px 0px;\n border: none;\n }\n .ratings-number:hover {\n cursor: pointer;\n }\n .rating-options {\n margin-top: 14px;\n }\n .rating-options-number {\n display: grid;\n border-radius: 6px;\n overflow: hidden;\n border: 1.5px solid ").concat((appearance === null || appearance === void 0 ? void 0 : appearance.borderColor) || '#c9c6c6', ";\n }\n .rating-options-number > .ratings-number {\n border-right: 1px solid ").concat((appearance === null || appearance === void 0 ? void 0 : appearance.borderColor) || '#c9c6c6', ";\n }\n .rating-options-number > .ratings-number:last-of-type {\n border-right: 0px;\n }\n .rating-options-number .rating-active {\n background: ").concat((appearance === null || appearance === void 0 ? void 0 : appearance.ratingButtonActiveColor) || 'black', ";\n }\n .rating-options-emoji {\n display: flex;\n justify-content: space-between;\n }\n .ratings-emoji {\n font-size: 16px;\n background-color: transparent;\n border: none;\n padding: 0px;\n }\n .ratings-emoji:hover {\n cursor: pointer;\n }\n .ratings-emoji.rating-active svg {\n fill: ").concat((appearance === null || appearance === void 0 ? void 0 : appearance.ratingButtonActiveColor) || 'black', ";\n }\n .emoji-svg {\n fill: '#939393';\n }\n .rating-text {\n display: flex;\n flex-direction: row;\n font-size: 11px;\n justify-content: space-between;\n margin-top: 6px;\n background: ").concat((appearance === null || appearance === void 0 ? void 0 : appearance.backgroundColor) || '#eeeded', ";\n opacity: .60;\n }\n .multiple-choice-options {\n margin-top: 13px;\n font-size: 14px;\n }\n .survey-box:has(.survey-question:empty):not(:has(.survey-question-description)) .multiple-choice-options {\n margin-top: 0;\n }\n .multiple-choice-options .choice-option {\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 13px;\n cursor: pointer;\n margin-bottom: 5px;\n position: relative;\n }\n .multiple-choice-options > .choice-option:last-of-type {\n margin-bottom: 0px;\n }\n .multiple-choice-options input {\n cursor: pointer;\n position: absolute;\n opacity: 0;\n }\n .choice-check {\n position: absolute;\n right: 10px;\n background: white;\n }\n .choice-check svg {\n display: none;\n }\n .multiple-choice-options .choice-option:hover .choice-check svg {\n display: inline-block;\n opacity: .25;\n }\n .multiple-choice-options input:checked + label + .choice-check svg {\n display: inline-block;\n opacity: 100% !important;\n }\n .multiple-choice-options input:checked + label {\n font-weight: bold;\n border: 1.5px solid rgba(0,0,0);\n }\n .multiple-choice-options input:checked + label input {\n font-weight: bold;\n }\n .multiple-choice-options label {\n width: 100%;\n cursor: pointer;\n padding: 10px;\n border: 1.5px solid rgba(0,0,0,.25);\n border-radius: 4px;\n background: white;\n }\n .multiple-choice-options .choice-option-open label {\n padding-right: 30px;\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n max-width: 100%;\n }\n .multiple-choice-options .choice-option-open label span {\n width: 100%;\n }\n .multiple-choice-options .choice-option-open input:disabled + label {\n opacity: 0.6;\n }\n .multiple-choice-options .choice-option-open label input {\n position: relative;\n opacity: 1;\n flex-grow: 1;\n border: 0;\n outline: 0;\n }\n .thank-you-message-body {\n margin-top: 6px;\n font-size: 14px;\n background: ").concat((appearance === null || appearance === void 0 ? void 0 : appearance.backgroundColor) || '#eeeded', ";\n }\n .thank-you-message-header {\n margin: 10px 0px 0px;\n background: ").concat((appearance === null || appearance === void 0 ? void 0 : appearance.backgroundColor) || '#eeeded', ";\n }\n .thank-you-message-container .form-submit {\n margin-top: 20px;\n margin-bottom: 10px;\n }\n .thank-you-message-countdown {\n margin-left: 6px;\n }\n .bottom-section {\n margin-top: 14px;\n }\n "); | ||
}; | ||
@@ -27,0 +27,0 @@ function nameToHex(name) { |
@@ -32,2 +32,3 @@ /** | ||
widgetColor?: string; | ||
fontFamily?: string; | ||
maxWidth?: string; | ||
@@ -34,0 +35,0 @@ zIndex?: string; |
@@ -6,2 +6,3 @@ export var DEFAULT_BLOCKED_UA_STRS = [ | ||
'baiduspider', | ||
'better uptime bot', | ||
'bingbot', | ||
@@ -8,0 +9,0 @@ 'bingpreview', |
{ | ||
"name": "posthog-js", | ||
"version": "1.205.0", | ||
"version": "1.205.1", | ||
"description": "Posthog-js allows you to automatically capture usage and send events to PostHog.", | ||
@@ -13,4 +13,4 @@ "repository": "https://github.com/PostHog/posthog-js", | ||
"build-react": "cd react; NODE_ENV=dev pnpm i; pnpm build;", | ||
"lint": "eslint src && eslint cypress", | ||
"lint:fix": "eslint src --fix && eslint cypress --fix", | ||
"lint": "eslint src && eslint playwright", | ||
"lint:fix": "eslint src --fix && eslint playwright --fix", | ||
"prettier": "prettier --write src/ functional_tests/", | ||
@@ -26,3 +26,4 @@ "prepublishOnly": "pnpm lint && pnpm build && pnpm test && pnpm test:react", | ||
"typecheck": "tsc --noEmit --project tsconfig.json", | ||
"cypress": "cypress open", | ||
"playwright": "pnpm exec playwright test --project webkit --project firefox --project chromium", | ||
"playwright-ui": "pnpm exec playwright test --ui --project webkit --project firefox --project chromium", | ||
"prepare": "husky install", | ||
@@ -56,3 +57,2 @@ "deprecate-old-versions": "node scripts/deprecate-old-versions.mjs", | ||
"@babel/preset-typescript": "^7.18.6", | ||
"@cypress/skip-test": "^2.6.1", | ||
"@jest/globals": "^27.5.1", | ||
@@ -84,4 +84,2 @@ "@playwright/test": "^1.49.1", | ||
"compare-versions": "^6.1.0", | ||
"cypress": "13.6.3", | ||
"cypress-localstorage-commands": "^2.2.6", | ||
"date-fns": "^3.6.0", | ||
@@ -127,3 +125,2 @@ "eslint": "8.57.0", | ||
"eslint src --fix", | ||
"eslint cypress --fix", | ||
"eslint playwright --fix" | ||
@@ -130,0 +127,0 @@ ] |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19394445
67
43712
3
301
17
50