1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5041,4792,4661],{43781:function(e){e.exports={prettyPrint:function(e,t){var n,r,i,o,a,s;for(r=(t=t||{}).indent_size||4,i=t.indent_char||" ",a=t.brace_style||"collapse",o=0==t.max_char?1/0:t.max_char||70,s=t.unformatted||["a","span","bdo","em","strong","dfn","code","samp","kbd","var","cite","abbr","acronym","q","sub","sup","tt","i","b","big","small","u","s","strike","font","ins","del","pre","address","dt","h1","h2","h3","h4","h5","h6"],(n=new function(){return this.pos=0,this.token="",this.current_mode="CONTENT",this.tags={parent:"parent1",parentcount:1,parent1:""},this.tag_type="",this.token_text=this.last_token=this.last_text=this.token_type="",this.Utils={whitespace:"\n\r ".split(""),single_token:"br,input,link,meta,!doctype,basefont,base,area,hr,wbr,param,img,isindex,?xml,embed,?php,?,?=".split(","),extra_liners:"head,body,/html".split(","),in_array:function(e,t){for(var n=0;n<t.length;n++)if(e===t[n])return!0;return!1}},this.get_content=function(){for(var e="",t=[],n=!1;"<"!==this.input.charAt(this.pos);){if(this.pos>=this.input.length)return t.length?t.join(""):["","TK_EOF"];if(e=this.input.charAt(this.pos),this.pos++,this.line_char_count++,this.Utils.in_array(e,this.Utils.whitespace)){t.length&&(n=!0),this.line_char_count--;continue}if(n){if(this.line_char_count>=this.max_char){t.push("\n");for(var r=0;r<this.indent_level;r++)t.push(this.indent_string);this.line_char_count=0}else t.push(" "),this.line_char_count++;n=!1}t.push(e)}return t.length?t.join(""):""},this.get_contents_to=function(e){if(this.pos==this.input.length)return["","TK_EOF"];var t="",n=RegExp("</"+e+"\\s*>","igm");n.lastIndex=this.pos;var r=n.exec(this.input),i=r?r.index:this.input.length;return this.pos<i&&(t=this.input.substring(this.pos,i),this.pos=i),t},this.record_tag=function(e){this.tags[e+"count"]?this.tags[e+"count"]++:this.tags[e+"count"]=1,this.tags[e+this.tags[e+"count"]]=this.indent_level,this.tags[e+this.tags[e+"count"]+"parent"]=this.tags.parent,this.tags.parent=e+this.tags[e+"count"]},this.retrieve_tag=function(e){if(this.tags[e+"count"]){for(var t=this.tags.parent;t&&e+this.tags[e+"count"]!==t;)t=this.tags[t+"parent"];t&&(this.indent_level=this.tags[e+this.tags[e+"count"]],this.tags.parent=this.tags[t+"parent"]),delete this.tags[e+this.tags[e+"count"]+"parent"],delete this.tags[e+this.tags[e+"count"]],1==this.tags[e+"count"]?delete this.tags[e+"count"]:this.tags[e+"count"]--}},this.get_tag=function(){var e,t,n,r="",i=[],o=!1;do{if(this.pos>=this.input.length)return i.length?i.join(""):["","TK_EOF"];if(r=this.input.charAt(this.pos),this.pos++,this.line_char_count++,this.Utils.in_array(r,this.Utils.whitespace)){o=!0,this.line_char_count--;continue}"'"!==r&&'"'!==r||i[1]&&"!"===i[1]||(r+=this.get_unformatted(r),o=!0),"="===r&&(o=!1),i.length&&"="!==i[i.length-1]&&">"!==r&&o&&(this.line_char_count>=this.max_char?(this.print_newline(!1,i),this.line_char_count=0):(i.push(" "),this.line_char_count++),o=!1),"<"===r&&(t=this.pos-1),i.push(r)}while(">"!==r);var a=i.join("");e=-1!=a.indexOf(" ")?a.indexOf(" "):a.indexOf(">");var l=a.substring(1,e).toLowerCase();if("/"===a.charAt(a.length-2)||this.Utils.in_array(l,this.Utils.single_token))this.tag_type="SINGLE";else if("script"===l)this.record_tag(l),this.tag_type="SCRIPT";else if("style"===l)this.record_tag(l),this.tag_type="STYLE";else if(this.Utils.in_array(l,s)){var c=this.get_unformatted("</"+l+">",a);i.push(c),t>0&&this.Utils.in_array(this.input.charAt(t-1),this.Utils.whitespace)&&i.splice(0,0,this.input.charAt(t-1)),n=this.pos-1,this.Utils.in_array(this.input.charAt(n+1),this.Utils.whitespace)&&i.push(this.input.charAt(n+1)),this.tag_type="SINGLE"}else if("!"===l.charAt(0)){if(-1!=l.indexOf("[if")){if(-1!=a.indexOf("!IE")){var c=this.get_unformatted("-->",a);i.push(c)}this.tag_type="START"}else if(-1!=l.indexOf("[endif"))this.tag_type="END",this.unindent();else if(-1!=l.indexOf("[cdata[")){var c=this.get_unformatted("]]>",a);i.push(c),this.tag_type="SINGLE"}else{var c=this.get_unformatted("-->",a);i.push(c),this.tag_type="SINGLE"}}else"/"===l.charAt(0)?(this.retrieve_tag(l.substring(1)),this.tag_type="END"):(this.record_tag(l),this.tag_type="START"),this.Utils.in_array(l,this.Utils.extra_liners)&&this.print_newline(!0,this.output);return i.join("")},this.get_unformatted=function(e,t){if(t&&-1!=t.toLowerCase().indexOf(e))return"";var n="",r="",i=!0;do{if(this.pos>=this.input.length)break;if(n=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(n,this.Utils.whitespace)){if(!i){this.line_char_count--;continue}if("\n"===n||"\r"===n){r+="\n",this.line_char_count=0;continue}}r+=n,this.line_char_count++,i=!0}while(-1==r.toLowerCase().indexOf(e));return r},this.get_token=function(){var e;if("TK_TAG_SCRIPT"===this.last_token||"TK_TAG_STYLE"===this.last_token){var t=this.last_token.substr(7);return"string"!=typeof(e=this.get_contents_to(t))?e:[e,"TK_"+t]}return"CONTENT"===this.current_mode?"string"!=typeof(e=this.get_content())?e:[e,"TK_CONTENT"]:"TAG"===this.current_mode?"string"!=typeof(e=this.get_tag())?e:[e,"TK_TAG_"+this.tag_type]:void 0},this.get_full_indent=function(e){return(e=this.indent_level+e||0)<1?"":Array(e+1).join(this.indent_string)},this.printer=function(e,t,n,r,i){this.input=e||"",this.output=[],this.indent_character=t,this.indent_string="",this.indent_size=n,this.brace_style=i,this.indent_level=0,this.max_char=r,this.line_char_count=0;for(var o=0;o<this.indent_size;o++)this.indent_string+=this.indent_character;this.print_newline=function(e,t){if(this.line_char_count=0,t&&t.length){if(!e)for(;this.Utils.in_array(t[t.length-1],this.Utils.whitespace);)t.pop();t.push("\n");for(var n=0;n<this.indent_level;n++)t.push(this.indent_string)}},this.print_token=function(e){this.output.push(e)},this.indent=function(){this.indent_level++},this.unindent=function(){this.indent_level>0&&this.indent_level--}},this}).printer(e,i,r,o,a);;){var l=n.get_token();if(n.token_text=l[0],n.token_type=l[1],"TK_EOF"===n.token_type)break;switch(n.token_type){case"TK_TAG_START":n.print_newline(!1,n.output),n.print_token(n.token_text),n.indent(),n.current_mode="CONTENT";break;case"TK_TAG_STYLE":case"TK_TAG_SCRIPT":n.print_newline(!1,n.output),n.print_token(n.token_text),n.current_mode="CONTENT";break;case"TK_TAG_END":if("TK_CONTENT"===n.last_token&&""===n.last_text){var c=n.token_text.match(/\w+/)[0],d=n.output[n.output.length-1].match(/<\s*(\w+)/);(null===d||d[1]!==c)&&n.print_newline(!0,n.output)}n.print_token(n.token_text),n.current_mode="CONTENT";break;case"TK_TAG_SINGLE":var u=n.token_text.match(/^\s*<([a-z]+)/i);u&&n.Utils.in_array(u[1],s)||n.print_newline(!1,n.output),n.print_token(n.token_text),n.current_mode="CONTENT";break;case"TK_CONTENT":""!==n.token_text&&n.print_token(n.token_text),n.current_mode="TAG";break;case"TK_STYLE":case"TK_SCRIPT":if(""!==n.token_text){n.output.push("\n");var h=n.token_text;if("TK_SCRIPT"==n.token_type)var p="function"==typeof js_beautify&&js_beautify;else if("TK_STYLE"==n.token_type)var p="function"==typeof css_beautify&&css_beautify;if("keep"==t.indent_scripts)var g=0;else if("separate"==t.indent_scripts)var g=-n.indent_level;else var g=1;var m=n.get_full_indent(g);if(p)h=p(h.replace(/^\s*/,m),t);else{var f=h.match(/^\s*/)[0].match(/[^\n\r]*$/)[0].split(n.indent_string).length-1,x=n.get_full_indent(g-f);h=h.replace(/^\s*/,m).replace(/\r\n|\r|\n/g,"\n"+x).replace(/\s*$/,"")}h&&(n.print_token(h),n.print_newline(!0,n.output))}n.current_mode="TAG"}n.last_token=n.token_type,n.last_text=n.token_text}return n.output.join("")}}},36027:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/create/paste",function(){return n(99450)}])},71537:function(e,t,n){"use strict";n.d(t,{z:function(){return eh}});var r=n(52322);n(98248),n(61219);var i=n(55671),o=n(62202),a=n(18200),s=n(81674),l=n(94523),c=n(97729),d=n.n(c),u=n(5632),h=n(2784),p=n(43997),g=n(14274),m=n(93202),f=n(2013);let x=e=>{let t=["malformed","encoded","illegal"];return e.includes("URIError")&&e.split(" ").some(e=>t.includes(e))};class b extends h.Component{componentDidMount(){window.addEventListener("error",this.handleError),window.addEventListener("unhandledrejection",this.handleUnhandledRejection)}componentWillUnmount(){window.removeEventListener("error",this.handleError),window.removeEventListener("unhandledrejection",this.handleUnhandledRejection)}componentDidCatch(e,t){if("dev"===g.v.APPLICATION_ENVIRONMENT)throw e}static getDerivedStateFromError(e){return{hasError:!0,errMessage:e.message,shouldMountChildren:!1}}handleError(e){if("dev"===g.v.APPLICATION_ENVIRONMENT)throw Error("[ErrorBoundary]: ".concat(e.message))}handleUnhandledRejection(e){let t=this.props.unhandledRejectionFilter(e);if(t){var n;let t=(null===(n=e.reason)||void 0===n?void 0:n.message)||"";this.setState({hasError:!0,errMessage:t})}}render(){let e=!0===x(this.state.errMessage)?{opacity:"0.65",starOverlay:!1}:{};return(0,r.jsxs)(r.Fragment,{children:[this.state.hasError&&(0,r.jsx)(f.q,{pos:"absolute",top:0,...e,errMessage:""===this.state.errMessage?void 0:this.state.errMessage,showDisclosure:!0}),this.state.shouldMountChildren&&this.props.children]})}constructor(e){super(e),this.state={hasError:!1,errMessage:"",shouldMountChildren:!0},this.handleError=this.handleError.bind(this),this.handleUnhandledRejection=this.handleUnhandledRejection.bind(this)}}b.defaultProps={unhandledRejectionFilter:e=>{var t;return!!x((null===(t=e.reason)||void 0===t?void 0:t.message)||"")||e.reason instanceof m.YBv&&!1===document.hidden||e.reason instanceof m.R5s}},n(61036),n(62376),n(6991),n(76298),n(4466),n(43839),n(40917);var v=n(11050),_=n(42005);let j=()=>{let e=(0,h.useRef)(!1),t=(0,h.useRef)(new Map);(0,h.useEffect)(()=>
1{if("production"!==g.v.APPLICATION_ENVIRONMENT)return;let n=()=>{if(e.current)return;let n=t.current.get("total"),r=t.current.get("notTrusted"),i=r/n>.5;i&&n>5&&(e.current=!0,_.c.track(v.xW.NOT_TRUSTED_EVENTS_DETECTED,{totalEvents:n,notTrustedEvents:r}))},r=e=>{e.isTrusted||t.current.set("notTrusted",(t.current.get("notTrusted")||0)+1),t.current.set("total",(t.current.get("total")||0)+1),n()};return document.addEventListener("paste",r,{capture:!0}),document.addEventListener("mousedown",r,{capture:!0}),document.addEventListener("keydown",r,{capture:!0}),()=>{document.removeEventListener("paste",r,{capture:!0}),document.removeEventListener("mousedown",r,{capture:!0}),document.removeEventListener("keydown",r,{capture:!0})}},[])};var C=n(79254),y=n(27354),w=n(42111),k=n(32019),E=n(99092),I=n(36651);let S=(e,t)=>{E.H.init(g.v.HIGHLIGHT_PROJECT_ID,{environment:g.v.APPLICATION_ENVIRONMENT,sessionShortcut:!!t&&"shift+command+0",enableStrictPrivacy:e,enableSegmentIntegration:!0,networkRecording:{enabled:!0,recordHeadersAndBody:!0}}),v.co.loadSdkPromise.then(e=>{e&&e.addSourceMiddleware(E.LZ)})},A=e=>{let{children:t}=e,{user:n,anonymousUser:i,isGammaOrgUser:o,isUserLoading:a}=(0,I.SE)(),{enabled:s,enableStrictPrivacy:l}=(0,w.ye)("highlight");return(0,h.useEffect)(()=>{s&&!a&&n&&S(l,o)},[l,s,o,a,n]),(0,h.useEffect)(()=>{if(!a){if(n){let{id:e,displayName:t,email:r,profileImageUrl:i}=n;E.H.identify(e,{highlightDisplayName:t,email:r,avatar:i})}else if(null==i?void 0:i.id){let{id:e,displayName:t}=i;E.H.identify("",{anonDisplayName:t||"",anonId:e})}}},[n,i,a]),(0,r.jsx)(r.Fragment,{children:t})};var T=n(34881),P=n(87254),N=n(5879),R=n(44754);let O=e=>{let{children:t}=e;return(0,R.b)(),(0,r.jsx)(N.bd,{i18n:P.ag,children:t})};var D=n(18875),U=n(17292),G=n(55478),L=n(76332),M=n(6912),z=n(27902),H=n(21733),F=n(78462),W=n(72354),K=n(1163),B=n(2953);let Y="get-gamma-pro",q=e=>{var t,n;let{children:i}=e,{currentWorkspace:o,isUserLoading:a}=(0,H.SE)(),[s,l]=(0,h.useState)(!1),c=(0,z.z$)(),d=(0,w.ye)("upsellUXEnabled_Pro"),{data:u,refetch:p}=(0,L.FaU)({variables:{workspaceId:null==o?void 0:o.id,includeExpired:!0},skip:!(null==o?void 0:o.id)}),g=null==u?void 0:u.subscription;(0,M.ET)({subscription:g,workspace:o,autoLaunch:!0});let{data:m}=(0,L.kNl)({variables:{workspaceId:null==o?void 0:o.id},skip:!o}),f=null==m?void 0:null===(t=m.products)||void 0===t?void 0:t.find(e=>"pro"===e.key),x=null==f?void 0:null===(n=f.prices)||void 0===n?void 0:n.find(e=>e.frequencyUnit===L.C_B.Year),b=(0,K.K9)(o),{isOpen:v,onOpen:_,onClose:j}=(0,G.q)({id:"upsell-modal"}),C=(0,h.useRef)(null),y=(0,h.useCallback)(e=>{let{onOpenCallback:t,onCloseCallback:n,insufficientCreditsWarning:r,segmentEvent:i}=e;d&&(l(!!r),null==t||t(),_(),null==c||c.track(i),C.current=n||null)},[c,_,d]),k=(0,h.useCallback)(()=>{var e;null==C||null===(e=C.current)||void 0===e||e.call(C),j(),C.current=null,l(!1)},[j]),[E,I]=(0,h.useState)({openUpsellModal:y,product:b,subscription:g,proYearlyProductPrice:x});return(0,h.useEffect)(()=>{let e="true"===(0,F.SJ)()[Y];e&&!a&&o&&(_(),(0,T.lO)({query:{...(0,F.SJ)(),[Y]:void 0},emitChange:!1}))},[_,o,a]),(0,h.useEffect)(()=>{I({openUpsellModal:y,refetchSubscription:p,product:b,subscription:g,proYearlyProductPrice:x})},[y,b,g,x,p]),(0,r.jsxs)(B.P.Provider,{value:E,children:[i,(0,r.jsx)(W.b,{insufficientCreditsWarning:s,isUpsellModalOpen:v,closeUpsellModal:k}),(0,r.jsx)(M.S1,{})]})};var V=n(99268),Z=n(25944),X=n(19902);let J="no_org_id",Q=e=>{let{children:t}=e;(0,Z.iZ)();let{user:n,anonymousUser:i,currentWorkspace:o,isUserLoading:a}=(0,I.SE)();return(0,h.useEffect)(()=>{let e=(0,X.K)();(0,V.$n)(e.get()),e.fetch().then(V.$n).catch(()=>{})},[]),(0,h.useEffect)(()=>{let e;if(!a){if(n){let{id:t,email:r}=n,i=!!r&&r.endsWith("@gamma.app"),a=(null==o?void 0:o.id)||J;e={userId:t,isGammaUser:i,userOrgId:a,anonymousUser:!1,gammaUserFirstName:i?n.firstName:""}}else e={userId:"anonymous_user",isGammaUser:!1,userOrgId:J,anonymousUser:!0,gammaUserFirstName:""};(0,V.$n)(e)}},[a,n,i,o]),(0,r.jsx)(r.Fragment,{children:t})};var $=n(54839),ee=n(91994),et=n(89311),en=n(95426),er=n(1198),ei=n(90221),eo=n(60742),ea=n(13265),es=n(90383);s.vc.autoAddCss=!1;let el=(0,ee.bh)(),ec=(0,m.RqP)(),ed=(0,m.PGq)(),eu=(0,o.B1)(l.qZ,{styles:{global:{".ProseMirror":{outline:"0 none"}}}});((e,t)=>
1{let n=(0,$.I)({theme:t});e.globalToast=n})(window,eu),(0,eo.Lq)(),U.F7.initialize(),(0,T.lt)(),v.co.init(),(0,D.S1)(),(0,y.u7)(),(0,en.a)("appMainBundleLoaded"),console.log("\uD83D\uDE80 GammaApp main wrapper imported"),w.VH.get("debugLogging")||(window.console.debug=()=>{});let eh=e=>function(t){return(0,r.jsx)(ep,{children:(0,r.jsx)(e,{...t})})},ep=e=>{let{children:t}=e;console.log("\uD83D\uDE80 GammaApp main wrapper rendered");let n=(0,u.useRouter)();(0,et.l)(),(0,ea.k)(),j(),(0,h.useEffect)(()=>{let e=(e,t)=>{let{shallow:n}=t;console.debug("[GammaApp - handleRouteChange] App is changing to ".concat(e," ").concat(n?"with":"without"," shallow routing"))};return n.events.on("routeChangeStart",e),()=>{n.events.off("routeChangeStart",e)}},[n]);let o=(0,er.aY)();return(0,r.jsx)(p.zt,{store:el,children:(0,r.jsx)(O,{children:(0,r.jsx)(a.x,{theme:eu,resetCSS:!0,children:(0,r.jsx)(b,{children:(0,r.jsx)(i.e,{client:ec,children:(0,r.jsxs)(m.mdV,{client:ed,children:[(0,r.jsx)(em,{}),(0,r.jsx)(C.H6,{}),(0,r.jsx)(D.GQ,{}),(0,r.jsxs)(I.fS,{children:[(0,r.jsx)(z.qA,{children:(0,r.jsx)(w.dF,{children:(0,r.jsx)(q,{children:(0,r.jsx)(m.Imj,{children:(0,r.jsx)(Q,{children:(0,r.jsx)(A,{children:(0,r.jsx)(er.dv,{value:o,children:(0,r.jsx)(k.u,{children:t})})})})})})})}),(0,r.jsx)(w.MG,{})]})]})})})})})})},eg="A new medium for presenting ideas, powered by AI. Beautiful, engaging content with none of the formatting and design work.",em=()=>{let e=g.v.APPLICATION_ENVIRONMENT;return(0,r.jsxs)(d(),{children:[(0,r.jsx)("title",{children:"Gamma"}),(0,r.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1.0, viewport-fit=cover"}),(0,r.jsx)("link",{rel:"manifest",href:"/manifest.json"}),(0,r.jsx)("link",{rel:"shortcut icon",href:"production"===e?"/favicons/favicon-transparent-96x96.png":"staging"===e?"/favicons/favicon_staging.jpg":"/favicons/favicon_local.jpg"}),(0,r.jsx)("meta",{content:eg,name:"description"},"description"),(0,r.jsx)("meta",{content:"Gamma",property:"og:title"},"og:title"),(0,r.jsx)("meta",{content:eg,property:"og:description"},"og:description"),(0,r.jsx)("meta",{content:g.v.OG_IMAGE_URL,property:"og:image"},"og:image"),(0,r.jsx)("meta",{content:"Gamma",property:"twitter:title"},"twitter:title"),(0,r.jsx)("meta",{content:eg,property:"twitter:description"},"twitter:description"),(0,r.jsx)("meta",{content:g.v.OG_IMAGE_URL,property:"twitter:image"},"twitter:image"),(0,r.jsx)("meta",{property:"og:type",content:"website"},"og:type"),(0,r.jsx)("meta",{content:"summary_large_image",name:"twitter:card"},"twitter:card"),(0,r.jsx)("link",{href:"https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900",rel:"stylesheet"}),(0,r.jsx)("link",{rel:"stylesheet",href:"https://use.typekit.net/tiw2cwq.css"}),!(0,ei.l6)()&&!(0,es.wg)()&&(0,r.jsx)("script",{async:!0,src:"https://cdn.optimizely.com/js/20579410255.js"}),(0,r.jsx)("script",{src:"//cdn.iframe.ly/embed.js",async:!0,charSet:"utf-8"})]})}},60510:function(e,t,n){"use strict";n.d(t,{r:function(){return D},h:function(){return U}});var r=n(52322),i=n(38035),o=n(17993),a=n(77533),s=n(62614),l=n(81672),c=n(42946),d=n(49929),u=n(2784),h=n(90221),p=n(90439),g=n(93441),m=n(89458),f=n(90383),x=n(18733),b=n(5879),v=n(42111),_=n(78462),j=n(94199),C=n(11082),y=n(64173),w=n(31807),k=n(6912),E=n(48832),I=n(11050),S=n(36651),A=n(81640),T=n(12265),P=n(11942),N=n(88640);let R=[{Component:()=>{let e=(0,v.ye)("outageButterbar");if(!e.enabled)return null;let{header:t,text:n,buttonLink:i,buttonText:o,key:a,pathnameRegexp:s}=e;return(0,r.jsx)(U,{definition:{key:a,header:t,text:n,buttonText:o,buttonLink:i,conditions:()=>!s||null!==window.location.pathname.match(new RegExp(s))}})},key:"outage-butterbar"},{Component:()=>{let e=(0,v.ye)("openAiStatus");return"NORMAL"===e?null:(0,r.jsx)(U,{definition:{key:"ai-service-status",header:(0,r.jsx)(b.cC,{id:"1Agl06"}),text:(0,r.jsx)(b.cC,{id:"cCl6WD"}),ttl:86400,conditions:()=>(0,_._r)(window.location.pathname)}})},key:"ai-service-status-butterbar"},{Component:()=>{var e,t,n;let{user:i,currentWorkspace:o}=(0,S.SE)(),{subscription:a,product:s}
1=(0,A.z)(),{launchFailedPaymentFlow:l,failedPaymentFlowEnabled:c}=(0,k.ET)({subscription:a,workspace:o,autoLaunch:!1});if(!a||!s)return null;let d=(0,T.K)(),{name:u,dontChurnMessage:h}=d[s],{status:p,expirationTime:g,id:m}=a,f=(0,E.p6)(g,"MMMM do, yyyy"),x=(null==a?void 0:null===(e=a.createdByUser)||void 0===e?void 0:e.id)===(null==i?void 0:i.id),v=(0,P._8)(),_=g>Date.now();if(!("unpaid"===p||"past_due"===p)&&!_)return null;let y=v&&(x||!(null==a?void 0:a.createdByUser))?(0,r.jsx)(b.cC,{id:"velw1T",values:{expirationFormatted:f,GAMMA_PROPER_NOUN:j.N6,productName:u},components:{0:(0,r.jsx)(C.r,{href:v,isExternal:!0,textDecoration:"underline"})}}):(0,r.jsx)(b.cC,{id:"9aBOfk",values:{expirationFormatted:f,GAMMA_PROPER_NOUN:j.N6,productName:u,0:null===(t=a.createdByUser)||void 0===t?void 0:t.displayName,1:null===(n=a.createdByUser)||void 0===n?void 0:n.email},components:{0:(0,r.jsx)("b",{}),1:(0,r.jsx)("b",{})}});return(0,r.jsx)(U,{definition:{key:"payment-overdue-".concat(m),header:(0,r.jsx)(b.cC,{id:"gosJne",values:{productName:u}}),text:(0,r.jsxs)(r.Fragment,{children:[h," ",y]}),buttonText:(0,r.jsx)(b.cC,{id:"WLvqZR"}),buttonLink:c?void 0:v,buttonOnClick:c?l:void 0}})},key:"payment-overdue-butterbar"},{Component:()=>{let{subscription:e,openUpsellModal:t}=(0,A.z)();if(!e)return null;let{status:n,expirationTime:i,id:o}=e,a=new Date>(0,w.Z)(i)&&new Date<(0,y.Z)((0,w.Z)(i),{days:10});if(!a)return null;let s=()=>t({segmentEvent:I.AA.GAMMA_PRO_UPSELL_SUBSCRIPTION_EXPIRED_BUTTERBAR}),l=(0,r.jsx)(C.r,{onClick:s,isExternal:!0,textDecoration:"underline",children:(0,r.jsx)(b.cC,{id:"mj68q/"})});return(0,r.jsx)(U,{definition:{key:"subscription-expired-".concat(o),header:(0,r.jsx)(b.cC,{id:"5nhH6A"}),text:(0,r.jsxs)(r.Fragment,{children:["unpaid"===n||"past_due"===n?(0,r.jsx)(b.cC,{id:"QdgXJv"}):""," ",l]}),buttonText:(0,r.jsx)(b.cC,{id:"kwkhPe"}),buttonOnClick:s}})},key:"subscription-expired-butterbar"},{Component:()=>{var e,t,n;let{user:i}=(0,S.SE)(),{subscription:o,product:a}=(0,A.z)();if(!o||!a)return null;let{status:s,expirationTime:l,id:c,cancellationRequestedTime:d}=o,u="canceled"!=s&&d&&new Date<(0,w.Z)(l)&&new Date>(0,y.Z)((0,w.Z)(l),{days:-7});if(!u)return null;let h=(null==o?void 0:null===(e=o.createdByUser)||void 0===e?void 0:e.id)===(null==i?void 0:i.id),p=(0,P._8)(),g=(0,E.p6)(l,"MMMM do, yyyy"),m=(0,T.K)(),{name:f,dontChurnMessage:x}=m[a],v=!h&&(null==o?void 0:o.createdByUser)?(0,r.jsx)(b.cC,{id:"z4DeyC",values:{expirationFormatted:g,GAMMA_PROPER_NOUN:j.N6,productName:f,0:null===(t=o.createdByUser)||void 0===t?void 0:t.displayName,1:null===(n=o.createdByUser)||void 0===n?void 0:n.email},components:{0:(0,r.jsx)("b",{}),1:(0,r.jsx)("b",{})}}):(0,r.jsx)(b.cC,{id:"qP91+f",values:{expirationFormatted:g,GAMMA_PROPER_NOUN:j.N6,productName:f},components:{0:(0,r.jsx)(C.r,{href:p,isExternal:!0,textDecoration:"underline"})}});return(0,r.jsx)(U,{definition:{key:"subscription-ending-soon-".concat(c),header:(0,r.jsx)(b.cC,{id:"THJAvC",values:{productName:f}}),text:(0,r.jsxs)(r.Fragment,{children:[x," ",v]}),buttonText:(0,r.jsx)(b.cC,{id:"3jHA5d"}),buttonLink:p}})},key:"upcoming-cancellation-butterbar"},{key:"tablet-browser-warning",header:(0,r.jsx)(b.cC,{id:"JAtlMu",values:{GAMMA_PROPER_NOUN:j.N6}}),text:(0,r.jsx)(b.cC,{id:"9JlCFS",values:{GAMMA_PROPER_NOUN:j.N6}}),conditions:()=>(0,h.dA)(),dismissKey:N.H.lastDismissedPreferredBrowserMessage},{key:"desktop-browser-warning",header:(0,r.jsx)(b.cC,{id:"3S0+Wy",values:{GAMMA_PROPER_NOUN:j.N6}}),text:(0,r.jsx)(b.cC,{id:"Tf7VpJ"}),conditions:()=>O()&&(0,h.ds)(),dismissKey:N.H.lastDismissedPreferredBrowserMessage}],O=()=>(0,h.jP)()||!(0,h.i7)()&&!(0,h.G6)()&&!(0,h.NA)(),D=e=>{let{isViewOnly:t}=e,n=(0,g.gF)();if(t||!n||(0,h.l6)()||p.cx||(0,f.wg)())return null;let o=R.map(e=>"Component"in e?(0,r.jsx)(e.Component,{},e.key):(0,r.jsx)(U,{definition:e},e.key));return(0,r.jsx)(i.k,{"data-testid":"butterbar",direction:"column",top:0,pos:"relative",zIndex:"banner",sx:{"> *:not(:first-child)":{display:"none"}},children:o})},U=e=>{let{definition:t}=e,{key:n,dismissKey:h="butterbar-dismiss-".concat(n),header:p,text:g,buttonText:f,buttonLink:b,buttonOnClick:v=b?()=>window.open(b,"_blank"):void 0,conditions:_,ttl:j}=t,[C,y]=(0,m.I)(h,!1);return((0,u.useEffect)(()=>
1{if(!(j&&C))return;let e=new Date().getTime(),t=new Date(C).getTime(),n=e-t>1e3*j;n&&x.W.removeItem(h)},[h,C,j]),_&&!_()||C)?null:(0,r.jsxs)(i.k,{direction:"row",bg:"indigo.500",color:"white",py:3,px:4,align:"center",fontSize:"sm",children:[(0,r.jsxs)(o.g,{flex:"1",align:"start",spacing:0,children:[(0,r.jsx)(a.x,{fontWeight:"bold",children:p}),(0,r.jsx)(a.x,{opacity:"0.7",fontSize:"xs",children:g})]}),f&&v&&(0,r.jsx)(s.z,{variant:"plain",size:"sm",mr:4,rightIcon:b?(0,r.jsx)(d.G,{icon:c.wlW}):void 0,onClick:v,children:f}),(0,r.jsx)(l.P,{onClick:()=>{y(String(new Date))}})]})}},2013:function(e,t,n){"use strict";n.d(t,{q:function(){return C}});var r=n(52322),i=n(38035),o=n(77533),a=n(49259),s=n(87436),l=n(95897),c=n(28535),d=n(89511),u=n(11121),h=n(44438),p=n(42822),g=n(62614),m=n(75009),f=n(94523),x=n(5879),b=n(3543),v=n(92981);let _=(0,r.jsx)(x.cC,{id:"HiX9QN"}),j={bgImage:"radial-gradient(1px 1px at 20px 30px, #eee, rgba(0,0,0,0)),\n radial-gradient(1px 1px at 40px 70px, #fff, rgba(0,0,0,0)),\n radial-gradient(1px 1px at 50px 160px, #ddd, rgba(0,0,0,0)),\n radial-gradient(1px 1px at 90px 40px, #fff, rgba(0,0,0,0)),\n radial-gradient(1px 1px at 130px 80px, #fff, rgba(0,0,0,0)),\n radial-gradient(1px 1px at 160px 120px, #ddd, rgba(0,0,0,0))",bgRepeat:"repeat",bgSize:"200px 200px",transform:"translate(-50%,-50%)",borderRadius:{base:0,lg:"100px"},pos:"relative",maxW:"8xl",maxH:"5xl",minH:{base:0,lg:"5xl"}},C=e=>{let{errMessage:t=_,showDisclosure:n=!1,opacity:C=1,starOverlay:y=!0,backgroundColor:w=f.qZ.colors.trueblue[900],...k}=e,E=y?j:{};return(0,r.jsx)(i.k,{"data-error-component":!0,w:"100vw",h:"100vh",overflow:"hidden",zIndex:99999,backgroundColor:(0,b.tT)(w,C),...k,children:(0,r.jsx)(i.k,{...E,justifyContent:"center",alignItems:"center",flex:1,p:[4,16],left:"50%",top:"50%",children:(0,r.jsxs)(v.qX,{lede:"",title:(0,r.jsx)(x.cC,{id:"HbR60U"}),stackProps:{shadow:"lg-dark",position:"relative"},children:[(0,r.jsx)(o.x,{children:(0,r.jsx)(x.cC,{id:"1gm+lP"})}),n&&(0,r.jsx)(a.U,{allowToggle:!0,pt:4,children:(0,r.jsxs)(s.Q,{children:[(0,r.jsxs)(l.K,{px:0,_hover:{bgColor:"none"},borderStyle:"none",children:[(0,r.jsx)(c.xu,{flex:"1",textAlign:"left",children:(0,r.jsx)(x.cC,{id:"qug3k/"})}),(0,r.jsx)(d.X,{})]}),(0,r.jsx)(u.H,{pb:4,children:(0,r.jsx)(h.E,{colorScheme:"red",children:t})})]})}),(0,r.jsx)(p.M,{children:(0,r.jsx)(g.z,{variant:"solid",size:"lg",m:6,onClick:()=>{window.location.reload()},children:(0,r.jsx)(x.cC,{id:"C6f2hU"})})}),(0,r.jsx)(m.E,{pos:"absolute",w:36,bottom:"calc(-100% + 120px)",right:-12,src:"/_next/static/media/Sal-Asteroid-Parachute.ad317576.png",pointerEvents:"none",opacity:{base:0,md:1}})]})})})}},4661:function(e,t,n){"use strict";n.d(t,{o:function(){return s}});var r=n(52322),i=n(38035),o=n(60510);let a=e=>{let{children:t,withFooter:n,isViewOnly:a}=e;return(0,r.jsxs)(i.k,{direction:"column",width:"100%",height:"100%",minHeight:"var(--100vh)",bgColor:"gray.100",color:"gray.800",children:[(0,r.jsx)(o.r,{isViewOnly:a}),(0,r.jsx)(i.k,{zIndex:"1",id:"main",flex:"1",justifyContent:"center",alignItems:"center",direction:"column",position:"relative",children:t}),n&&(0,r.jsxs)(i.k,{fontSize:"12px",color:"gray.400",pb:8,id:"footer",justifyContent:"center",children:["\xa9 ",new Date().getFullYear()," Gamma Tech, Inc."]})]})};function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{withFooter:!1,isViewOnly:!1},{withFooter:n,isViewOnly:i}=t,o=t=>(0,r.jsx)(a,{withFooter:n,isViewOnly:i,children:(0,r.jsx)(e,{...t})});return"getInitialProps"in e&&(o.getInitialProps=e.getInitialProps),o}},86236:function(e,t,n){"use strict";n.d(t,{oO:function(){return r.o},GE:function(){return j}});var r=n(4661),i=n(52322),o=n(38035),a=n(15706),s=n(5632),l=n(73534),c=n.n(l),d=n(2784),u=n(14274),h=n(55001),p=n(18606),g=n(7454),m=n(17283),f=n(17821),x=n(90221);let b=u.v.IS_CLIENT_SIDE&&document.cookie.includes("gammaGADebug=true"),v=()=>
1"production"===u.v.APPLICATION_ENVIRONMENT&&!(0,x.l6)()||b,_=e=>{let{children:t,headerMode:n}=e,r=(0,s.useRouter)();return(0,d.useEffect)(()=>{if(!v())return;let e=e=>{(0,m.o8)(e)};return r.events.on("routeChangeComplete",e),r.events.on("hashChangeComplete",e),()=>{r.events.off("routeChangeComplete",e),r.events.off("hashChangeComplete",e)}},[r.events]),(0,i.jsxs)(o.k,{direction:"column",width:"100%",height:"100%",minHeight:"var(--100vh)",bg:"#EDE9E8",color:"gray.800",overflowX:"hidden",children:[v()&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(c(),{strategy:"afterInteractive",src:"https://www.googletagmanager.com/gtag/js?id=".concat(m.vt)}),(0,i.jsx)(c(),{id:"gtag-init",strategy:"afterInteractive",dangerouslySetInnerHTML:{__html:"\n window.dataLayer = window.dataLayer || [];\n function gtag(){dataLayer.push(arguments);}\n gtag('js', new Date());\n gtag('config', '".concat(m.vt,"', {\n page_path: window.location.pathname,\n });\n ")}})]}),(0,i.jsx)(p.P,{headerMode:n}),(0,i.jsx)(o.k,{zIndex:"1",id:"main",flex:"1",justifyContent:"flex-start",alignItems:"center",direction:"column",position:"relative",children:t}),(0,i.jsx)(h.Y,{})]})};function j(e,t){let n=n=>{let{headerMode:r}=t||{};return(0,i.jsxs)(a.f6,{theme:g.i,children:[(0,i.jsx)(f.ZP,{}),(0,i.jsx)(_,{headerMode:r,children:(0,i.jsx)(e,{...n})})]})};return"getInitialProps"in e&&(n.getInitialProps=e.getInitialProps),n}},79254:function(e,t,n){"use strict";n.d(t,{$C:function(){return h},H6:function(){return u},Uj:function(){return p}});var r=n(52322),i=n(5632),o=n(73534),a=n.n(o),s=n(14274),l=n(93441),c=n(34385);let d=["/signin","/signup","/invitations/workspaces/[workspaceId]"],u=()=>{let e=(0,i.useRouter)().pathname;return!(0,l.gF)()||d.includes(e)?null:(0,r.jsx)("style",{children:".grecaptcha-badge { visibility: hidden; }"})},h=()=>(0,r.jsx)(a(),{src:"https://www.google.com/recaptcha/enterprise.js?render=".concat(s.v.RECAPTCHA_SCORING_KEY),async:!0,defer:!0}),p=async e=>(await (0,c.X)(50,100)(()=>!!window.grecaptcha).catch(()=>{throw Error("Timed out waiting for grecaptcha")}),new Promise((t,n)=>{grecaptcha.enterprise.ready(async()=>{try{let n=await grecaptcha.enterprise.execute(s.v.RECAPTCHA_SCORING_KEY,{action:e});t(n)}catch(e){console.log(e),n(e)}})}))},90980:function(e,t,n){"use strict";n.d(t,{H:function(){return u}});var r=n(52322),i=n(29117),o=n(19376),a=n(77533),s=n(54933),l=n(49929),c=n(94523),d=n(5879);let u=e=>{let{charCount:t,max:n,shouldShow:u,units:h,...p}=e,g=t>n?(0,r.jsx)(d.cC,{id:"YEfcBv"}):(0,r.jsx)(d.cC,{id:"ZSr/Fa"});return(0,r.jsx)(c.kH,{label:u?g:"",placement:"top",children:(0,r.jsxs)(i.U,{p:1,px:2,borderRadius:"md",display:"inline-flex",bg:t>n?"red.200":t>=.9*n?"orange.200":"transparent",color:t>n?"red.700":t>=.9*n?"orange.700":"gray.600",fontSize:"sm",cursor:"help",zIndex:1,opacity:u?1:0,transitionProperty:"common",transitionDuration:"normal",borderWidth:"1px",borderColor:t>n?"red.300":t>=.9*n?"orange.300":"transparent",...p,children:[t>n?(0,r.jsx)(l.G,{icon:s.ik8}):(0,r.jsx)(o.D,{value:t/n*100,color:"blackAlpha.700",trackColor:"blackAlpha.200",thickness:"12px",size:4}),(0,r.jsxs)(a.x,{children:[t,"/",n,h?" ".concat(h):""]})]})})}},24551:function(e,t,n){"use strict";n.d(t,{C:function(){return w},O:function(){return k}});var r=n(52322),i=n(38035),o=n(17993),a=n(62614),s=n(67109),l=n(42946),c=n(49929),d=n(5879),u=n(55388),h=n(2689),p=n.n(h),g=n(2784),m=n(91994),f=n(62040),x=n(90507),b=n(28858),v=n(46741),_=n(76282),j=n(74720),C=n(14874);let y={...b.I,...j.R,...v.dE},w="ai-card-editor",k=(0,g.memo)(e=>{let{...t}=e,n=(0,m.CG)(_.$X),s=(0,u.jE)({...t,extensions:C.XL}
1);s&&(s.editorId=w);let h=(0,m.CG)(_.g8),b=(0,m.CG)(_.CC);(0,g.useEffect)(()=>{s&&s.setEditable(!n)},[n,s]);let v=(0,g.useCallback)(()=>{null==s||s.chain().insertContentAt(null==s?void 0:s.state.doc.content.size,{type:"card",content:[{type:"paragraph"}]}).selectInsertedNode().run()},[s]);return(0,f.n)(s),(0,r.jsxs)(i.k,{flex:"1",direction:"column",sx:y,p:{base:2,md:3},children:[(0,r.jsx)(x.kg,{editor:s,style:{wordBreak:"break-word",display:"flex",flexDirection:"column"}}),n&&(0,r.jsx)(o.g,{children:p()(h-b).map(e=>(0,r.jsx)(E,{},e))}),!n&&(0,r.jsx)(a.z,{boxShadow:"none",leftIcon:(0,r.jsx)(c.G,{icon:l.r8p,fixedWidth:!0}),onClick:v,children:(0,r.jsx)(d.cC,{id:"sFY+gw"})})]})});k.displayName="AICardEditor";let E=()=>(0,r.jsx)(s.O,{height:14,width:"100%",borderRadius:"md"})},93546:function(e,t,n){"use strict";n.d(t,{e:function(){return M}});var r=n(52322),i=n(17993),o=n(28535),a=n(38035),s=n(29117),l=n(75768),c=n(37417),d=n(62614),u=n(77533),h=n(5740),p=n(36474),g=n(43297),m=n(97143),f=n(42946),x=n(49929),b=n(94523),v=n(5879),_=n(2784),j=n(90980),C=n(45760),y=n(91994),w=n(86581),k=n(7208),E=n(74153),I=n(1071),S=n(76282),A=n(75258),T=n(24551),P=n(55388),N=n(62040),R=n(90507),O=n(46741),D=n(74720),U=n(14874);let G={...D.R,...O.dE},L=(0,_.memo)(e=>{let{...t}=e,n=(0,P.jE)({...t,extensions:U.uJ});return(0,N.n)(n),(0,r.jsx)(a.k,{flex:"1",direction:"column",sx:G,children:(0,r.jsx)(R.kg,{editor:n,style:{wordBreak:"break-word",flex:1,display:"flex",flexDirection:"column"}})})});L.displayName="AIFreeformEditor";let M=(0,_.memo)(e=>{let{showAddBreaks:t,showTopbar:n=!1,hideFooter:g=!1,containerProps:m,onEditorUpdate:P,showContentTip:N,onAddClick:R,isAdding:O}=e,D=(0,y.CG)(S.Vn),G=(0,y.CG)(S.$X),{setEditorInstance:M}=(0,C.vZ)(),H=(0,E.ex)({debounce:500}),F=(0,y.qr)(),[W]=(0,E.Ns)("editorMode"),K=(0,_.useRef)(!1),B=(0,_.useCallback)(e=>{let t,{editor:n,transaction:r}=e;if(K.current&&r.docChanged){if(null==P||P({editor:n}),"structured"===W){let e=[];n.state.doc.forEach(t=>{let n=(0,w.MF)(t);e.push(n)}),t=e.join("\n\n---\n\n")}else t=(0,w.MF)(n.state.doc);H({content:t})}},[P,H,W]),Y=(0,y.CG)(S.mO),q=(0,_.useCallback)(e=>{let{editor:t}=e;M(t);let n=(0,S.au)(F.getState()),r=(0,w.c8)(n),i=(0,U.dW)(r,W).content.toJSON();t.commands.setContent(i),K.current=!0},[M,F,W]),{isAddingBreaks:V,canAddBreaks:Z,canRemoveBreaks:X,removeSectionBreaks:J,addSectionBreaks:Q}=(0,k.N)(),$="structured"===W,ee=(0,y.CG)(S.au),et=0===ee.length,en=(0,y.CG)(S.CC),{maxTokens:er}=(0,I.ml)();return(0,r.jsxs)(i.g,{borderRadius:"md",spacing:3,align:"start",opacity:D?.75:1,pointerEvents:D?"none":"inherit",cursor:D?"not-allowed":void 0,h:"100%",children:[N&&(0,r.jsxs)(o.xu,{fontSize:"sm",pos:"relative",w:"100%",children:[(0,r.jsx)(v.cC,{id:"4b3oEV"})," ",(0,r.jsx)(b.Yq,{label:(0,r.jsx)(v.cC,{id:"tztPjl"})})]}),(0,r.jsxs)(a.k,{flex:"1",w:"100%",bg:"white",borderRadius:"lg",boxShadow:"sm",direction:"column",children:[n&&(0,r.jsxs)(s.U,{position:"relative",py:2,px:4,borderBottom:"1px",borderColor:"var(--chakra-colors-chakra-border-color)",justifyContent:"center",children:[(0,r.jsx)(A.x,{}),t&&(0,r.jsx)(l.h,{position:"absolute",top:"2",right:"2",size:"sm",children:Z&&(0,r.jsx)(c.M,{in:!0,initialScale:.6,children:(0,r.jsx)(b.kH,{label:(0,r.jsx)(v.cC,{id:"SuUA6H"}),placement:"top",children:(0,r.jsx)(d.z,{boxShadow:"none",isLoading:V,leftIcon:(0,r.jsx)(x.G,{icon:f.EQg,fixedWidth:!0}),onClick:()=>Q(ee),children:(0,r.jsx)(u.x,{display:{base:"none",sm:"block"},children:(0,r.jsx)(v.cC,{id:"I6SWEy"})})})})})})]}),(0,r.jsxs)(a.k,{fontSize:"sm",direction:"column",flex:"1",pos:"relative",sx:{".ProseMirror":{padding:"freeform"===W?6:0,fontSize:"16px"}},...m,children:["freeform"===W?(0,r.jsx)(L,{onUpdate:B,onCreate:q}):(0,r.jsx)(T.O,{onUpdate:B,onCreate:q}),et&&!G&&"freeform"===W&&(0,r.jsx)(o.xu,{pos:"absolute",top:6,left:6,pointerEvents:"none",color:"gray.500",fontSize:"md",children:(0,r.jsx)(v.cC,{id:"xafDnF"})})]}),!g&&(0,r.jsxs)(s.U,{fontSize:"sm",px:4,py:3,alignItems:"center",color:"gray.500",children:[$?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.k,{flex:"1",children:(0,r.jsx)(u.x,{children:(0,r.jsx)(v.cC,{id:"Psk6LY",values:{cardCount:en}})})}),(0,r.jsx)(a.k,{flex:"2",justifyContent:"center",display:{base:"none",md:"flex"},children:(0,r.jsx)(u.x,{children:(0,r.jsx)(v.cC,{id:"c3ugvF",components:{0:(0,r.jsx)(h.T,{})}})})}),(0,r.jsx)(a.k,{flex:"1",justifyContent:"flex-end",children:(0,r.jsx)(j.H,{charCount:Y,max:er,shouldShow:!0,bg:"white",borderColor:"white",fontFamily:"mono"})})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(p.L,{flex:"1"}),(0,r.jsx)(a.k,{flex:"2",justifyContent:"center",children:(0,r.jsx)(z,{})}),(0,r.jsx)(a.k,{flex:"1",justifyContent:"flex-end",children:(0,r.jsx)(j.H,{charCount:Y,max:er,shouldShow:!0,bg:"white",borderColor:"white",fontFamily:"mono"})})]}),R&&(0,r.jsx)(d.z,{variant:"solid",size:"sm",onClick:R,isLoading:O,leftIcon:(0,r.jsx)(x.G,{icon:f.JyM}),children:(0,r.jsx)(v.cC,{id:"sFY+gw"})})]})]})]})});M.displayName="AIGeneratorContent";let z=(0,_.memo)(()=>(0,r.jsx)(b.kH,{placement:"top",bg:"gray.900",label:(0,r.jsxs)(g.K,{spacing:1,fontFamily:"mono",children:[(0,r.jsx)(u.x,{children:"# Heading 1"}),(0,r.jsx)(u.x,{children:"## Heading 1"}),(0,r.jsx)(u.x,{children:"### Heading 3"}),(0,r.jsx)(u.x,{children:"- Item 1"}),(0,r.jsx)(u.x,{children:"- Item 2"}),(0,r.jsx)(u.x,{children:"- Item 3"}
1),(0,r.jsx)(u.x,{children:"--- Divider"})]}),children:(0,r.jsxs)(u.x,{cursor:"help",children:[(0,r.jsx)(u.x,{as:"span",color:"gray.400",mr:1,children:(0,r.jsx)(x.G,{icon:m.cCZ})}),(0,r.jsx)(v.cC,{id:"u6Hp4N"})]})}));z.displayName="MarkdownTip"},74720:function(e,t,n){"use strict";n.d(t,{R:function(){return i}});var r=n(40212);let i={".ProseMirror":{flex:1,...r.U},".block":{my:"0.75rem",":first-child":{mt:"0px !important"},":last-child":{mb:"0px !important"}},".block-heading":{fontWeight:"bold",lineHeight:"1.25",_first:{mt:0}},h1:{fontSize:"1.5em"},h2:{fontSize:"1.25em"},h3:{fontSize:"1.125em"},"a[href]":{color:"var(--chakra-colors-trueblue-600)",textDecoration:"underline"}}},14874:function(e,t,n){"use strict";n.d(t,{XL:function(){return eb},uJ:function(){return ex},dW:function(){return ev}});var r=n(72338),i=n(86900),o=n(42626),a=n(74902),s=n(36518),l=n(71391),c=n(86509),d=n(9432),u=n(70675),h=n(38438),p=n(39615),g=n(39475),m=n(77381),f=n(6085),x=n(3402),b=n(17487),v=n(72762),_=n(73528),j=n(99173),C=n(41889),y=n(13653),w=n(59799),k=n(90507),E=n(47577),I=n(52322),S=n(28535);let A=e=>{let{selected:t}=e;return(0,I.jsx)(k.T5,{children:(0,I.jsx)(S.xu,{pos:"relative",draggable:"true","data-drag-handle":!0,cursor:"grab",contentEditable:"false",position:"relative",display:"flex",flexDirection:"column",justifyContent:"center",height:"1.25rem",color:t?"trueblue.400":"gray.400",lineHeight:"1rem",fontWeight:"800",children:"---"})})},T=/^(---|___|â-)/,P=r.NB.create({name:"sectionBreak",group:"block",atom:!0,selectable:!0,draggable:!0,parseHTML:()=>[{tag:"hr"}],renderHTML(e){let{HTMLAttributes:t}=e;return["hr",(0,r.P1)(t)]},addNodeView:()=>(0,k.fW)(A),addInputRules(){return[(0,E.ok)({find:T,type:this.type})]}});var N=n(60491),R=n(90062),O=n(91073),D=n(27191),U=n(52780);let G=new D.Sy({props:{decorations:e=>{let{doc:t}=e,n=[],r=1;return t.descendants((e,t)=>{"card"===e.type.name&&(n.push(U.p.node(t,t+e.nodeSize,{},{number:r,isSectionCardPluginDecoration:!0})),r++)}),0==n.length?U.EH.empty:U.EH.create(t,n)}}}),L=e=>{let t=e.find(e=>e.spec.isSectionCardPluginDecoration);return t?t.spec:{number:0,isSectionCardPluginDecoration:!0}};var M=n(29117),z=n(77533),H=n(38035),F=n(32899),W=n(10625),K=n(67046),B=n(332),Y=n(99058),q=n(25481),V=n(27599),Z=n(42946),X=n(49929),J=n(94523),Q=n(5879),$=n(87254),ee=n(2784),et=n(5026),en=n(76282),er=n(91994),ei=n(90221),eo=n(3543);let ea={r:235,g:248,b:255},es={r:255,g:245,b:255},el={r:107,g:70,b:193},ec={r:43,g:108,b:176},ed=(e,t,n,r)=>r?{bg:"gray.100",text:"gray.600"}:{bg:(0,eo.Py)(ea,es,e/Math.min(n,t)),text:(0,eo.Py)(ec,el,e/Math.min(n,t))},eu=e=>{let{decorations:t,editor:n,getPos:r}=e,{number:i}=L(t),o=(0,er.CG)(en.CC),{maxCards:a,canUpgrade:s}=(0,et.hw)(),l=i>a,c=i===o,d=ed(i,o,a,l),u=(0,ee.useCallback)(()=>{let e=r(),t=n.view.state.doc.nodeAt(e);if(!t){console.error("[SectionCardView] Cannot append card. Node unknown");return}let i=e+t.nodeSize;n.chain().insertContentAt(i,{type:"card",content:[{type:"paragraph"}]}).focus().selectInsertedNode().run()},[n,r]),h=(0,ee.useCallback)(()=>{n.commands.selectNodeAtPos(r())},[n,r]),p=(0,ee.useCallback)(()=>{let e=r(),t=n.view.state.doc.nodeAt(e);if(!t){console.error("[SectionCardView] Cannot delete card. Node unknown");return}n.chain().deleteRange({from:e,to:e+t.nodeSize}).selectInsideNodeAtPos(e).focus().run()},[n,r]),g=(0,ee.useCallback)(()=>{let e=r(),t=n.view.state.doc.nodeAt(e);if(!t){console.error("[SectionCardView] Cannot focus card. Node unknown");return}n.chain().selectInsideNodeAtPos(e).focus().run()},[n,r]),m=(0,y.Od)(t);return(0,I.jsxs)(k.T5,{role:"group",children:[(0,I.jsxs)(M.U,{className:"card",border:"1px solid",borderColor:m?"var(--chakra-ring-color)":"blackAlpha.100",shadow:"sm",_hover:{shadow:"md"},transitionProperty:"box-shadow",transitionDuration:"normal",bg:"white",borderRadius:"md",spacing:0,align:"stretch","data-selection-ring":!0,pos:"relative",my:3,mt:1===i?0:void 0,role:"group",children:[!(0,ei.s2)()&&(0,I.jsx)(S.xu,{position:"absolute",color:d.text,zIndex:"1",top:"3.5",left:"0",pointerEvents:"none",opacity:"0",_groupHover:{opacity:.75},children:(0,I.jsx)(X.G,{icon:Z.Okg,fixedWidth:!0})}),l&&(0,I.jsx)(S.Cd,{size:"6px",position:"absolute",zIndex:"2",top:"1.5",left:"1.5",bg:"sunglow.400"}),(0,I.jsx)(J.kH,{label:l&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(z.x,{children:[(0,I.jsx)(Q.cC,{id:"rayOuP"})," "]}),(0,I.jsx)(z.x,{color:"gray.400",children:s?(0,I.jsx)(Q.cC,{id:"W8sobv",values:{MAX_CARDS_PRO:et.Fv}}):(0,I.jsx)(Q.cC,{id:"yLG7qf"})})]}),placement:"top",children:(0,I.jsx)(H.k,{dir:"column",align:"start",justify:"center",pr:1,pl:2,py:{base:3.5,md:4},w:12,cursor:l?"help":"grab","data-drag-handle":!0,contentEditable:!1,onClick:h,fontSize:i>=100?"xs":"sm",fontFamily:"mono",fontWeight:"600",borderLeftRadius:"inherit",userSelect:"none",transitionProperty:"filter",transitionDuration:"normal",_hover:{filter:"brightness(0.95)"},bg:d.bg,color:d.text,children:i})}),(0,I.jsx)(S.xu,{p:{base:3,md:4},flex:1,color:l?"gray.600":void 0,position:"relative",children:(0,I.jsx)(k.ms,{})}),(0,I.jsx)(ep,{addCard:u,focusCard:g,deleteCard:p})]}
1),!(0,ei.s2)()&&!c&&(0,I.jsx)(eh,{addCard:u})]})},eh=(0,ee.memo)(e=>{let{addCard:t}=e;return(0,I.jsxs)(H.k,{w:"100%",h:1,borderRadius:"md",bg:"trueblue.200",transitionProperty:"opacity",transitionDuration:"slow",opacity:0,_hover:{opacity:1},_focusWithin:{opacity:1},contentEditable:!1,my:1,dir:"column",align:"center",justify:"center",pos:"absolute",transform:"translateY(-0.75rem)",zIndex:1,children:[(0,I.jsx)(S.xu,{pos:"absolute",top:-2,bottom:-2,left:0,right:0}),(0,I.jsx)(J.kH,{placement:"top",label:$.ag._({id:"sFY+gw"}),shortcut:"---",children:(0,I.jsx)(F.h,{pos:"absolute",variant:"solid",icon:(0,I.jsx)(X.G,{icon:Z.r8p}),"aria-label":"Add card",isRound:!0,size:"xs",onClick:t,tabIndex:-1})})]})});eh.displayName="CardDivider";let ep=(0,ee.memo)(e=>{let{addCard:t,deleteCard:n,focusCard:r}=e;return(0,I.jsx)(M.U,{pr:{base:2,md:2.5},pt:{base:2,md:3},alignSelf:"start",children:(0,ei.s2)()?(0,I.jsx)(W.v,{children:e=>{let{onClose:i}=e;return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(K.j,{onClick:r,as:F.h,colorScheme:"gray",variant:"ghost",size:"sm",icon:(0,I.jsx)(X.G,{icon:Z.S6C,fixedWidth:!0})}),(0,I.jsx)(B.h,{children:(0,I.jsxs)(Y.q,{zIndex:"tooltip",children:[(0,I.jsx)(q.s,{onClick:()=>{i(),t()},icon:(0,I.jsx)(X.G,{icon:Z.L26,fixedWidth:!0}),children:(0,I.jsx)(Q.cC,{id:"90n2YU"})}),(0,I.jsx)(V.R,{}),(0,I.jsx)(q.s,{onClick:()=>{n(),i()},color:"red",icon:(0,I.jsx)(X.G,{icon:Z.Vui,fixedWidth:!0}),children:(0,I.jsx)(Q.cC,{id:"nabda1"})})]})})]})}}):(0,I.jsx)(J.kH,{label:(0,I.jsx)(Q.cC,{id:"nabda1"}),placement:"top",children:(0,I.jsx)(F.h,{colorScheme:"gray",variant:"ghost",opacity:"0",_groupHover:{opacity:1},_focus:{opacity:1},transitionProperty:"opacity",transitionDuration:"slow",size:"sm",onClick:n,"aria-label":$.ag._({id:"nabda1"}),icon:(0,I.jsx)(X.G,{icon:Z.Vui,fixedWidth:!0})})})})});ep.displayName="CardActions";let eg=/^(---|___|â-)$/,em=r.NB.create({name:"card",content:"block+",selectable:!0,draggable:!0,isolating:!0,parseHTML:()=>[{tag:"section"}],renderHTML(e){let{HTMLAttributes:t}=e;return["section",(0,r.P1)(t),0]},addNodeView:()=>(0,k.fW)(eu),addProseMirrorPlugins:()=>[G],addInputRules:()=>[new r.VK({find:eg,handler:e=>{let{state:t,range:n}=e,{tr:r}=t;(0,N.X)({tr:r.deleteRange(n.from,n.to),dispatch:!0})}})],addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.mergeCardsOnDelete(!1),Delete:()=>this.editor.commands.mergeCardsOnDelete(!0),Tab:()=>this.editor.commands.selectNextCard(!0),"Shift-Tab":()=>this.editor.commands.selectNextCard(!1)}},addCommands:()=>({selectNextCard:e=>t=>{let{state:n,dispatch:i,commands:o}=t;if(!i)return!0;let{selection:a}=n,s=(0,r.Kk)(O.KH)(a);if(!s||!a.empty)return!1;let l=n.doc.resolve(s.pos),c=l.index();if(e){if(c===l.parent.childCount-1)return!1;o.selectInsideNodeAtPos(s.pos+s.node.nodeSize)}else{if(0===c)return!1;let e=l.posAtIndex(c-1);o.selectInsideNodeAtPos(e)}return!0},mergeCardsOnDelete:e=>t=>{let{tr:n,state:i,dispatch:o}=t;if(!o)return!0;let{selection:a}=i,s=(0,r.Kk)(O.KH)(a);if(!s||!a.empty)return!1;try{let t=(0,R.pt)(a,e);if(!t)return!1;return e?(0,R.Yh)(s.pos,n,i):(0,R.Gq)(s.pos,n)}catch(e){return console.debug("[CardCommands] mergeCardsOnDelete failed",e),!1}}})}),ef=[c.A,m.l,C.d,h.n,p.x,b.Hy,l.X,i.d8,g.v,d.Tx,u.Z.configure({openOnClick:!1}),_.aV,v.g,j.k,w.U,f.m,s.f,a.m.configure({color:"var(--chakra-colors-trueblue-200)",width:3,class:"ProseMirror-dropcursor"}),y.Jn],ex=[...ef,P,o.B.extend({content:"block+"})],eb=[...ef,em,o.B.extend({content:"card+"})],ev=(e,t)=>{let n=(0,r.J1)("freeform"===t?ex:eb);return"structured"===t&&(e=e.split("<hr>").map(e=>"<section>".concat(e,"</section>")).join("\n")),(0,x.T)(e,n)}},49197:function(e,t,n){"use strict";n.d(t,{L:function(){return R}});var r=n(52322),i=n(17190),o=n(17993),a=n(28535),s=n(87651),l=n(74409),c=n(62614),d=n(77533),u=n(11082),h=n(42946),p=n(54933),g=n(49929),m=n(94523),f=n(5879),x=n(87254),b=n(2784),v=n(51874),_=n(45760),j=n(28918),C=n(93202),y=n(18153),w=n(91994),k=n(93546),E=n(96796),I=n(76282),S=n(54012),A=n(22902),T=n(83633),P=n(704),N=n(8484);let R=(0,b.memo)(()=>{let{guessSettings:e,isLoading:t}=(0,E.d)(),n=(0,w.CG)(I.au),[R,O]=(0,b.useState)(!1),[D,U]=(0,b.useState)("deck"),{goToScreen:G}=(0,P.R)(),L=(0,b.useCallback)(async()=>{let t=(0,S.Yl)(n),r=(0,S.vE)(n),i=(0,j.J1)(n);await e(C.FJd.PasteText,{format:D,content:n,settings:{textMode:i>=1e3?"document"===D?"preserve":"condense":"generate",editorMode:r>2&&t>5?"structured":"freeform"}})},[e,D,n]);return(0,y.j)({queryKey:"ref"}),(0,r.jsx)(_.jX,{children:(0,r.jsxs)(v.v4,{children:[(0,r.jsx)(N.D,{navL
1abel:(0,r.jsx)(f.cC,{id:"iH8pgl"}),navIcon:h.acZ}),(0,r.jsx)(T.U,{title:(0,r.jsx)(f.cC,{id:"RG+JLG"}),subtitle:(0,r.jsx)(f.cC,{id:"v2ydVh"}),icon:(0,r.jsx)(g.G,{icon:p.OEL}),iconBoxProps:{color:"salmon.300"},children:(0,r.jsx)(i.W,{maxW:"2xl",children:(0,r.jsxs)(o.g,{spacing:4,w:"100%",children:[(0,r.jsx)(o.g,{spacing:3,align:"stretch",w:"100%",children:(0,r.jsx)(k.e,{containerProps:{minH:{base:"270px",sm:"300px",md:"50vh"},maxH:"50vh",overflow:"auto"},hideFooter:!0,onEditorUpdate:e=>{let{editor:t}=e;O(!t.isEmpty)}})}),(0,r.jsx)(a.xu,{w:"100%",children:(0,r.jsx)(s.U,{in:R,children:(0,r.jsxs)(o.g,{spacing:4,py:2,w:"100%",children:[(0,r.jsx)(l.X,{size:{base:"sm",md:"md"},textAlign:"center",fontWeight:"500",color:"blackAlpha.700",px:4,children:(0,r.jsx)(f.cC,{id:"SjATqV"})}),(0,r.jsx)(A.FQ,{setSelectedFormat:U,selectedFormat:D})]})})}),(0,r.jsx)(m.kH,{label:n?"":(0,r.jsx)(f.cC,{id:"9IxKHJ"}),isDisabled:!!n,placement:"top",children:(0,r.jsx)(a.xu,{width:"100%",children:(0,r.jsx)(c.z,{size:"lg",minW:"16em",width:"100%",onClick:L,variant:"solid",rightIcon:(0,r.jsx)(g.G,{icon:h.eFW}),isLoading:t,isDisabled:!n,loadingText:x.ag._({id:"qgUvjm"}),children:(0,r.jsx)(f.cC,{id:"xGVfLh"})})})}),(0,r.jsx)(a.xu,{w:"100%",children:(0,r.jsx)(s.U,{in:!R,children:(0,r.jsx)(d.x,{textAlign:"center",color:"blackAlpha.800",children:(0,r.jsx)(f.cC,{id:"LVQnRo",components:{0:(0,r.jsx)(u.r,{onClick:e=>{e.preventDefault(),G("createImport",{ref:"paste"})},textDecoration:"underline",fontWeight:"600"})}})})})})]})})})]})})});R.displayName="CreatePastePage"},22902:function(e,t,n){"use strict";n.d(t,{FQ:function(){return b},_J:function(){return f},qe:function(){return x}});var r=n(52322),i=n(43297),o=n(62614),a=n(28535),s=n(77533),l=n(82655),c=n(42946),d=n(54933),u=n(49929),h=n(94523),p=n(87254),g=n(2784),m=n(90221);let f={deck:{label:()=>p.ag._({id:"FOoDGS"}),selectedIcon:d.s2,icon:l.s2,description:()=>p.ag._({id:"EPYCou"})},document:{label:()=>p.ag._({id:"7Zdnlq"}),selectedIcon:d.OEL,icon:l.OEL,description:()=>p.ag._({id:"nM2WM0"})},webpage:{label:()=>p.ag._({id:"YVokw8"}),selectedIcon:d.tc$,icon:l.tc$,description:()=>p.ag._({id:"C90Qtf"})}},x=e=>{let{label:t,icon:n,description:l,selectedIcon:h,isSelected:p,onClick:g,hideCheckbox:f}=e,x="purple.500";return(0,r.jsxs)(i.K,{as:o.z,h:"auto",textShadow:"none",variant:"plain",p:{base:2.5,sm:3},minW:24,spacing:1,w:"100%",cursor:"pointer",textAlign:"center",transition:"all 300ms ease",border:"2px solid",bg:p?"white":"whiteAlpha.800",borderRadius:"md",boxShadow:"sm",borderColor:p?x:"whiteAlpha.400",color:p?"trueblue.700":"gray.800",onClick:g,_hover:(0,m.s2)()?{color:"gray.800"}:{bg:"trueblue.50",borderColor:"trueblue.400"},position:"relative",children:[!f&&(0,r.jsx)(a.xu,{fontSize:"md",position:"absolute",left:1.5,top:1.5,color:p?x:"gray.200",children:(0,r.jsx)(u.G,{icon:p?d.f8k:c.diR})}),(0,r.jsx)(a.xu,{fontSize:{base:"lg",sm:"xl"},color:p?"trueblue.600":"trueblue.300",children:(0,r.jsx)(u.G,{icon:p?h:n})}),(0,r.jsx)(s.x,{fontSize:"sm",fontWeight:"500",noOfLines:1,children:t}),l&&(0,r.jsx)(s.x,{mt:2,fontSize:"xs",fontWeight:"500",whiteSpace:"normal",children:l})]})},b=(0,g.memo)(e=>{let{setSelectedFormat:t,selectedFormat:n,hideCheckbox:o}=e;return(0,r.jsx)(i.K,{direction:"row",mb:4,w:"100%",justifyContent:"center",children:Object.entries(f).map(e=>{let[i,{label:s,icon:l,selectedIcon:c,description:d}]=e;return(0,r.jsx)(h.kH,{placement:"top",label:d(),children:(0,r.jsx)(a.xu,{flex:"1",children:(0,r.jsx)(x,{label:s(),icon:l,selectedIcon:c,hideCheckbox:o,onClick:()=>{t(i)},isSelected:i===n})})},i)})})});b.displayName="FormatPickerComponent"},83633:function(e,t,n){"use strict";n.d(t,{U:function(){return l}});var r=n(52322),i=n(43297),o=n(74409),a=n(28535),s=n(38035);let l=e=>{let{title:t,subtitle:n,icon:l,iconBoxProps:c,children:d}=e;return(0,r.jsxs)(i.K,{alignContent:"center",position:"relative",zIndex:"0",spacing:0,py:{base:"9",md:"8vh"},w:"100%",children:[(0,r.jsxs)(i.K,{spacing:{base:2,md:4},mb:{base:5,md:8},w:"100%",children:[null!==t&&(0,r.jsxs)(o.X,{textAlign:"center",color:"gray.800",fontWeight:"600",fontFamily:"p22-mackinac-pro",w:"100%",size:{base:"xl",md:"2xl"},px:4,children:[l&&(0,r.jsx)(a.xu,{display:"inline",mr:2,...c,children:l}),t]}),n&&(0,r.jsx)(o.X,{size:{base:"sm",md:"md"},textAlign:"center",fontWeight:"500",color:"blackAlpha.700",px:4,children:n})]}),(0,r.jsx)(s.k,{w:"100%",justifyContent:"center",children:d})]})}},704:function(e,t,n){"use strict";n.d(t,{R:function(){return o},u:function(){return i}});var r=n(2784);let i=(0,r.createContext)({goToScreen:()=>{throw Error("goToScreen not available. Did you forget to wrap your component in RouterNavigationContext?")},goBack:()=>{throw Error("goBack not available. Did you forget to wrap your component in RouterNavigationContext?")},onDocGenerationLoaded:()=>{},navEnabled:!0,webpageOnly:!1,skipThemeStep:!1}),o=()=>(0,r.useContext)(i)},14581:function(e,t,n){"use strict";n.d(t,{$:function(){return l}});var r=n(52322),i=n(5632),o=n(2784),a=n(34881),s=n(704);function l(e){return(0,o.memo)(t=>{let{back:n,push:l,replace:c,query:d}=(0,i.useRouter)(),u="sites-dashboard"===d.ref,h=(0,o.useMemo)(()=>({goToScreen:(e,t)=>{let{generateId:n="",ref:r}=t||{},i=r?"?ref="+r:"";switch(e){case"createWithAI":l("/create"+i);break;case"createImport":l("/create/import"+i);break;case"createPaste":l("/create/paste"+i);break;case"createGenerate":l("/create/generate/"+n+i);break;case"legacyGuidedMode":l("/generate"+i);break;case"promptEditor":l("/generate/"+n+i);break;case"home":l("/");break;default:throw Error("invalid screen")}},goBack:e=>{let{ref:t}=e||{};"dashboard"===t?c("/"):n()},onDocGenerationLoaded:e=>{(0,a.lO)({pathname:"/create/generate/".concat(e),emitChange:!1})},navEnabled:!0,webpageOnly:u,skipThemeStep:!1}),[n,l,c,u]);return(0,r.jsx)(s.u.Provider,{value:h,children:(0,r.jsx)(e,{...t})})})}},8484:function(e,t,n){"use strict";n.d(t,{D:function(){return h}});var r=n(52322),i=n(29117),o=n(38035),a=n(62614),s=n(74409),l=n(42946),c=n(49929),d=n(5879),u=n(704);let h=e=>{let{navLabel:t=(0,r.jsx)(d.cC,{id:"iH8pgl"}),navIcon:n=l.acZ,onClick:h,options:p,pageTitle:g,pageIcon:m,rightItem:f,centerItem:x,styleProps:b}=e,{goBack:v,navEnabled:_}=(0,u.R)();return(0,r.jsxs)(i.U,{px:4,position:"relative",zIndex:"10",width:"100%",spacing:3,alignItems:"flex",...b,children:[(0,r.jsx)(o.k,{flex:"1",children:_&&(0,r.jsx)(a.z,{size:"sm",leftIcon:(0,r.jsx)(c.G,{icon:n,fixedWidth:!0}),variant:"plain",bg:"white",borderRadius:"md",boxShadow:"sm",border:"none",onClick:()=>{h?h():v(p)},children:t})}),(0,r.jsx)(o.k,{flex:"3",align:"center",justify:"center",children:x||(0,r.jsxs)(i.U,{justifyContent:"center",w:"100%",children:[m&&m,g&&(0,r.jsx)(s.X,{fontWeight:"600",fontSize:{base:"md",sm:"lg",md:"xl"},fontFamily:"p22-mackinac-pro",children:g})]})}),(0,r.jsx)(o.k,{flex:"1",justifyContent:"flex-end",alignItems:"center",children:f})]})}},75258:function(e,t,n){"use strict";n.d(t,{D:function(){return f},x:function(){return x}});var r=n(52322),i=n(75768),o=n(62614),a=n(42946),s=n(49929),l=n(94523),c=n(87254),d=n(2784),u=n(76282),h=n(91994),p=n(7208),g=n(74153),m=n(96933);let f={freeform:{label:()=>c.ag._({id:"Jn5DbR"}),icon:a.elf,description:()=>c.ag._({id:"f15rRF"}),tip:()=>c.ag._({id:"y8DgoV"})},structured:{label:()=>c.ag._({id:"2PPaNm"}),icon:a.s2,description:()=>c.ag._({id:"on9ayD"}),tip:()=>c.ag._({id:"G7ngQL"})}},x=(0,d.memo)(()=>{let[e,t]=(0,g.Ns)("editorMode"),n=(0,h.CG)(u.Vn),{onChangeMode:a}=(0,p.N)(),c=(0,m.i)({base:!1,sm:!0});return(0,r.jsx)(i.h,{isAttached:!0,isDisabled:n,children:Object.entries(f).map(n=>{let[i,{label:d,description:u,icon:h}]=n,p=i===e;return(0,r.jsx)(l.kH,{label:u(),placement:"top",children:(0,r.jsx)(o.z,{size:"sm",leftIcon:c?(0,r.jsx)(s.G,{icon:h,fixedWidth:!0}):void 0,variant:p?"plainSelected":"plain",onClick:()=>{t(i),a()},boxShadow:"none",children:d()})},i)})})});x.displayName="ModeSwitcher"},45760:function(e,t,n){"use strict";n.d(t,{jX:function(){return s},vZ:function(){return a}});var r=n(52322),i=n(2784);let o=i.createContext({});function a(){let e=(0,i.useContext)(o);return e}let s=e=>{let{children:t}=e,n=i.useRef();return(0,r.jsx)(o.Provider,{value:{setEditorInstance:e=>{n.current=e},getEditorInstance:()=>n.current},children:t})}},7208:function(e,t,n){"use strict";n.d(t,{N:function(){return E}});var r=n(52322),i=n(70065),o=n(43297),a=n(28535),s=n(77533),l=n(75768),c=n(62614),d=n(54933),u=n(49929),h=n(87254),p=n(2784),g=n(36528),m=n(54691),f=n(31490),x=n(91994),b=n(6997);let v="\n{{input}}\n\n###\n\nThe text above contains the outline for my presentation. Find the lines that should be slide breaks.\n\nIf the text I give you contains clear slide numbering, always use that to split it up.\nOtherwise, if there are clear section headings, use those.\nIf there is no obvious break, use your best judgement to split the content into slides by subject matter.\n\nRespond with a list of line numbers that represent the start of a new slide. Each line number should be on its own line without the ".concat(">>>"," symbol. For example,\n1\n4\n18\n").trim(),_=new b.u({params:{temperature:.5,model:"gpt-3.5-turbo"},variables:["input"],systemPrompt:"\nI am a slide designer who will be turning a presentation outline into a slide deck. I need your help identifying where the slide boundaries are in the presentation. Respond only with line numbers, each number on its own line.\n".trim(),userPrompt:v});var j=n(76282),C=n(74153);let y=e=>{let t=e.split("\n"),n=1;return t.map(e=>""===e.trim()?e:"".concat(n++).concat(">>>").concat(e)).join("\n")},w=(e,t)=>(t.forEach(t=>{e=e.replace("".concat(t).concat(">>>"),"---\n\n".concat(t).concat(">>>"))}),e),k=e=>{let t=e.split("\n");return t.map(e=>{let t=e.split(">>>");return t.length>1?t[1]:e}).join("\n")},E=()=>{let[e,t]=(0,p.useState)(!1),[n,b]=(0,C.Ns)("editorMode"),v=(0,C.vS)(),E=(0,x.CG)(j.Kd),I=(0,x.CG)(j.MH),S=(0,i.p)(),A=(0,p.useRef)(null),T=(0,x.CG)(j.Vn);(0,p.useEffect)(()=>{T&&A.current&&(S.close(A.current),A.current=null)},[S,T]);let P=(0,p.useCallback)(()=>{let e=(0,x.bh)().getState(),t=(0,j.au)(e),n=t.replace(/\n\n---\n\n/g,"\n\n");v(n);let i=h.ag._({id:"a7V4Kp"}),p=h.ag._({id:"jpA4hO"}),g=h.ag._({id:"9uI/rE"}),m=h.ag._({id:"DPfwMq"}),f=S({render:()=>(0,r.jsxs)(o.K,{p:4,shadow:"lg",borderRadius:"lg",bg:"green.100",spacing:4,direction:{base:"column",md:"row"},children:[(0,r.jsx)(a.xu,{color:"green.600",fontSize:"xl",children:(0,r.jsx)(u.G,{icon:d.fV7})}),(0,r.jsxs)(a.xu,{children:[(0,r.jsx)(s.x,{noOfLines:1,fontWeight:"600",children:i}),(0,r.jsx)(s.x,{fontSize:"xs",noOfLines:1,color:"blackAlpha.800",children:p})]}),(0,r.jsxs)(l.h,{children:[(0,r.jsx)(c.z,{size:"md",variant:"solid",onClick:()=>S.close(f),rightIcon:(0,r.jsx)(u.G,{icon:d.LEp}),children:m}),(0,r.jsx)(c.z,{size:"md",colorScheme:"gray",variant:"ghost",onClick:()=>{v(t),S.close(f)},children:g})]})]}),status:"success",duration:5e3,position:"top",containerStyle:{maxW:"none"}})},[v,S]),N=(0,p.useCallback)(async e=>{let i=(0,f.nZ)(),p=y(e),x=_.prepare({variables:{input:p},interactionId:i}),j=h.ag._({id:"P0CwEw"}),C=S({title:j,status:"loading",duration:1e4,position:"top"}),E=await (0,g.oO)(x),I=await (0,m.I)(E,i,{retries:0});if(!I)throw Error("Response is undefined");let A=I.split("\n").map(e=>parseInt(e)),T=k(w(p,A));console.debug("Splitting cards",{numberedContent:p,resp:I,lineBreaks:A,newContent:T}),S.close(C),v(T),b("structured"),t(!1);let P=h.ag._({id:"0+Fg4H"}),N=h.ag._({id:"YbORTh"}),R=h.ag._({id:"9uI/rE"}),O=h.ag._({id:"DPfwMq"}),D=S({render:()=>(0,r.jsxs)(o.K,{p:4,shadow:"lg",borderRadius:"lg",bg:"green.100",spacing:4,direction:{base:"column",md:"row"},children:[(0,r.jsx)(a.xu,{color:"green.600",fontSize:"xl",children:(0,r.jsx)(u.G,{icon:d.fV7})}),(0,r.jsxs)(a.xu,{children:[(0,r.jsx)(s.x,{noOfLines:1,fontWeight:"600",children:P}),(0,r.jsx)(s.x,{fontSize:"xs",noOfLines:1,color:"blackAlpha.800",children:N})]}),(0,r.jsxs)(l.h,{children:[(0,r.jsx)(c.z,{size:"md",variant:"solid",onClick:()=>S.close(D),rightIcon:(0,r.jsx)(u.G,{icon:d.LEp}),children:O}),(0,r.jsx)(c.z,{size:"md",colorScheme:"gray",variant:"ghost",onClick:()=>{v(e),b(n),S.close(D)},children:R})]})]}),status:"success",duration:5e3,position:"top",containerStyle:{maxW:"none"}})},[n,v,b,S]),R=(0,p.useCallback)(()=>{let e=(0,x.bh)().getState();A.current&&(S.close(A.current),A.current=null);let n=(0,j.Kd)(e);if(!n)return;let i=(0,j.au)(e),d=h.ag._({id:"CObmXw"}),u=h.ag._({id:"+JxrYy"}),p=h.ag._({id:"goXuxS"}),g=h.ag._({id:"6Uau97"});A.current=S({render:()=>(0,r.jsxs)(o.K,{p:4,shadow:"lg",borderRadius:"lg",bg:"trueblue.100",spacing:4,direction:{base:"column",md:"row"},children:[(0,r.jsxs)(a.xu,{children:[(0,r.jsx)(s.x,{noOfLines:1,fontWeight:"600",children:d}),(0,r.jsx)(s.x,{fontSize:"xs",noOfLines:1,color:"blackAlpha.800",children:u})]}),(0,r.jsxs)(l.h,{children:[(0,r.jsx)(c.z,{variant:"solid",size:"md",onClick:()=>{N(i),t(!0),S.close(A.current)},children:p}),(0,r.jsx)(c.z,{variant:"plain",size:"md",onClick:()=>{S.close(A.current)},children:g})]})]}),status:"info",duration:8e3,position:"top"})},[N,S]);return(0,p.useEffect)(()=>()=>{A.current&&(S.close(A.current),A.current=null)},[S]),{addSectionBreaks:N,isAddingBreaks:e,canAddBreaks:E,canRemoveBreaks:I,removeSectionBreaks:P,onChangeMode:R}}},74153:function(e,t,n){"use strict";n.d(t,{Ns:function(){return f},Q_:function(){return m},ex:function(){return p},ip:function(){return g},o7:function(){return h},vS:function(){return x}});var r=n(2784),i=n(45760),o=n(93202),a=n(91994),s=n(86581),l=n(33522),c=n(24551),d=n(14874),u=n(76282);let h=()=>{let e=(0,a.qr)(),t=(0,a.TL)(),[n]=(0,o.NCT)(),i=(0,r.useCallback)(async()=>{var r;let i=(0,u.d_)(e.getState()),o=i.id,a=await n({variables:{docGenerateInputId:o,input:{}}}),s=null===(r=a.data)||void 0===r?void 0:r.updateDocGenerationDraftInput;s&&s.draftInput&&o!==s.draftInput.id&&t((0,u.Gn)(s))},[t,e,n]);return i},p=e=>{var t;let n=(0,a.qr)(),i=(0,a.TL)(),[s]=(0,o.NCT)(),c=(0,r.useCallback)(async e=>{var t;
1let r=(0,u.RB)(n.getState()),o=(0,u.U6)(n.getState());if(!r||!o)return;let{format:a,...l}=e,c={format:a,...l},d=(0,u.br)(n.getState());c.settings&&(c.settings={...d,...c.settings});let h=(0,u.U6)(n.getState()),p=await s({variables:{docGenerateInputId:o,input:c}}),g=null===(t=p.data)||void 0===t?void 0:t.updateDocGenerationDraftInput;g&&g.draftInput&&h!==g.draftInput.id&&i((0,u.Gn)(g))},[i,n,s]),d=(0,l.Kt)(c,null!==(t=null==e?void 0:e.debounce)&&void 0!==t?t:0),h=(0,r.useCallback)(function(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];i((0,u.Zx)(e)),t&&d(e)},[d,i]);return h},g=()=>{let e=p(),t=(0,r.useCallback)(function(t){let n=!(arguments.length>1)||void 0===arguments[1]||arguments[1];e({format:t},n)},[e]),n=(0,a.CG)(u.Lh);return[n,t]},m=()=>{let e=p({debounce:500}),t=(0,r.useCallback)(function(t){let n=!(arguments.length>1)||void 0===arguments[1]||arguments[1];e({prompt:t},n)},[e]),n=(0,a.CG)(u.lb);return[n,t]},f=(e,t)=>{let n=p(t),i=(0,r.useCallback)(function(t){let r=!(arguments.length>1)||void 0===arguments[1]||arguments[1];n({settings:{[e]:t}},r)},[e,n]),o=(0,a.CG)((0,u.Mn)(e));return[o,i]},x=e=>{let t=p(e),{getEditorInstance:n}=(0,i.vZ)(),o=(0,r.useCallback)(function(e){let r=!(arguments.length>1)||void 0===arguments[1]||arguments[1],i=n();if(i){let t=i.editorId===c.C,n=(0,s.c8)(e),r=(0,d.dW)(n,t?"structured":"freeform").content.toJSON();i.commands.setContent(r)}t({content:e},r)},[t,n]);return o}},96796:function(e,t,n){"use strict";n.d(t,{R:function(){return v},d:function(){return b}});var r=n(5632),i=n(2784),o=n(63304),a=n(67496),s=n(28918),l=n(31490),c=n(39122),d=n(93202),u=n(42111),h=n(21733),p=n(50634),g=n(45302);let m=e=>{if(!e)throw Error("Response is undefined");let t=v(e),n=(0,g.jw)(t.locale);return{settings:{tone:t.tone,audience:t.audience,locale:n.key,textAmount:f(t.text_amount,["sm","md","lg"],"md")}}},f=(e,t,n)=>e?t&&!t.includes(e)?n:e:void 0,x=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new URLSearchParams("");return t.generateOutline&&n.append(a.nx,"1"),t.generateSettings&&n.append(a.Cb,"1"),"/generate/".concat(e,"?").concat(n.toString())},b=()=>{let{push:e}=(0,r.useRouter)(),[t,n]=(0,i.useState)(!1),[a]=(0,d.JBp)(),{generate:g}=(0,p.j)("DetermineGenerateSettings",{}),f=(0,i.useCallback)(async(t,r)=>{var i;let d=(0,l.nZ)();n(!0);let p=(0,s.d)(r.content,c.VN),f=await g({variables:{input:p},workspaceId:(0,h.n_)(),interactionId:d}).promise,b=m(f),{settings:v,format:_,...j}=r,C=await a({variables:{input:{workspaceId:(0,h.n_)(),generationType:t,input:{interactionId:d,settings:{...o.zJ,imageProvider:u.VH.get("aiGeneratorDefaultImageProvider"),...b.settings,...v},...j,format:_}}}});n(!1),e(x(null===(i=C.data)||void 0===i?void 0:i.createDocGeneration.id))},[a,e]);return{guessSettings:f,isLoading:t}},v=e=>{let t=e.split("\n"),n={};return t.forEach(e=>{let[t,r]=e.split(": ");t&&r&&(n[t.trim().toLowerCase()]=r.trim())}),n}},67496:function(e,t,n){"use strict";n.d(t,{Cb:function(){return h},HL:function(){return p},nx:function(){return u}});var r=n(9850),i=n.n(r),o=n(5632),a=n(2784),s=n(76282),l=n(93202),c=n(91994),d=n(704);let u="generateOutline",h="generateSettings",p=e=>{let{id:t}=e,n=(0,o.useRouter)(),r=(0,c.TL)(),i=(0,c.qr)(),{goToScreen:u}=(0,d.R)(),[h,p]=(0,a.useState)(!0),[m]=(0,l.UCC)({variables:{id:t}});return(0,a.useEffect)(()=>{n&&i&&m&&m().then(e=>{let{data:t}=e;if(null==t?void 0:t.docGeneration)return t.docGeneration;throw Error("Could not load docGeneration")}).then(e=>{r((0,s.Gn)(g(e))),p(!1)}).catch(()=>{u("createWithAI")})},[r,m,u,n,i]),{isLoading:h}},g=e=>({...e,docGenerateInputs:e.docGenerateInputs.map(m),draftInput:e.draftInput?m(e.draftInput):void 0}),m=e=>{let t=i()(e);return t.settings.textMode||(t.settings.preserveText?t.settings.textMode="preserve":t.settings.textMode="generate",delete t.settings.preserveText),t}},1071:function(e,t,n){"use strict";n.d(t,{Jv:function(){return i},ml:function(){return o}});var r=n(57124);let i=1e4,o=()=>{let e=(0,r.Y)("ai_premium_models");return{maxTokens:e?i:5e3,canUpgrade:!e}}},39122:function(e,t,n){"use strict";n.d(t,{ET:function(){return r},LB:function(){return l},VN:function(){return s},VY:function(){return i},WJ:function(){return o},rj:function(){return a}});let r="/generate",i="ai-generate",o=2,a=2,s=400,l={DESIGNER__HELLO:0,USER__OUTPUT_FORMAT_INPUT:1,DESIGNER__TOPIC:2,USER__TOPIC_INPUT:3,DESIGNER__OUTLINE:4,USER__OUTLINE_INPUT:5}},6912:function(e,t,n){"use strict";n.d(t,{S1:function(){return _},B_:function(){return y},ET:function(){return j}});var r=n(2784),i=n(14274),o=n(88232),a=n(42111),s=n(49152),l=n(44663),c=n(1163),d=n(11050),u=n(90221),h=n(23284),p=n(90383),g=n(87254),m=n(82108),f=n.n(m),x=n(94199);let b=(e,t)=>
1{let n=f()(t);return{[e]:{next:g.ag._({id:"hXzOVo"}),back:g.ag._({id:"iH8pgl"}),nevermind:g.ag._({id:"CKyk7Q"}),goToAccount:g.ag._({id:"C9yTHG",values:{GAMMA_PROPER_NOUN:x.N6}}),getHelp:g.ag._({id:"pWsyuL"}),declineOffer:g.ag._({id:"aIFikE"}),confirmAndCancel:g.ag._({id:"G9nPRC"}),pauseSubscription:g.ag._({id:"2RgEmU"}),cancelSubscription:g.ag._({id:"dEgA5A"}),discountSubscription:g.ag._({id:"qG4Wa/"}),claimOffer:g.ag._({id:"/Gl/RK"}),discountOff:g.ag._({id:"Bdtwnw"}),discountFor:g.ag._({id:"sQv06Y"}),discountForever:g.ag._({id:"FsOOWf"}),discountOneTime:g.ag._({id:"HpXCa4"}),day:g.ag._({id:"5YWExy"}),month:g.ag._({id:"obrMay"}),year:g.ag._({id:"/Tw548"}),error:g.ag._({id:"wTrpxV"}),genericErrorDescription:g.ag._({id:"PUjJ3A"}),cancelNow:g.ag._({id:"EiakwV"}),applyingDiscount:g.ag._({id:"8kSYjw"}),applyingCancel:g.ag._({id:"VpuvNv"}),applyingResume:g.ag._({id:"eIoGiX"}),applyingPause:g.ag._({id:"UD7gOq"}),discountApplied:g.ag._({id:"jdYyiz"}),discountAppliedMessage:g.ag._({id:"DhHX6G"}),pauseApplied:g.ag._({id:"eeITvj"}),pauseAppliedMessage:g.ag._({id:"nm0VaE"}),pauseAppliedResumeMessage:g.ag._({id:"qOe0SS"}),pauseScheduledMessage:g.ag._({id:"mqRc6d"}),until:g.ag._({id:"C51N+0"}),cancelApplied:g.ag._({id:"Wcg6zu"}),cancelAppliedMessage:g.ag._({id:"8vN97Y"}),cancelAppliedDateMessage:g.ag._({id:"BS/SGu"}),howLongToPausePrompt:g.ag._({id:"HLyJ9n"}),whatCouldWeHaveDone:g.ag._({id:"fcbm8H"}),weReadEveryAnswer:g.ag._({id:"nkuKRd"}),applyingCustomerAction:g.ag._({id:"PXwF+s"}),loading:g.ag._({id:"Z3FXyt"}
1),pauseWallCardPunch:g.ag._({id:"iL2TQ6"}),pauseWallCta:g.ag._({id:"TvXj47"}),pauseWallCardHeading:g.ag._({id:"kHm8Fg"}),scheduledToReactivate:g.ag._({id:"aH7vi8"}),resumeApplied:g.ag._({id:"diOgYK"}),resumeAppliedMessage:g.ag._({id:"YqFvUY"}),resumeNextChargeMessage:g.ag._({id:"VDqPUf"}),resumeNextChargeMessageWithoutAmount:g.ag._({id:"RrvVAn"}),resumeAccountDataInfo:g.ag._({id:"dJCJXA"}),subscriptionPauseNotice:g.ag._({id:"fpxliT"}),failedPaymentNotice:g.ag._({id:"Vxg5vO"}),chargedMultipleTimeNotice:g.ag._({id:"lAlv46"}),failedPaymentCardPunch:g.ag._({id:"KEZrHg",values:{GAMMA_PROPER_NOUN:x.N6,productName:n}}),resumeHey:g.ag._({id:"hdOctW"}),invoicePaidTitle:g.ag._({id:"aJGfDL"}),logout:g.ag._({id:"W+3RJN"}),note:g.ag._({id:"ycCSuD"}),discount:g.ag._({id:"HmpVeZ"}),discountNoticeHeadline:g.ag._({id:"5P1dmt"}),discountNoticePrepend:g.ag._({id:"yjadEY"}),discountOverride:g.ag._({id:"JfBDWL"}),discountValidUntil:g.ag._({id:"uXxNua"}),updateBilling:g.ag._({id:"tQilrI"}),extendTrialCTA:g.ag._({id:"m3l7VI"}),extendTrialPunch:g.ag._({i
1d:"s5pINo"}),extendTrialOfferTitle:g.ag._({id:"SyzXYh"}),trialExtended:g.ag._({id:"fezME2"}),trialExtendedMessage:g.ag._({id:"QE4mUs"}),applyingTrialExtension:g.ag._({id:"vI2q9R"}),switchPlanCTA:g.ag._({id:"P2mx2L"}),changePlanHighlights:g.ag._({id:"qbgW+C"}),changePlanOfferPunch:g.ag._({id:"MRkiFP"}),planChanged:g.ag._({id:"ByFtyh"}),planChangedMessage:g.ag._({id:"Pf5z1G"}),applyingPlanChange:g.ag._({id:"9vKKLI"}),surveyStepTag:g.ag._({id:"cSUBI1"}),freeFormStepTag:g.ag._({id:"cSUBI1"}),finalConfirmation:g.ag._({id:"1/oP/N"}),offerDiscountTag:g.ag._({id:"LTgtxG"}),offerChangePlanTag:g.ag._({id:"ENMJv2"}),offerExtendTrialTag:g.ag._({id:"MWKntz"}),offerRedirectTag:g.ag._({id:"cvpAvL"}),offerContactTag:g.ag._({id:"cvpAvL"}),offerPauseTag:g.ag._({id:"+T6DGl"}),completeTag:g.ag._({id:"K5c1e7"}),errorTag:g.ag._({id:"EuvbIW"}),offerAccepted:g.ag._({id:"ZU0opP"})}}},v="\n!function(){ \n if (!window.churnkey || !window.churnkey.created) {\n window.churnkey = { created: true };\n const a = document.createElement('script');\n a.src = 'https://assets.churnkey.co/js/app.js?appId=".concat(i.v.CHURNKEY_APP_ID,"';\n a.async = true;\n const b = document.getElementsByTagName('script')[0];\n b.parentNode.insertBefore(a, b);\n }\n }();\n"),_=()=>{let e=!(0,u.l6)()&&!(0,p.wg)();return(0,h.G)(e,v),null},j=e=>{let{subscription:t,workspace:n,autoLaunch:d=!0}=e,u=(0,a.ye)("churnkeyFailedPaymentWallEnabled"),h=(0,s.l)(),p=(0,c.K9)(n),g=(0,l.G)(),m=(0,r.useCallback)(async()=>{if(t&&p&&u)return(0,o.d6)("churnkey").then(e=>{var n,r;if(!e||!t.billingSubscriptionId||!(null===(n=t.createdByUser)||void 0===n?void 0:n.billingCustomerId)){console.error("[Churnkey] launchFailedPayment Missing hmac or subscription data",{hmac:e,subscription:t});return}console.debug("[Churnkey] launchFailedPayment - launching churnkey with:",{hmac:e,appId:i.v.CHURNKEY_APP_ID,subscriptionId:t.billingSubscriptionId,customerId:null===(r=t.createdByUser)||void 0===r?void 0:r.billingCustomerId}),C({authHash:e,subscription:t,localeKey:h,productKey:p,launchIntercomUI:g})})},[t,p,u,h,g]);return(0,r.useEffect)(()=>{d&&m()},[m,d]),{launchFailedPaymentFlow:m,failedPaymentFlowEnabled:u}},C=async e=>{var t,n;let{authHash:r,subscription:o,localeKey:a,productKey:s,launchIntercomUI:l}=e;null===(n=window.churnkey)||void 0===n||n.check("failed-payment",{subscriptionId:o.billingSubscriptionId,customerId:null===(t=o.createdByUser)||void 0===t?void 0:t.billingCustomerId,authHash:r,customerAttributes:{language:a},i18n:{lang:a,messages:b(a,s)},appId:i.v.CHURNKEY_APP_ID,mode:i.v.CHURNKEY_MODE,provider:"stripe",softWall:!0,forceCheck:!1,gracePeriodDays:3,ignoreInvoicesWithoutAttempt:!1,handleSupportRequest(){var e;l(),d.co.track(d.AA.CHURNKEY_HANDLE_SUPPORT_CLICK,{source:"failed-payment-wall",subscriptionId:o.billingSubscriptionId,customerId:null===(e=o.createdByUser)||void 0===e?void 0:e.billingCustomerId})},async handleCancel(e){var t,n;return d.co.track(d.AA.CANCEL_SUBSCRIPTION_CLICK,{source:"failed-payment-wall",subscriptionId:o.billingSubscriptionId,customerId:null===(t=o.createdByUser)||void 0===t?void 0:t.billingCustomerId}),console.debug("[launchChurnkeyFailedPayment.handleCancel]",{subscriptionId:o.billingSubscriptionId,customerId:null===(n=o.createdByUser)||void 0===n?void 0:n.billingCustomerId,customer:e}),w({authHash:r,subscription:o,localeKey:a,productKey:s,launchIntercomUI:l,customerAttributes:{viaFailedPayment:!0}}).catch(e=>C({authHash:r,subscription:o,localeKey:a,productKey:s,launchIntercomUI:l}))},onFailedPaymentWallActivated(){var e;d.co.track(d.AA.CHURNKEY_FAILED_PAYMENT_WALL_SHOWN,{subscriptionId:o.billingSubscriptionId,customerId:null===(e=o.createdByUser)||void 0===e?void 0:e.billingCustomerId})},onUpdatePaymentInformation(){var e;d.co.track(d.AA.CHURNKEY_PAYMENT_METHOD_UPDATED,{source:"failed-payment-wall",subscriptionId:o.billingSubscriptionId,customerId:null===(e=o.createdByUser)||void 0===e?void 0:e.billingCustomerId})},onFailedPaymentWallClose(){var e;d.co.track(d.AA.CHURNKEY_FAILED_PAYMENT_WALL_CLOSED,{subscriptionId:o.billingSubscriptionId,customerId:null===(e=o.createdByUser)||void 0===e?void 0:e.b
1illingCustomerId})},onCancel(){var e;d.co.track(d.AA.CHURNKEY_CANCEL_SUBSCRIPTION_COMPLETE,{source:"failed-payment-wall",subscriptionId:o.billingSubscriptionId,customerId:null===(e=o.createdByUser)||void 0===e?void 0:e.billingCustomerId})},onError(e,t){console.warn('Churnkey check("failed-payment", ...) error',e,t)}})},y=(e,t)=>{let n=(0,a.ye)("churnkeyCancelFlowEnabled"),i=(0,s.l)(),d=(0,c.K9)(t),u=(0,l.G)(),h=(0,r.useCallback)(()=>{if(e&&d&&n)return(0,o.d6)("churnkey").then(t=>{var n;if(!t||!e.billingSubscriptionId||!(null===(n=e.createdByUser)||void 0===n?void 0:n.billingCustomerId)){console.debug("[Churnkey] handleCancel - Missing hmac or subscription data",{hmac:t,subscription:e});return}return w({authHash:t,subscription:e,localeKey:i,productKey:d,launchIntercomUI:u})})},[n,i,d,e,u]);return{launchCancelFlow:h,cancelFlowEnabled:n}},w=async e=>{let{authHash:t,subscription:n,localeKey:r,productKey:o,customerAttributes:a={},launchIntercomUI:s}=e;return new Promise((e,l)=>{var u,h,p;null===(p=window.churnkey)||void 0===p||p.init("show",{subscriptionId:n.billingSubscriptionId,customerId:null===(u=n.createdByUser)||void 0===u?void 0:u.billingCustomerId,authHash:t,customerAttributes:{language:r,frequency:null===(h=(0,c.OJ)(n))||void 0===h?void 0:h.frequencyUnit,productKey:o,...a},i18n:{lang:r,messages:b(r,o)},appId:i.v.CHURNKEY_APP_ID,mode:i.v.CHURNKEY_MODE,provider:"stripe",record:!0,handleSupportRequest(){var e;s(),d.co.track(d.AA.CHURNKEY_HANDLE_SUPPORT_CLICK,{source:"cancel-flow",subscriptionId:n.billingSubscriptionId,customerId:null===(e=n.createdByUser)||void 0===e?void 0:e.billingCustomerId})},onCancel(e,t,r){var i;d.co.track(d.AA.CHURNKEY_CANCEL_SUBSCRIPTION_COMPLETE,{source:"cancel-flow",subscriptionId:n.billingSubscriptionId,customerId:null===(i=n.createdByUser)||void 0===i?void 0:i.billingCustomerId,surveyResponse:t,freeformFeedback:r}),console.debug("[launchChurnkeyCancelFlow.onCancel]",{surveyResponse:t,freeformFeedback:r})},onGoToAccount(t){console.debug("[launchChurnkeyCancelFlow.onGoToAccount]",{sessionResults:t}),e({sessionResults:t})},onClose(t){if(console.debug("[launchChurnkeyCancelFlow.onClose]",{sessionResults:t}),!t||t.aborted){l("Churnkey cancel flow aborted");return}e({sessionResults:t})},onError(e){console.warn("[launchChurnkeyCancelFlow.onError]",{message:e}),l({message:e})}})})}},18153:function(e,t,n){"use strict";n.d(t,{j:function(){return s}});var r=n(5632),i=n(2784),o=n(82089);let a=e=>{let{queryKey:t}=e;if(!t)return;let{searchParams:n}=new URL(window.location.href);n.delete(t);let r=Object.fromEntries(n.entries());(0,o.lO)({query:r})},s=e=>{let{queryKey:t}=e,{isReady:n}=(0,r.useRouter)();(0,i.useEffect)(()=>{n&&a({queryKey:t})},[n,t])}},48832:function(e,t,n){"use strict";n.d(t,{BK:function(){return C},Dw:function(){return j},Km:function(){return _},dN:function(){return b},p6:function(){return v}});var r=n(87254),i=n(82282),o=n(32361),a=n(96740),s=n(31807),l=n(73871),c=n(57907),d=n(21346),u=n(48053),h=n(1363),p=n(49738),g=n(90535),m=n(9283),f=n(75528);let x={en:c.Z,"pt-br":d.Z,ja:u.Z,"zh-cn":h.Z,"zh-tw":p.Z,es:g.Z,fr:m.Z,ko:f.Z},b=()=>x[r.ag.locale]||void 0,v=(e,t)=>e?(0,i.Z)((0,s.Z)(e),t,{locale:b()}):"",_=(e,t)=>e?(0,a.Z)((0,s.Z)(e),t?(0,s.Z)(t):new Date,{locale:b()}):"",j=e=>e?(0,o.Z)((0,s.Z)(e),{locale:b()}):"",C=e=>e?(0,l.Z)((0,s.Z)(e),new Date,{locale:b(),addSuffix:!0,roundingMethod:"floor"}):""},55001:function(e,t,n){"use strict";n.d(t,{Y:function(){return x}});var r=n(52322),i=n(38035),o=n(17190),a=n(43297),s=n(20437),l=n(28535),c=n(11082),d=n(75009),u=n(74409),h=n(97010),p=n(42822),g=n(44663),m=n(82979);let f=e=>[{category:"Product",items:[{text:"Help",url:m.mc.help},{text:"Change log",url:m.mc.changeLog},{text:"Pricing",url:m.mc.pricing},{text:"Templates",url:m.mc.templates},{text:"Inspiration",url:m.mc.inspiration},{text:"Contact us",onClick:e}]},{category:"Company",items:[{text:"Team",url:m.mc.team},{text:"Terms of Service",url:m.mc.terms},{text:"Privacy Policy",url:m.mc.privacy}]},{category:"Follow us",items:[{text:"Twitter",url:"https://twitter.com/meetgamma"},{text:"Instagram",url:"https://www.instagram.com/meetgamma/"},{text:"LinkedIn",url:"https://www.linkedin.com/company/gamma-app/"},{text:"TikTok",url:"https://www.tiktok.com/@meetgamma"}]}],x=()=>{let e=(0,g.G)(),t=f(e);return(0,r.jsx)(i.k,{fontSize:"12px",bgColor:"#1d0042",color:"gray.400",py:20,id:"footer",justifyContent:"center",children:(0,r.jsx)(o.W,{maxW:"940px",children:(0,r.jsxs)(a.K,{children:[(0,r.jsxs)(s.M,{columns:4,spacing:6,mb:10,minChildWidth:"200px",children:[(0,r.jsx)(l.xu,{w:"100%",children:(0,r.jsx)(c.r,{href:"/",children:(0,r.jsx)(d.E,{src:"https://assets.website-files.com/60de2701a7b28f308f619d3d/60de2701a7b28ff7e9619d49_White%20Logo%20g%20spot.svg",loading:"lazy",width:"120px",alt:"Gamma logo"})})}),t.map((e,t)=>{let{category:n,items:i}=e;return(0,r.jsxs)(l.xu,{w:"100%",children:[(0,r.jsx)(u.X,{marginBottom:"25px",color:"rgba(239, 208, 255, 0.7)",fontWeight:"bold",fontSize:"14px",fontFamily:"var(--body-font)",letterSpacing:"normal",children:n}),(0,r.jsx)(h.QI,{listStyleType:"none",margin:0,children:i.map((e,t)=>{let{text:n,url:i,onClick:o}=e;return(0,r.jsx)(h.HC,{fontSize:"14px",pb:4,children:(0,r.jsx)(c.r,{color:"hsla(0, 0%, 100%, 0.86)",href:i||void 0,onClick:o||void 0,children:n})},t)})})]},t)})]}),(0,r.jsxs)(p.M,{color:"rgba(239, 208, 255, 0.7)",fontSize:"13px",children:["\xa9 ",new Date().getFullYear()," Gamma Tech, Inc."]})]})})})}},18606:function(e,t,n){"use strict";n.d(t,{P:function(){return g}});var r=n(52322),i=n(28535),o=n(43297),a=n(11082),s=n(75009),l=n(36474),c=n(62614),d=n(36651),u={src:"/_next/static/media/gamma-logo-white.9613e68b.svg"},h=n(82979);let p=[{text:"Pricing",url:h.mc.pricing,hideWhenSmall:!0},{text:"Templates",url:h.mc.templates,hideWhenSmall:!0},{text:"Login",url:h.mc.login}],g=e=>{let{headerMode:t="light"}=e,{user:n,isUserLoading:g}=(0,d.SE)(),m="light"===t;return(0,r.jsx)(i.xu,{py:4,px:[6,6,12],h:h.AP,pr:[4,6,12],zIndex:"999",top:["auto","auto","0"],children:(0,r.jsxs)(o.K,{direction:"row",children:[(0,r.jsx)(a.r,{href:"/","aria-current":"page",children:(0,r.jsx)(s.E,{w:"100px",src:m?"https://assets.website-files.com/62e823626cd4fdd0e5dc1527/62e823626cd4fdc26bdc1576_Gamma.svg":u.src,loading:"lazy",alt:"Gamma logo"})}),(0,r.jsx)(l.L,{}),!g&&!n&&(0,r.jsxs)(o.K,{direction:"row",spacing:[4,4,8],fontWeight:"500",fontSize:"14px",color:m?"#3b3a40":"#fff",alignItems:"center",transition:"color 300ms ease",children:[p.map(e=>{let{text:t,url:n,hideWhenSmall:i}=e;return(0,r.jsx)(a.r,{display:i?["none","none","block"]:"block",href:n,color:m?void 0:"whiteAlpha.800",_hover:{color:m?"#000":"whiteAlpha.900",textDecoration:"none"},children:t},t)}),(0,r.jsx)(c.z,{as:a.r,href:h.mc.signup,maxHeight:"32px",borderStyle:"solid",borderWidth:"0.5px",fontSize:"14px",borderColor:"rgba(0, 0, 0, 0.24)",backgroundColor:"#fff",boxShadow:"0 4px 4px 0 rgb(0 0 0 / 5%)",fontWeight:"700",borderRadius:"100px",color:"#3b3a40",_hover:{color:"black",textDecoration:"none"},children:"Try for free"})]})]})})}},82979:function(e,t,n){"use strict";n.d(t,{AP:function(){return i},mc:function(){return r}});let r={pricing:"/pricing",help:"https://help.gamma.app",changeLog:"https://gamma.app/public/Change-Log-awopg3inl2eo3b3",team:"https://gamma.app/public/Meet-the-Team-at-Gamma-nbqgqy05eyfcsbi",terms:"https://gamma.app/terms",privacy:"https://gamma.app/privacy",login:"/signin",signup:"/signup",templates:"/templates",inspiration:"/inspiration"},i=16},7454:function(e,t,n){"use strict";n.d(t,{i:function(){return s}});var r=n(62202),i=n(15193),o=n(94523);let a={colors:o.qZ.colors,zIndices:{tooltip:5600,modal:1800,dropdown:1600},fonts:{body:"'Eudoxus Sans', sans-serif",heading:"'p22-mackinac-pro', sans-serif"},fontSizes:{xxs:"11px"},components:{Link:{baseStyle:{textDecoration:"none"}},Button:{variants:{fancy:{color:"white",borderRadius:"full",background:"linear-gradient(180deg, #6850FF 0%, rgba(38, 59, 227, 0) 100%), linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 100%), linear-gradient(272.9deg, #003DD9 0.18%, #6850FF 109.19%, #DF7A6C 188.8%)",border:"1px solid rgba(255, 255, 255, 0.12)",_hover:{background:"linear-gradient(180deg, #3A24C2 0%, rgba(38, 59, 227, 0) 100%), linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 100%), linear-gradient(272.9deg, #002C9D 0.18%, #6850FF 109.19%, #DF7A6C 188.8%, #A56057 224.56%)"},_active:{boxShadow:"inset 1px 1px 5px rgb(0 0 0 / 50%)",background:"linear-gradient(180deg, #3A24C2 0%, rgba(38, 59, 227, 0) 100%), linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 100%), linear-gradient(272.9deg, #002C9D 0.18%, #6850FF 109.19%, #DF7A6C 188.8%, #A56057 224.56%)"},textDecoration:"none !important"}}},Heading:{baseStyle:{letterSpacing:"-0.04em"},variants:{fancy:{backgroundImage:o.qZ.colors.gradient["blue-to-purple"],backgroundClip:"text",color:"transparent"}}}}},s=(0,r.B1)(a,(0,i.A)({colorScheme:"trueblue"}))},17283:function(e,t,n){"use strict";n.d(t,{o8:function(){return o},vt:function(){return i}});var r=n(14274);let i=r.v.NEXT_PUBLIC_GA_ID,o=e=>{var t,n;null===(t=(n=window).gtag)||void 0===t||t.call(n,"config",i,{page_path:e})}},25944:function(e,t,n){"use strict";n.d(t,{bf:function(){return m},iZ:function(){return p},lh:function(){return h},wK:function(){return g}});var r=n(2784),i=n(42111),o=n(91994),a=n(47968),s=n(90604),l=n(56400),c=n(99268);let d=e=>Math.random()<=1/e;class u{setupProvider(){this.t1SetupProvider||(this.t1SetupProvider=performance.now())}downloadDoc(){this.t2DownloadDoc||(this.t2DownloadDoc=performance.now())}onCreate(){this.t3OnCreate||(this.t3OnCreate=performance.now())}report(){return null===this.t1SetupProvider||null===this.t2DownloadDoc||null===this.t3OnCreate?null:{downloadDoc:this.t2DownloadDoc-this.t1SetupProvider,onCreate:this.t3OnCreate-this.t2DownloadDoc}}constructor(){this.t1SetupProvider=null,this.t2DownloadDoc=null,this.t3OnCreate=null}}let h=(e,t)=>{let n=(0,o.CG)(a.Pw),i=(0,r.useRef)(n);(0,r.useEffect)(()=>{i.current=n},[n]),(0,r.useEffect)(()=>
1{if(e)return window.addEventListener("keydown",n,!0),()=>{window.removeEventListener("keydown",n,!0)};function n(e){let n=e.target.closest(".ProseMirror");if(!n||!i.current||!d(t))return;let r=performance.now();requestAnimationFrame(()=>{let t=e.key;" "===t&&(t="Space");let n=performance.now()-r;(0,c.EF)({...(0,l.H)(),key:t,duration:n})})}},[e,i,t])},p=()=>{let e=(0,i.ye)("rumSampleRate");(0,r.useEffect)(()=>{(0,c._k)(e)},[e])},g=e=>{let t=(0,r.useCallback)(t=>{let{isFullscreen:n=!1}=t;if(!e)return;let r=performance.now();requestAnimationFrame(()=>{requestAnimationFrame(()=>{let e=performance.now()-r;(0,c.gG)({...(0,l.H)(),toMode:s.q.SLIDE_VIEW,duration:e,isFullscreen:n})})})},[e]),n=(0,r.useCallback)(t=>{let{isFullscreen:n=!1}=t;if(!e)return;let r=performance.now();requestAnimationFrame(()=>{requestAnimationFrame(()=>{let e=performance.now()-r;(0,c.gG)({...(0,l.H)(),toMode:s.q.DOC_VIEW,duration:e,isFullscreen:n})})})},[e]);return{recordExitSlideModePerformance:n,recordEnterSlideModePerformance:t}},m=()=>{let[e]=(0,r.useState)(()=>new u),t=(0,r.useCallback)(()=>{e.setupProvider()},[e]),n=(0,r.useCallback)(()=>{e.downloadDoc()},[e]),i=(0,r.useCallback)(()=>{e.onCreate();let t=e.report();if(null===t){console.warn("[HoneycombDocLoadTimer] failed to generate doc timings");return}(0,c.Py)({...(0,l.H)(),duration:t.onCreate}),(0,c.aZ)({...(0,l.H)(),duration:t.downloadDoc})},[e]);return{timeOnCreate:i,timeOnSetupProvider:t,timeOnDownloadDoc:n}}},89311:function(e,t,n){"use strict";n.d(t,{l:function(){return s}});var r=n(5632),i=n(2784),o=n(7e4),a=n(88640);let s=()=>{let{pathname:e,isReady:t}=(0,r.useRouter)(),n=(0,i.useRef)(!1),[s,l]=(0,o.X)(a.H.lastHomeUrl,"/");(0,i.useEffect)(()=>{if(n.current||!t)return;let r="/inspiration"===e||"/templates"===e?e:"/";l(r),n.current=!0},[l,t,e])}},62040:function(e,t,n){"use strict";n.d(t,{n:function(){return s}});var r=n(62564),i=n(2784),o=n(14274),a=n(42111);let s=e=>{let t=(0,a.ye)("debugLogging");(0,i.useEffect)(()=>{if(e){if(t){console.debug("[Prosemirror DevTools] Activating prosemirror-dev-tools");try{(0,r.h)(e.view)}catch(e){}}else(0,r.P)();return o.v.DEBUG_ENABLED&&(window.openPMDT=()=>(0,r.h)(e.view)),()=>{(0,r.P)(),delete window.openPMDT}}},[e,t])}},6085:function(e,t,n){"use strict";n.d(t,{m:function(){return c}});var r=n(72338),i=n(27191),o=n(37160),a=n(86581),s=n(18455),l=n(87008);let c=r.hj.create({name:"clipboardLight",addCommands:()=>({insertMarkdownAt:(e,t)=>n=>{let{state:r,tr:i}=n;try{let n=(0,a.aT)(t,r.schema);return i.replaceRange(e.from,e.to,n),!0}catch(e){return console.warn("(caught) [Clipboard] insertMarkdownAt error",e),!1}}}),addProseMirrorPlugins(){let e=this.editor;return[new i.Sy({key:new i.H$("clipboardLight"),props:{clipboardSerializer:{serializeFragment:t=>(0,l.Xb)(t,e.schema)},handlePaste:(t,n,r)=>(0,a.iO)(e,n)||(0,o.g)(t,n,r),transformPastedHTML:e=>(0,s.B)(e,!0)}})]}})},7603:function(e,t,n){"use strict";n.d(t,{o:function(){return a}});var r=n(89220),i=n(2784),o=n(36651);let a=()=>{let{push:e}=(0,r.useRouter)(),{userStatus:t}=(0,o.SE)();(0,i.useEffect)(()=>{"loggedOut"===t&&e("/signin?redirect_to=".concat(encodeURIComponent(window.location.href)))},[t,e])}},99450:function(e,t,n){"use strict";n.r(t);var r=n(52322),i=n(71537),o=n(86236),a=n(49197),s=n(14581),l=n(7603);t.default=(0,i.z)((0,o.oO)((0,s.$)(()=>((0,l.o)(),(0,r.jsx)(a.L,{})))))},90439:function(e,t,n){"use strict";n.d(t,{Oj:function(){return s},Pv:function(){return a},QX:function(){return o},cx:function(){return i}});var r=n(14274);let i=r.v.GAMMA_PUPPETEER_SERVICE,o=i&&"pptx"===window.format,a=i&&"pdf"===window.format,s=i&&"screenshot"===window.format},7e4:function(e,t,n){"use strict";n.d(t,{X:function(){return o}});var r=n(2784),i=n(18733);function o(e,t){let[n,o]=(0,r.useState)(()=>{try{let n=i.Q.getItem(e);if(null===n)return t;return JSON.parse(n)}catch(e){return console.error("[useSessionStorage.getItem] Error getting sessionStorage item",e),t}}),a=(0,r.useCallback)(t=>{try{i.Q.setItem(e,JSON.stringify(t)),o(t)}catch(e){console.error("[useSessionStorage.setItem] Error setting sessionStorage item",e)}},[e]);return[n,a]}},62376:function(){},6991:function(){},76298:function(){},4466:function(){},43839:function(){},52518:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});var r=null}},function(e){e.O(0,[9774,7662,8433,2182,2812,8774,6694,4078,3273,9025,5333,4424,8707,146,3661,3016,2545,9808,5112,3693,931,2808,4328,7603,2252,1537,6656,2681,7174,2888,179],function(){return e(e.s=36027)}),_N_E=e.O()}]); 2//# sourceMappingURL=paste-3b8508abbddcc77f.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.