1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6439],{97805:function(e,t,o){"use strict";var n=o(85893),i=o(67294),l=o(5434),r=o(98997),a=o.n(r),s=o(97816),d=o(58109),c=o(65995),u=o(43484);let g=e=>{var t;let[o,r]=(0,i.useState)(!1),[g,p]=(0,i.useState)(null!==(t=e.keywords)&&void 0!==t?t:""),m=(0,i.useRef)(null);return(0,i.useEffect)(()=>{var t;p(null!==(t=e.keywords)&&void 0!==t?t:"")},[e.keywords]),(0,n.jsxs)("div",{className:"flex items-center justify-center relative gap-3",style:{...e.style},children:[!e.hideRegenerate&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"relative group/regenbutton ".concat(e.regenBtnClassName?e.regenBtnClassName:""),children:[(0,n.jsx)("button",{className:"p-1 ".concat((null==e?void 0:e.isRegenerating)?"bg-shade-dark":""),type:"button",onClick:e.onClick,children:(0,n.jsx)(l.Ffb,{className:"text-2xl ".concat(e.isRegenerating?"text-black":e.v2?"text-butternut-orange":"text-white")})}),(0,n.jsxs)("div",{className:"hidden group-hover/regenbutton:block absolute z-10 px-8 py-1 bg-[#ededed] rounded-md ring-[0.5] ring-slate-100 text-gray-700 whitespace-nowrap normal-case ".concat((null==e?void 0:e.regenTooltipDirection)==="bottom-right"?"-bottom-9 left-0":(null==e?void 0:e.regenTooltipDirection)==="bottom-left"?"-bottom-9 right-0":(null==e?void 0:e.regenTooltipDirection)==="top-left"?"-top-9 right-0":"-top-9 left-0"),children:[e.regenBtnText||"Regenerate",(0,n.jsx)("div",{className:"bg-[#ededed] w-2.5 h-2.5 rotate-[45deg] absolute ".concat((null==e?void 0:e.regenTooltipDirection)==="bottom-right"?"-top-1 left-2":(null==e?void 0:e.regenTooltipDirection)==="bottom-left"?"-top-1 right-2":(null==e?void 0:e.regenTooltipDirection)==="top-left"?"-bottom-1 right-2":"-bottom-1 left-2")})]})]}),e.v2&&(0,n.jsx)(s.Su,{})]}),!!e.onAddKeywordHandler&&(0,n.jsxs)("div",{className:"relative group/commentbutton ".concat(e.commentBtnClassName?e.commentBtnClassName:""),children:[(0,n.jsx)("button",{ref:m,onClick:t=>{var o;t.stopPropagation(),t.preventDefault(),r(e=>!e),null==e||null===(o=e.setAddingKeywords)||void 0===o||o.call(e,e=>!e)},className:"flex p-1 ".concat(""," relative"),type:"button",children:(0,n.jsx)(s.J_,{className:"text-2xl ".concat(e.v2?"text-butternut-orange":"text-white")})}),o&&(0,n.jsx)(d.Z,{targetRef:m,alignCenter:!0,offset:{left:-120,top:-20},children:(0,n.jsx)("div",{style:{display:o?"flex":"none",...e.addKeywordStyle},className:"".concat(o?a().keywordsContainer:""," \n [&_*]:!z-[100000] z-[100000] relative ").concat(a().keywordsStaticContainer),onClick:e=>e.stopPropagation(),children:(0,n.jsxs)("div",{style:{backgroundColor:"#fff",padding:"10px 20px",width:"100%",borderRadius:6,position:"relative",boxShadow:"0px 25px 60px 0px rgba(0, 0, 0, 0.08)"},children:[(0,n.jsx)("p",{className:"font-lato",style:{color:"#131332",textAlign:"left",paddingRight:"10px",fontWeight:700,marginBottom:"5px"},children:e.isImg?"Describe your image for AI to generate":"Add comments for text you want"}),(0,n.jsx)("div",{style:{position:"absolute",top:8,right:10},children:(0,n.jsx)("button",{className:"plainButton",onClick:()=>{var t;r(!1),null==e||null===(t=e.setAddingKeywords)||void 0===t||t.call(e,!1)},children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:[(0,n.jsx)("path",{d:"M18 6L6 18",stroke:"black",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M6 6L18 18",stroke:"black",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})})}),(0,n.jsx)(c.g,{name:"keywords",placeholder:e.isImg?"E.g., cozy cafe interior, warm lighting, minimal style":"E.g., Make it more friendly and add pricing details",value:g,onChange:e=>p(e.target.value),className:"min-h-[84px] resize-none border-[#090909] focus-visible:ring-[#090909]"}),(0,n.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",marginTop:20,columnGap:10,position:"relative"},children:[(0,n.jsx)(u.z,{type:"button",variant:"outline",disabled:!0,onClick:()=>{var t,o;null===(t=e.onAddKeywordHandler)||void 0===t||t.call(e,""),p(""),r(!1),null==e||null===(o=e.setAddingKeywords)||void 0===o||o.call(e,!1)},children:"Remove"}),(0,n.jsx)(u.z,{type:"button",className:"bg-[#4E47FF] text-white hover:bg-[#3f38e6]",onClick:()=>{var t,o;null===(t=e.onAddKeywordHandler)||void 0===t||t.call(e,g),r(!1),null==e||null===(o=e.setAddingKeywords)||void 0===o||o.call(e,!1)},children:"Add"})]})]})})}),(0,n.jsxs)("div",{className:"hidden group-hover/commentbutton:block absolute z-10 px-8 py-1 bg-[#ededed] rounded-md ring-[0.5] ring-slate-100 text-gray-700 whitespace-nowrap normal-case -translate-x-1/2 lg:translate-x-0 ".concat((null==e?void 0:e.commentTooltipDirection)==="bottom-right"?"-bottom-9 left-1/2 lg:left-0":(null==e?void 0:e.commentTooltipDirection)==="bottom-left"?"-bottom-9 right-1/2 lg:right-0":(null==e?void 0:e.commentTooltipDirection)==="top-left"?"-top-9 right-1/2 lg:right-0":"-top-9 left-1/2 lg:left-0"),children:[e.commentBtnText||(e.isImg?"Regenerate Image with new keywords":"Regenerate with comments"),(0,n.jsx)("div",{className:"bg-[#ededed] w-2.5 h-2.5 rotate-[45deg] absolute -translate-x-1/2 lg:translate-x-0 ".concat((null==e?void 0:e.commentTooltipDirection)==="bottom-right"?"-top-1 left-1/2 lg:left-2":(null==e?void 0:e.commentTooltipDirection)==="bottom-left"?"-top-1 right-1/2 lg:right-2":(null==e?void 0:e.commentTooltipDirection)==="top-left"?"-bottom-1 right-1/2 lg:right-2":"-bottom-1 left-1/2 lg:left-2")})]})]})]})};t.Z=g},59714:function(e,t,o){"use strict";var n=o(85893);o(67294);var i=o(89583);let l=e=>(0,n.jsxs)("div",{className:"relative group/uploadbutton ".concat(e.className?e.className:""),children:[(0,n.jsx)("button",{className:"flex p-1",type:"button",style:e.style,onClick:e.onClick,children:(0,n.jsx)(i.DUB,{size:20,className:"text-2xl ".concat(e.v2?"text-butternut-orange":"text-white")})})," ",(0,n.jsxs)("div",{className:"hidden group-hover/uploadbutton:block absolute z-10 px-8 py-1 bg-[#ededed] rounded-md ring-[0.5] ring-slate-100 text-gray-700 whitespace-nowrap normal-case ".concat((null==e?void 0:e.tooltipDirection)==="bottom-right"?"-bottom-9 left-0":(null==e?void 0:e.tooltipDirection)==="bottom-left"?"-bottom-9 right-0":(null==e?void 0:e.tooltipDirection)==="top-left"?"-top-9 right-0":"-top-9 left-0"),children:[e.btntext||"Upload",(0,n.jsx)("div",{className:"bg-[#ededed] w-2.5 h-2.5 rotate-[45deg] absolute ".concat((null==e?void 0:e.tooltipDirection)==="bottom-right"?"-top-1 left-2":(null==e?void 0:e.tooltipDirection)==="bottom-left"?"-top-1 right-2":(null==e?void 0:e.tooltipDirection)==="top-left"?"-bottom-1 right-2":"-bottom-1 left-2")})]})]});t.Z=l},58109:function(e,t,o){"use strict";var n=o(85893),i=o(59429),l=o(67294),r=o(73935);let a=()=>{let[e,t]=(0,l.useState)({width:window.innerWidth,height:window.innerHeight});return(0,l.useEffect)(()=>{let e=(0,i.Ds)(()=>{t({width:window.innerWidth,height:window.innerHeight})});return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]),e},s=e=>{var t,o;
1let{targetRef:i,targetElement:s,children:d,render:c,alignCenter:u=!1,offset:g={top:0,left:0}}=e,[p,m]=(0,l.useState)(null),h=a(),f={top:null!==(t=g.top)&&void 0!==t?t:0,left:null!==(o=g.left)&&void 0!==o?o:0},[v,w]=(0,l.useState)({top:0,left:0});return((0,l.useEffect)(()=>{let e=(null==i?void 0:i.current)||s;if(!e)return;let t=e.getBoundingClientRect(),o=t.bottom+window.scrollY+f.top,n=h.width<=768,l=n?h.width/2:(u?t.left+window.scrollX+t.width/2:t.left+window.scrollX)+f.left;w({top:o,left:l})},[i,s,h,u,f.top,f.left]),(0,l.useEffect)(()=>{let e=document.createElement("div");return document.body.appendChild(e),m(e),()=>{document.body.removeChild(e)}},[]),p)?(0,n.jsxs)(n.Fragment,{children:[!!s&&s,(0,r.createPortal)((0,n.jsx)("div",{style:{position:"absolute",top:v.top,left:v.left},children:c?c(v):d}),p)]}):null};t.Z=s},97816:function(e,t,o){"use strict";o.d(t,{J_:function(){return r},Su:function(){return i},_7:function(){return l}});var n=o(85893);let i=()=>(0,n.jsx)("svg",{width:"2",height:"18",viewBox:"0 0 2 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{id:"Vector 77",d:"M1 1V17",stroke:"black",strokeOpacity:"0.11",strokeWidth:"2",strokeLinecap:"round"})}),l=()=>(0,n.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("path",{d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",stroke:"#FF8156",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M12 8V16",stroke:"#FF8156",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M8 12H16",stroke:"#FF8156",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),r=e=>{let{className:t,color:o="#FF8156"}=e;return(0,n.jsxs)("svg",{className:t,width:"18",height:"18",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("path",{d:"M16 0L18.4308 6.56918L25 9L18.4308 11.4308L16 18L13.5692 11.4308L7 9L13.5692 6.56918L16 0Z",fill:o}),(0,n.jsx)("path",{d:"M6 11L7.62054 15.7444L12 17.5L7.62054 19.2556L6 24L4.37946 19.2556L0 17.5L4.37946 15.7444L6 11Z",fill:o})]})}},59429:function(e,t,o){"use strict";o.d(t,{Ds:function(){return a},FX:function(){return function e(t){var o={};for(var n in t)if(t.hasOwnProperty(n)){if("object"==typeof t[n]&&null!==t[n]){var i=e(t[n]);for(var l in i)i.hasOwnProperty(l)&&(o[n+"."+l]=i[l])}else o[n]=t[n]}return o}},U2:function(){return d},e$:function(){return c},jv:function(){return s},mg:function(){return r},q7:function(){return l}});var n=o(98005),i=o.n(n);let l=async e=>{let t=t=>t instanceof File?t:new File([t],e.name,{type:t.type||e.type,lastModified:Date.now()}),o="image/png"===e.type||"image/webp"===e.type?"image/webp":"image/jpeg",n=(o,n)=>new Promise((l,r)=>{new(i())(e,{quality:o,resize:"contain",maxWidth:1920,maxHeight:1920,mimeType:n,..."image/png"===e.type&&"image/jpeg"===n?{convertTypes:["image/png"],convertSize:0}:{},success:e=>l(t(e)),error:e=>r(e)})});if(e.size<=1048576){let t=URL.createObjectURL(e);return[t,e]}let l=1048576/e.size,r=null,a=.35,s=.95,d=Math.min(.95,Math.max(.35,Math.sqrt(l))),c=await n(d,o);c.size>=.98*e.size&&"image/png"===e.type&&(c=await n(d,"image/jpeg")),c.size<=1048576?(r=c,a=d):s=d;for(let t=0;t<7&&s-a>.02;t++){let t=(a+s)/2,i=await n(t,o);i.size>=.98*e.size&&"image/png"===e.type&&(i=await n(t,"image/jpeg")),i.size<=1048576?(r=i,a=t):s=t}let u=null!=r?r:await n(.35,o);u.size>=.98*e.size&&"image/png"===e.type&&(u=await n(.35,"image/jpeg"));let g=URL.createObjectURL(u);return[g,u]},r=(e,t)=>o=>o>=e&&o<=t,a=function(e){let t,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:300;return function(){for(var n=arguments.length,i=Array(n),l=0;l<n;l++)i[l]=arguments[l];clearTimeout(t),t=setTimeout(()=>{e(...i)},o)}},s=e=>{try{return new URL(e),!0}catch(e){return!1}},d=(e,t,o)=>{if(!e)return o;let n=t.replace(/\[(\w+)\]/g,".$1.").split(".").filter(Boolean),i=n.reduce((e,t)=>e&&e[t],e);return void 0===i?o:i},c=(e,t)=>!!e&&void 0!==d(e,t)},98997:function(e){e.exports={regenBtnDropdown:"RegenerateBtn_regenBtnDropdown__060S_",regenCancelBtn:"RegenerateBtn_regenCancelBtn__9QwmR",keywordsContainer:"RegenerateBtn_keywordsContainer__5_cW9",keywordsStaticContainer:"RegenerateBtn_keywordsStaticContainer__Xf0Lf"}}}]);
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.