1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="045fc8d9-6ce5-de8e-47d0-393ee6fd11bf")}catch(e){}}(); 2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,158524,e=>{"use strict";let t=(0,e.i(475254).default)("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);e.s(["Link2",0,t],158524)},286536,675016,e=>{"use strict";let t=(0,e.i(475254).default)("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Eye",0,t],286536);let{entries:a,setPrototypeOf:n,isFrozen:i,getPrototypeOf:r,getOwnPropertyDescriptor:s}=Object,{freeze:l,seal:o,create:c}=Object,{apply:d,construct:p}="u">typeof Reflect&&Reflect;l||(l=function(e){return e}),o||(o=function(e){return e}),d||(d=function(e,t){for(var a=arguments.length,n=Array(a>2?a-2:0),i=2;i<a;i++)n[i-2]=arguments[i];return e.apply(t,n)}),p||(p=function(e){for(var t=arguments.length,a=Array(t>1?t-1:0),n=1;n<t;n++)a[n-1]=arguments[n];return new e(...a)});let m=T(Array.prototype.forEach),u=T(Array.prototype.lastIndexOf),h=T(Array.prototype.pop),x=T(Array.prototype.push),f=T(Array.prototype.splice),g=T(String.prototype.toLowerCase),b=T(String.prototype.toString),y=T(String.prototype.match),v=T(String.prototype.replace),N=T(String.prototype.indexOf),w=T(String.prototype.trim),k=T(Object.prototype.hasOwnProperty),_=T(RegExp.prototype.test),j=(K=TypeError,function(){for(var e=arguments.length,t=Array(e),a=0;a<e;a++)t[a]=arguments[a];return p(K,t)});function T(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var a=arguments.length,n=Array(a>1?a-1:0),i=1;i<a;i++)n[i-1]=arguments[i];return d(e,t,n)}}function S(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:g;n&&n(e,null);let r=t.length;for(;r--;){let n=t[r];if("string"==typeof n){let e=a(n);e!==n&&(i(t)||(t[r]=e),n=e)}e[n]=!0}return e}function C(e){let t=c(null);for(let[n,i]of a(e))k(e,n)&&(Array.isArray(i)?t[n]=function(e){for(let t=0;t<e.length;t++)k(e,t)||(e[t]=null);return e}(i):i&&"object"==typeof i&&i.constructor===Object?t[n]=C(i):t[n]=i);return t}function A(e,t){for(;null!==e;){let a=s(e,t);if(a){if(a.get)return T(a.get);if("function"==typeof a.value)return T(a.value)}e=r(e)}return function(){return null}}let E=l(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),D=l(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),O=l(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),R=l(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),L=l(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),I=l(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),M=l(["#text"]),z=l(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","
2spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),P=l(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),U=l(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),F=l(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),B=o(/\{\{[\w\W]*|[\w\W]*\}\}/gm),H=o(/<%[\w\W]*|[\w\W]*%>/gm),$=o(/\$\{[\w\W]*/gm),q=o(/^data-[\-\w.\u00B7-\uFFFF]+$/),G=o(/^aria-[\-\w]+$/),W=o(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Y=o(/^(?:\w+script|data):/i),V=o(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),J=o(/^html$/i);var K,X=Object.freeze({__proto__:null,ARIA_ATTR:G,ATTR_WHITESPACE:V,CUSTOM_ELEMENT:o(/^[a-z][.\w]*(-[.\w]+)+$/i),DATA_ATTR:q,DOCTYPE_NAME:J,ERB_EXPR:H,IS_ALLOWED_URI:W,IS_SCRIPT_OR_DATA:Y,MUSTACHE_EXPR:B,TMPLIT_EXPR:$});let Q=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let a=null,n="data-tt-policy-suffix";t&&t.hasAttribute(n)&&(a=t.getAttribute(n));let i="dompurify"+(a?"#"+a:"");try{return e.createPolicy(i,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+i+" could not be created."),null}},Z=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};var ee=function e(){let t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"u"<typeof window?null:window,i=t=>e(t);if(i.version="3.3.3",i.removed=[],!n||!n.document||9!==n.document.nodeType||!n.Element)return i.isSupported=!1,i;let{document:r}=n,s=r,o=s.currentScript,{DocumentFragment:d,HTMLTemplateElement:p,Node:T,Element:B,NodeFilter:H,NamedNodeMap:$=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:q,DOMParser:G,trustedTypes:Y}=n,V=B.prototype,K=A(V,"cloneNode"),ee=A(V,"remove"),et=A(V,"nextSibling"),ea=A(V,"childNodes"),en=A(V,"parentNode");if("function"==typeof p){let e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let ei="",{implementation:er,createNodeIterator:es,createDocumentFragment:el,getElementsByTagName:eo}=r,{importNode:ec}=s,ed=Z();i.isSupported="function"==typeof a&&"function"==typeof en&&er&&void 0!==er.createHTMLDocument;let{MUSTACHE_EXPR:ep,ERB_EXPR:em,TMPLIT_EXPR:eu,DATA_ATTR:eh,ARIA_ATTR:ex,IS_SCRIPT_OR_DATA:ef,ATTR_WHITESPACE:eg,CUSTOM_ELEMENT:eb}=X,{IS_ALLOWED_URI:ey}=X,ev=null,eN=S({},[...E,...D,...O,...L,...M]),ew=null,ek=S({},[...z,...P,...U,...F]),e_=Object.seal(c(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}}
2)),ej=null,eT=null,eS=Object.seal(c(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),eC=!0,eA=!0,eE=!1,eD=!0,eO=!1,eR=!0,eL=!1,eI=!1,eM=!1,ez=!1,eP=!1,eU=!1,eF=!0,eB=!1,eH=!0,e$=!1,eq={},eG=null,eW=S({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),eY=null,eV=S({},["audio","video","img","source","image","track"]),eJ=null,eK=S({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),eX="http://www.w3.org/1998/Math/MathML",eQ="http://www.w3.org/2000/svg",eZ="http://www.w3.org/1999/xhtml",e0=eZ,e1=!1,e2=null,e5=S({},[eX,eQ,eZ],b),e3=S({},["mi","mo","mn","ms","mtext"]),e4=S({},["annotation-xml"]),e6=S({},["title","style","font","a","script"]),e7=null,e8=["application/xhtml+xml","text/html"],e9=null,te=null,tt=r.createElement("form"),ta=function(e){return e instanceof RegExp||e instanceof Function},tn=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!te||te!==e){if(e&&"object"==typeof e||(e={}),e=C(e),e9="application/xhtml+xml"===(e7=-1===e8.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE)?b:g,ev=k(e,"ALLOWED_TAGS")?S({},e.ALLOWED_TAGS,e9):eN,ew=k(e,"ALLOWED_ATTR")?S({},e.ALLOWED_ATTR,e9):ek,e2=k(e,"ALLOWED_NAMESPACES")?S({},e.ALLOWED_NAMESPACES,b):e5,eJ=k(e,"ADD_URI_SAFE_ATTR")?S(C(eK),e.ADD_URI_SAFE_ATTR,e9):eK,eY=k(e,"ADD_DATA_URI_TAGS")?S(C(eV),e.ADD_DATA_URI_TAGS,e9):eV,eG=k(e,"FORBID_CONTENTS")?S({},e.FORBID_CONTENTS,e9):eW,ej=k(e,"FORBID_TAGS")?S({},e.FORBID_TAGS,e9):C({}),eT=k(e,"FORBID_ATTR")?S({},e.FORBID_ATTR,e9):C({}),eq=!!k(e,"USE_PROFILES")&&e.USE_PROFILES,eC=!1!==e.ALLOW_ARIA_ATTR,eA=!1!==e.ALLOW_DATA_ATTR,eE=e.ALLOW_UNKNOWN_PROTOCOLS||!1,eD=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,eO=e.SAFE_FOR_TEMPLATES||!1,eR=!1!==e.SAFE_FOR_XML,eL=e.WHOLE_DOCUMENT||!1,ez=e.RETURN_DOM||!1,eP=e.RETURN_DOM_FRAGMENT||!1,eU=e.RETURN_TRUSTED_TYPE||!1,eM=e.FORCE_BODY||!1,eF=!1!==e.SANITIZE_DOM,eB=e.SANITIZE_NAMED_PROPS||!1,eH=!1!==e.KEEP_CONTENT,e$=e.IN_PLACE||!1,ey=e.ALLOWED_URI_REGEXP||W,e0=e.NAMESPACE||eZ,e3=e.MATHML_TEXT_INTEGRATION_POINTS||e3,e4=e.HTML_INTEGRATION_POINTS||e4,e_=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ta(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(e_.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ta(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(e_.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(e_.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),eO&&(eA=!1),eP&&(ez=!0),eq&&(ev=S({},M),ew=c(null),!0===eq.html&&(S(ev,E),S(ew,z)),!0===eq.svg&&(S(ev,D),S(ew,P),S(ew,F)),!0===eq.svgFilters&&(S(ev,O),S(ew,P),S(ew,F)),!0===eq.mathMl&&(S(ev,L),S(ew,U),S(ew,F))),k(e,"ADD_TAGS")||(eS.tagCheck=null),k(e,"ADD_ATTR")||(eS.attributeCheck=null),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?eS.tagCheck=e.ADD_TAGS:(ev===eN&&(ev=C(ev)),S(ev,e.ADD_TAGS,e9))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?eS.attributeCheck=e.ADD_ATTR:(ew===ek&&(ew=C(ew)),S(ew,e.ADD_ATTR,e9))),e.ADD_URI_SAFE_ATTR&&S(eJ,e.ADD_URI_SAFE_ATTR,e9),e.FORBID_CONTENTS&&(eG===eW&&(eG=C(eG)),S(eG,e.FORBID_CONTENTS,e9)),e.ADD_FORBID_CONTENTS&&(eG===eW&&(eG=C(eG)),S(eG,e.ADD_FORBID_CONTENTS,e9)),eH&&(ev["#text"]=!0),eL&&S(ev,["html","head","body"]),ev.table&&(S(ev,["tbody"]),delete ej.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw j('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw j('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ei=(t=e.TRUSTED_TYPES_POLICY).createHTML("")}else void 0===t&&(t=Q(Y,o)),null!==t&&"string"==typeof ei&&(ei=t.createHTML(""));l&&l(e),te=e}},ti=S({},[...D,...O,...R]),tr=S({},[...L,...I]),ts=function(e){let t=en(e);t&&t.tagName||(t={namespaceURI:e0,tagName:"template"});let a=g(e.tagName),n=g(t.tagName);return!!e2[e.namespaceURI]&&(e.namespaceURI===eQ?t.namespaceURI===eZ?"svg"===a:t.namespaceURI===eX?"svg"===a&&("annotation-xml"===n||e3[n]):!!ti[a]:e.namespaceURI===eX?t.namespaceURI===eZ?"math"===a:t.namespaceURI===eQ?"math"===a&&e4[n]:!!tr[a]:e.namespaceURI===eZ?(t.
2namespaceURI!==eQ||!!e4[n])&&(t.namespaceURI!==eX||!!e3[n])&&!tr[a]&&(e6[a]||!ti[a]):"application/xhtml+xml"===e7&&!!e2[e.namespaceURI])},tl=function(e){x(i.removed,{element:e});try{en(e).removeChild(e)}catch(t){ee(e)}},to=function(e,t){try{x(i.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){x(i.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(ez||eP)try{tl(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},tc=function(e){let a=null,n=null;if(eM)e="<remove></remove>"+e;else{let t=y(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===e7&&e0===eZ&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");let i=t?t.createHTML(e):e;if(e0===eZ)try{a=new G().parseFromString(i,e7)}catch(e){}if(!a||!a.documentElement){a=er.createDocument(e0,"template",null);try{a.documentElement.innerHTML=e1?ei:i}catch(e){}}let s=a.body||a.documentElement;return(e&&n&&s.insertBefore(r.createTextNode(n),s.childNodes[0]||null),e0===eZ)?eo.call(a,eL?"html":"body")[0]:eL?a.documentElement:s},td=function(e){return es.call(e.ownerDocument||e,e,H.SHOW_ELEMENT|H.SHOW_COMMENT|H.SHOW_TEXT|H.SHOW_PROCESSING_INSTRUCTION|H.SHOW_CDATA_SECTION,null)},tp=function(e){return e instanceof q&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof $)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},tm=function(e){return"function"==typeof T&&e instanceof T};function tu(e,t,a){m(e,e=>{e.call(i,t,a,te)})}let th=function(e){let t=null;if(tu(ed.beforeSanitizeElements,e,null),tp(e))return tl(e),!0;let a=e9(e.nodeName);if(tu(ed.uponSanitizeElement,e,{tagName:a,allowedTags:ev}),eR&&e.hasChildNodes()&&!tm(e.firstElementChild)&&_(/<[/\w!]/g,e.innerHTML)&&_(/<[/\w!]/g,e.textContent)||7===e.nodeType||eR&&8===e.nodeType&&_(/<[/\w]/g,e.data))return tl(e),!0;if(!(eS.tagCheck instanceof Function&&eS.tagCheck(a))&&(!ev[a]||ej[a])){if(!ej[a]&&tf(a)&&(e_.tagNameCheck instanceof RegExp&&_(e_.tagNameCheck,a)||e_.tagNameCheck instanceof Function&&e_.tagNameCheck(a)))return!1;if(eH&&!eG[a]){let t=en(e)||e.parentNode,a=ea(e)||e.childNodes;if(a&&t){let n=a.length;for(let i=n-1;i>=0;--i){let n=K(a[i],!0);n.__removalCount=(e.__removalCount||0)+1,t.insertBefore(n,et(e))}}}return tl(e),!0}return e instanceof B&&!ts(e)||("noscript"===a||"noembed"===a||"noframes"===a)&&_(/<\/no(script|embed|frames)/i,e.innerHTML)?(tl(e),!0):(eO&&3===e.nodeType&&(t=e.textContent,m([ep,em,eu],e=>{t=v(t,e," ")}),e.textContent!==t&&(x(i.removed,{element:e.cloneNode()}),e.textContent=t)),tu(ed.afterSanitizeElements,e,null),!1)},tx=function(e,t,a){if(eT[t]||eF&&("id"===t||"name"===t)&&(a in r||a in tt))return!1;if(eA&&!eT[t]&&_(eh,t));else if(eC&&_(ex,t));else if(eS.attributeCheck instanceof Function&&eS.attributeCheck(t,e));else if(!ew[t]||eT[t]){if(!(tf(e)&&(e_.tagNameCheck instanceof RegExp&&_(e_.tagNameCheck,e)||e_.tagNameCheck instanceof Function&&e_.tagNameCheck(e))&&(e_.attributeNameCheck instanceof RegExp&&_(e_.attributeNameCheck,t)||e_.attributeNameCheck instanceof Function&&e_.attributeNameCheck(t,e))||"is"===t&&e_.allowCustomizedBuiltInElements&&(e_.tagNameCheck instanceof RegExp&&_(e_.tagNameCheck,a)||e_.tagNameCheck instanceof Function&&e_.tagNameCheck(a))))return!1}else if(eJ[t]);else if(_(ey,v(a,eg,"")));else if(("src"===t||"xlink:href"===t||"href"===t)&&"script"!==e&&0===N(a,"data:")&&eY[e]);else if(eE&&!_(ef,v(a,eg,"")));else if(a)return!1;return!0},tf=function(e){return"annotation-xml"!==e&&y(e,eb)},tg=function(e){tu(ed.beforeSanitizeAttributes,e,null);let{attributes:a}=e;if(!a||tp(e))return;let n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ew,forceKeepAttr:void 0},r=a.length;for(;r--;){let{name:s,namespaceURI:l,value:o}=a[r],c=e9(s),d="value"===s?o:w(o);if(n.attrName=c,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,tu(ed.uponSanitizeAttribute,e,n),d=n.attrValue,eB&&("id"===c||"name"===c)&&(to(s,e),d="user-content-"+d),eR&&_(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,d)||"attributename"===c&&y(d,"href")){to(s,e);continue}if(n.forceKeepAttr)continue;if(!n.keepAttr||!eD&&_(/\/>/i,d)){to(s,e);continue}eO&&m([ep,em,eu],e=>{d=v(d,e," ")});let p=e9(e.nodeName);if(!tx(p,c,d)){to(s,e);continue}if(t&&"object"==typeof Y&&"function"==typeof Y.getAttributeType)if(l);else switch(Y.getAttributeType(p,c)){case"TrustedHTML":d=t.createHTML(d);break;case"TrustedScriptURL":d=t.createScriptURL(d)}if(d!==o)try{l?e.setAttributeNS(l,s,d):e.setAttribute(s,d),tp(e)?tl(e):h(i.removed)}catch(t){to(s,e)}}tu(ed.afterSanitizeAttributes,e,null)},tb=function e(t){let a=null,n=td(t);for(tu(ed.beforeSanitizeShadowDOM,t,null);a=n.nextNode();)tu(ed.uponSanitizeShadowNode,a,null),th(a),tg(a),a.content instanceof d&&e(a.content);tu(ed.afterSanitizeShadowDOM,t,null)};return i.sanitize=function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,l=null,o=null;if((e1=!e)&&(e="<!-->"),"string"!=typeof e&&!tm(e))if("function"==typeof e.toString){if("string"!=typeof(e=e.toString()))throw j("dirty is not a string, aborting")}else throw j("toString is not a function");if(!i.isSupported)return e;if(eI||tn(a),i.removed=[],"string"==typeof e&&(e$=!1),e$){if(e.nodeName){let t=e9(e.nodeName);if(!ev[t]||ej[t])throw j("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof T)1===(r=(n=tc("<!---->")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!ez&&!eO&&!eL&&-1===e.indexOf("<"))return t&&eU?t.createHTML(e):e;if(!(n=tc(e)))return ez?null:eU?ei:""}n&&eM&&tl(n.firstChild);let c=td(e$?e:n);for(;l=c.nextNode();)th(l),tg(l),l.content instanceof d&&tb(l.content);if(e$)return e;if(ez){if(eP)for(o=el.call(n.ownerDocument);n.firstChild;)o.appendChild(n.firstChild);else o=n;return(ew.shadowroot||ew.shadowrootmode)&&(o=ec.call(s,o,!0)),o}let p=eL?n.outerHTML:n.innerHTML;return eL&&ev["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&_(J,n.ownerDocument.doctype.name)&&(p="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+p),eO&&m([ep,em,eu],e=>{p=v(p,e," ")}),t&&eU?t.createHTML(p):p},i.setConfig=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};tn(e),eI=!0}
2,i.clearConfig=function(){te=null,eI=!1},i.isValidAttribute=function(e,t,a){return te||tn({}),tx(e9(e),e9(t),a)},i.addHook=function(e,t){"function"==typeof t&&x(ed[e],t)},i.removeHook=function(e,t){if(void 0!==t){let a=u(ed[e],t);return -1===a?void 0:f(ed[e],a,1)[0]}return h(ed[e])},i.removeHooks=function(e){ed[e]=[]},i.removeAllHooks=function(){ed=Z()},i}();e.s(["sanitizeHtml",0,function(e){return ee.sanitize(e,{USE_PROFILES:{html:!0}})}],675016)},440160,e=>{"use strict";let t=(0,e.i(475254).default)("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);e.s(["Download",0,t],440160)},253254,503559,52731,825045,919568,157520,836253,640962,483040,238827,e=>{"use strict";e.s(["OnePagerDialog",()=>$,"OnePagerPreview",()=>B,"onePagerToHtml",()=>H],253254);var t=e.i(843476),a=e.i(271645),n=e.i(846696),i=e.i(519455),r=e.i(776639),s=e.i(475254);let l=(0,s.default)("FileImage",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"10",cy:"12",r:"2",key:"737tya"}],["path",{d:"m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22",key:"wt3hpn"}]]);e.s(["FileImage",0,l],503559);var o=e.i(16715),c=e.i(174886),d=e.i(440160);let p=(0,s.default)("Library",[["path",{d:"m16 6 4 14",key:"ji33uf"}],["path",{d:"M12 6v14",key:"1n7gus"}],["path",{d:"M8 8v12",key:"1gg7y9"}],["path",{d:"M4 4v16",key:"6qkkli"}]]),m=/\bmodex\b/i,u=/\b(attendance|attendee|signal|likely)\b/i;function h(e){var t;let a;return{...e,publicContext:!(a=(t=e.publicContext).trim())||m.test(a)&&u.test(a)?"":t.trim()}}e.s([],483040);var x=e.i(487486),f=e.i(515288),g=e.i(110204),b=e.i(793479),y=e.i(514764),v=e.i(286536),N=e.i(263488),w=e.i(63209);function k(e){return`<div style="white-space:pre-wrap;font-family:Arial,sans-serif;line-height:1.5;">${e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}</div>`}function _(e,t){let a=e.trim();if(!a)return{source:"plain_text",html:k("")};if(a.startsWith("<"))return{source:"html",html:e};if(a.startsWith("{")||a.startsWith("["))try{let e=JSON.parse(a);if(e&&"object"==typeof e&&"string"==typeof e.headline&&"string"==typeof e.subheadline)return{source:"json_one_pager",html:H(e,t)};return{source:"json_unknown",html:k(a)}}catch{return{source:"json_invalid",html:k(a)}}return{source:"plain_text",html:k(a)}}function j(e){let t=e.pendingJobs>0||e.processingJobs>0,a=e.selectedVersion<e.latestVersion,n=t||a,i=n&&(!e.previewMode||!e.acknowledgedGuard),r=null;return a?r=`Version ${e.selectedVersion} is older than latest version ${e.latestVersion}.`:t&&(r="New generation jobs are still in queue for this account."),{hasQueueInFlight:t,isOutdatedVersion:a,requiresGuard:n,guardBlocksSend:i,warningMessage:r}}function T(e){return Math.max(0,Math.min(100,Math.round(e)))}function S(e,t){return t.reduce((t,a)=>t+ +!!a.test(e),0)}e.s(["resolveGeneratedContentRendering",()=>_],52731),e.s(["buildSendGuardState",0,j],825045);let C=[{campaignType:"trade_show",items:[{id:"clear_value_prop",label:"Value prop is explicit in first section",required:!0},{id:"account_specific_proof",label:"Includes account-specific signal or proof",required:!0},{id:"cta_specific",label:"CTA specifies next step and timeframe",required:!0},{id:"compliance_checked",label:"Claims reviewed for compliance risk",required:!0},{id:"deliverability_checked",label:"Deliverability checks complete",required:!0}]},{campaignType:"outbound",items:[{id:"clear_value_prop",label:"Value prop is explicit in first section",required:!0},{id:"account_specific_proof",label:"Includes account-specific signal or proof",required:!0},{id:"cta_specific",label:"CTA specifies next step and timeframe",required:!0},{id:"deliverability_checked",label:"Deliverability checks complete",required:!0},{id:"compliance_checked",label:"Claims reviewed for compliance risk",required:!1}]},{campaignType:"default",items:[{id:"clear_value_prop",label:"Value prop is explicit in first section",required:!0},{id:"account_specific_proof",label:"Includes account-specific signal or proof",required:!0},{id:"cta_specific",label:"CTA specifies next step and timeframe",required:!0}
2,{id:"compliance_checked",label:"Claims reviewed for compliance risk",required:!0},{id:"deliverability_checked",label:"Deliverability checks complete",required:!0}]}];function A({campaignType:e,accountName:n,content:i,initialCompleted:r,onSaved:s}){let l=(0,a.useMemo)(()=>{var t,a,s,l;let o,c,d,p,m,u,h,x,f,g,b,y,v,N,w,k,_,j,A,E,D,O,R,L;return o=(a=(t={campaignType:e,completedItemIds:r,content:i,accountName:n}).campaignType)?C.find(e=>e.campaignType===a)??C.find(e=>"default"===e.campaignType):C.find(e=>"default"===e.campaignType),c=(t.completedItemIds??[]).filter(e=>o.items.some(t=>t.id===e)),_=Array.from(new Set([...c,...k=t.content?.trim()&&t.accountName?.trim()?(s=t.content,l=t.accountName,m=T(((p=(d=(s||"").toLowerCase()).split(/\s+/).filter(Boolean).length)>=90&&p<=450?72:52)+10*S(d,[/\b(overview|summary|next step|timeline|implementation|outcome)\b/,/\b(1\.|2\.|3\.|- )/])),u=l.trim().toLowerCase(),h=T(40+25*S(d,[RegExp(`\\b${u.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`),/\b(you|your team|your facility|your network)\b/])),x=T(35+30*S(d,[/\b(book|schedule|confirm|reply|meet|call)\b/,/\b(this week|next week|15-minute|30-minute)\b/])),f=T(10+30*S(d,[/\b(guarantee|guaranteed|risk-free|no risk|promise)\b/,/\b(always|never fail|instant)\b/])),g=T(10+35*S(d,[/\b(free!!!|click here now|act now|urgent)\b/,/(https?:\/\/\S+.*https?:\/\/\S+)/])),b=T(.3*m+.25*h+.25*x+(100-f)*.1+(100-g)*.1),y=[],v=[],m<60&&(y.push("low_clarity"),v.push("Tighten structure with a short summary and explicit next steps.")),h<60&&(y.push("low_personalization"),v.push("Reference account-specific context and operator-relevant language.")),x<60&&(y.push("weak_cta"),v.push("Add a concrete CTA with a specific action and timeframe.")),f>=50&&(y.push("compliance_risk"),v.push("Remove absolute claims and unsupported guarantees.")),g>=50&&(y.push("deliverability_risk"),v.push("Reduce spam-like phrasing and limit excessive links/urgent language.")),w=[],(N={score:b,scores:{clarity:m,personalization:h,cta_strength:x,compliance_risk:f,deliverability_risk:g},flags:y,fixes:v,blockedByThreshold:b<60}).scores.clarity>=60&&w.push("clear_value_prop"),N.scores.personalization>=60&&w.push("account_specific_proof"),N.scores.cta_strength>=60&&w.push("cta_specific"),N.scores.compliance_risk<50&&w.push("compliance_checked"),N.scores.deliverability_risk<50&&w.push("deliverability_checked"),w):[]])),j=o.items.filter(e=>e.required),A=new Set(_),D={complete:0===(E=j.filter(e=>!A.has(e.id)).map(e=>e.id)).length,requiredComplete:j.length-E.length,requiredTotal:j.length,missingRequired:E},O=new Set(c),R=new Set(k),L=new Set(_),{template:o,...D,completedItemIds:_,autoCompletedItemIds:k,items:o.items.map(e=>{let t=O.has(e.id),a=R.has(e.id),n="missing";return t&&a?n="manual+automatic":t?n="manual":a&&(n="automatic"),{...e,completed:L.has(e.id),source:n}})}},[n,e,i,r]);return(0,a.useEffect)(()=>{s?.(l.completedItemIds)},[s,l.completedItemIds]),(0,t.jsxs)("div",{className:"space-y-2 rounded-md border p-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("p",{className:"text-sm font-semibold",children:"Automated QA Policy"}),(0,t.jsxs)("p",{className:`text-xs ${l.complete?"text-emerald-700":"text-amber-700"}`,children:[l.requiredComplete,"/",l.requiredTotal," required complete"]})]}),(0,t.jsx)("div",{className:"space-y-1",children:l.items.map(e=>(0,t.jsxs)("label",{className:"flex items-center gap-2 text-xs",children:[(0,t.jsx)("input",{type:"checkbox",checked:e.completed,disabled:!0,readOnly:!0}),(0,t.jsx)("span",{children:e.label}),e.required?(0,t.jsx)("span",{className:"text-amber-700",children:"required"}):null,"automatic"===e.source?(0,t.jsx)("span",{className:"text-emerald-700",children:"auto"}):null,"manual"===e.source?(0,t.jsx)("span",{className:"text-sky-700",children:"manual"}):null,"manual+automatic"===e.source?(0,t.jsx)("span",{className:"text-sky-700",children:"manual + auto"}):null]},e.id))}),(0,t.jsx)("p",{className:"text-[11px] text-muted-foreground",children:"Send eligibility is evaluated automatically from content quality, account specificity, CTA strength, and risk checks."})]})}e.s(["ContentQaChecklistPanel",0,A],919568);
2let E={trade_show:65,outbound:70,expansion:60,default:65};function D(e){return e?E[e]??E.default:E.default}e.s(["getRecipientReadinessFloor",0,D],157520);let O="2026-05-account-command-center-v1",R="scorecard_reply";function L(e){return`If useful, I can send the 1-page Yard Network scorecard for ${e} with the operator-version context.`}async function I(e){try{await fetch("/api/agent-actions/telemetry",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}catch{}}async function M(e,t={}){return I({event:"workflow_metric",metric:e,...t})}e.s(["COLD_OUTBOUND_PROMPT_POLICY_VERSION",0,O,"DEFAULT_CTA_MODE",0,R,"getOnePagerSuggestedNextStep",0,L,"isLegacyColdAsset",0,function(e,t){if(!["one_pager","outreach_sequence","email","cold_hook"].includes(t))return!1;if(!e||"object"!=typeof e)return!0;let a=e.prompt_policy_version,n=e.cta_mode;return a!==O||"string"!=typeof n}],836253),e.s(["recordWorkflowEvent",0,I,"recordWorkflowMetric",0,M],640962);var z=e.i(675016);function P({accountName:e,generatedContentId:s,generatedContent:l,queueState:o,recipients:c,initialSelectedRecipientIds:d,onSuccess:p,open:m,onOpenChange:u,trigger:h}){let[k,T]=(0,a.useState)(!1),[S,C]=(0,a.useState)([]),E=`yard network scorecard for ${e}`,[L,U]=(0,a.useState)(E),[F,B]=(0,a.useState)(!1),[H,$]=(0,a.useState)(!1),[q,G]=(0,a.useState)(!1),[W,Y]=(0,a.useState)(!1),[V,J]=(0,a.useState)(!1),[K,X]=(0,a.useState)(0),[Q,Z]=(0,a.useState)(null),ee=void 0!==m?m:k,et=u||T,ea=_(l.content,e).html,en=l.version??1,ei=o?.latestVersion??en,er=j({selectedVersion:en,latestVersion:ei,pendingJobs:o?.pendingJobs??0,processingJobs:o?.processingJobs??0,previewMode:F,acknowledgedGuard:!0}),es=l.quality,el=(es?.score??100)<60,eo=D(l.campaign_type),ec=l.prompt_policy_version??O,ed=l.cta_mode??R,ep=l.legacy_policy??ec!==O,em=(0,a.useMemo)(()=>[...c].sort((e,t)=>(t.readiness?.score??0)-(e.readiness?.score??0)).map(e=>e.id),[c]),eu=c.filter(e=>{let t=e.readiness;return!t||(!q||"high"===t.tier)&&(!W||!t.stale)});(0,a.useEffect)(()=>{ee&&(C(d?.length?d:em),U(E),B(!1),J(!1),X(0),Z(null),I({event:"asset_send_dialog_opened",accountName:e,status:l.legacy_policy?"legacy":"current",message:l.cta_mode??R}),M("send_from_account_rate",{accountName:e,action:"asset_send",status:l.legacy_policy?"legacy":"current",value:1}),(d?.length??0)>0&&M("agent_recipient_accept_rate",{accountName:e,action:"asset_send",value:d?.length??0,count:d?.length??0}))},[e,E,l.cta_mode,l.legacy_policy,d,ee,em]);let eh=async()=>{if(0===S.length)return void n.toast.error("Select at least one recipient");$(!0);try{let t=await fetch("/api/email/send-bulk",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accountName:e,recipients:c.filter(e=>S.includes(e.id)).map(t=>({to:t.email,personaId:t.id,personaName:t.name,accountName:e,readinessScore:t.readiness?.score,readinessTier:t.readiness?.tier,stale:t.readiness?.stale})),subject:L,bodyHtml:ea,generatedContentId:s})});if(!t.ok){let e=await t.json().catch(()=>({})),a="INVALID_PAYLOAD"===e.code?[...e.details?.formErrors??[],...Object.entries(e.details?.fieldErrors??{}).flatMap(([e,t])=>Array.isArray(t)?t.map(t=>`${e}: ${t}`):[])][0]:e.skipped?.[0]?`${e.skipped[0].to}: ${e.skipped[0].reason}`:e.message;throw Error(a??e.error??`Send failed: ${t.statusText}`)}let a=await t.json();Z(a),I({event:"asset_send_completed",accountName:e,status:"success",message:`${a.sent} sent`}),M("preview_to_send_rate",{accountName:e,action:"asset_send",status:"success",value:a.sent,count:a.total}),M("clicks_to_send",{accountName:e,action:"asset_send",status:"success",value:K}),ep&&M("legacy_asset_send_rate",{accountName:e,action:"asset_send",status:"legacy",value:a.sent}),n.toast.success(`Sent to ${a.sent} recipient(s)`),p?.(a)}catch(t){I({event:"asset_send_completed",accountName:e,status:"error",message:t instanceof Error?t.message:"unknown error"}),n.toast.error(`Send error: ${t instanceof Error?t.message:"Unknown error"}`)}finally{$(!1)}},ex=S.length,ef=c.filter(e=>S.includes(e.id)),eg=ef.filter(e=>(e.readiness?.score??0)<eo).length,eb=ef.filter(e=>e.canonicalStatus&&"resolved"!==e.canonicalStatus).length,ey=ef.filter(e=>!!e.readiness?.stale).length,ev=S.length>0&&S.length===eu.length,eN=0===ex?"Select at least one recipient.":null;return(0,t.jsxs)(r.Dialog,{open:ee,onOpenChange:et,children:[h&&(0,t.jsx)(r.DialogTrigger,{asChild:!0,children:h}),(0,t.jsx)(r.DialogContent,{className:"max-h-[90vh] max-w-2xl overflow-hidden p-0",children:(0,t.jsxs)("div",{className:"flex h-full max-h-[90vh] flex-col",children:[(0,t.jsxs)(r.DialogHeader,{className:"shrink-0 border-b px-6 py-4",children:[(0,t.jsx)(r.DialogTitle,{children:"Send Asset"}),(0,t.jsxs)(r.DialogDescription,{children:["Preview and send this content to selected recipients at ",e]})]}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto px-6 py-5",children:(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)(f.Card,{children:[(0,t.jsxs)(f.CardHeader,{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(f.CardTitle,{className:"text-base",children:"Content Preview"}),(0,t.jsxs)(i.Button,{variant:"outline",size:"sm",onClick:()=>B(!F),children:[(0,t.jsx)(v.Eye,{className:"mr-2 h-4 w-4"}),F?"Hide":"Show"," Preview"]})]}),(0,t.jsxs)(f.CardDescription,{children:["Version ",l.version||
21," ⢠Provider: ",l.provider_used||"unknown"]})]}),(0,t.jsxs)(f.CardContent,{children:[(0,t.jsxs)("div",{className:"mb-3 grid grid-cols-2 gap-2 text-xs text-muted-foreground",children:[(0,t.jsxs)("div",{className:"rounded-md border p-2",children:["Quality Score: ",es?.score??"n/a"]}),(0,t.jsxs)("div",{className:"rounded-md border p-2",children:["Threshold: ",60]}),(0,t.jsxs)("div",{className:"rounded-md border p-2",children:["Readiness floor: ",eo]}),(0,t.jsxs)("div",{className:"rounded-md border p-2",children:["CTA mode: ",ed.replaceAll("_"," ")]})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-xs",children:[(0,t.jsxs)(x.Badge,{variant:"outline",children:["Policy ",ec]}),ep?(0,t.jsx)(x.Badge,{variant:"secondary",children:"Legacy CTA policy"}):(0,t.jsx)(x.Badge,{variant:"default",children:"Cold-safe CTA policy"}),l.checklist?(0,t.jsxs)(x.Badge,{variant:"outline",children:["Advisory checklist ",l.checklist.requiredComplete,"/",l.checklist.requiredTotal]}):null]})]}),F&&(0,t.jsx)(f.CardContent,{children:(0,t.jsx)("div",{className:"rounded-lg border bg-slate-50 p-4",children:(0,t.jsx)("div",{className:"prose prose-sm max-w-none dark:prose-invert",dangerouslySetInnerHTML:{__html:(0,z.sanitizeHtml)(ea)}})})})]}),er.requiresGuard&&(0,t.jsx)("div",{className:"rounded-lg border border-amber-200 bg-amber-50 p-3",children:(0,t.jsxs)("p",{className:"text-sm text-amber-800",children:[er.warningMessage," ","This is a warning only."]})}),el&&(0,t.jsx)("div",{className:"rounded-lg border border-red-200 bg-red-50 p-3",children:(0,t.jsxs)("p",{className:"text-sm text-red-800",children:["Quality score is below the advisory threshold (",es?.score??"n/a"," / ",60,")."]})}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(g.Label,{className:"text-sm font-medium",children:"Subject Line"}),(0,t.jsx)(b.Input,{value:L,onChange:e=>U(e.target.value),placeholder:"Email subject"})]}),(0,t.jsxs)(f.Card,{children:[(0,t.jsx)(f.CardHeader,{children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)(f.CardTitle,{className:"text-base",children:["Recipients (",ex,")"]}),(0,t.jsxs)(x.Badge,{variant:"outline",children:[ex," selected"]})]})}),(0,t.jsx)(f.CardContent,{className:"space-y-3",children:0===c.length?(0,t.jsxs)("div",{className:"flex items-center gap-2 rounded-lg bg-amber-50 p-3",children:[(0,t.jsx)(w.AlertCircle,{className:"h-4 w-4 text-amber-600"}),(0,t.jsx)("p",{className:"text-sm text-amber-700",children:"No recipients found. Add personas to this account first."})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2 border-b pb-3",children:[(0,t.jsx)("input",{type:"checkbox",id:"select-all",checked:ev,onChange:e=>{(X(e=>e+1),e.target.checked)?C(eu.map(e=>e.id)):C([])},className:"h-4 w-4 rounded border-slate-300 text-primary focus:ring-primary"}),(0,t.jsxs)(g.Label,{htmlFor:"select-all",className:"cursor-pointer font-medium",children:["Select all ",eu.length," recipients"]})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2 border-b pb-3 text-xs",children:[(0,t.jsxs)(i.Button,{type:"button",variant:"outline",size:"sm",className:"h-7 px-2",onClick:()=>{X(e=>e+1),C(em)},children:["Select All (",em.length,")"]}),(0,t.jsx)(i.Button,{type:"button",variant:"outline",size:"sm",className:"h-7 px-2",onClick:()=>{X(e=>e+1),C([])},children:"Clear Selection"}),(0,t.jsx)("span",{className:"text-muted-foreground",children:"All recipients with email are preselected. Use filters only if you want to narrow the send set."})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-4 border-b pb-3 text-xs",children:[(0,t.jsxs)("label",{className:"flex items-center gap-2",children:[(0,t.jsx)("input",{type:"checkbox",checked:q,onChange:e=>{X(e=>e+1),G(e.target.checked)}}),"Show high confidence only"]}),(0,t.jsxs)("label",{className:"flex items-center gap-2",children:[(0,t.jsx)("input",{type:"checkbox",checked:W,onChange:e=>{X(e=>e+1),Y(e.target.checked)}}),"Hide stale"]})]}),(0,t.jsx)("div",{className:"space-y-2 max-h-64 overflow-y-auto",children:eu.map(a=>(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("input",{type:"checkbox",id:`recipient-${a.id}`,checked:S.includes(a.id),onChange:e=>{var t,n;return t=a.id,n=e.target.checked,void(X(e=>e+1),n?C([...S,t]):C(S.filter(e=>e!==t)))}
2,className:"h-4 w-4 rounded border-slate-300 text-primary focus:ring-primary"}),(0,t.jsxs)(g.Label,{htmlFor:`recipient-${a.id}`,className:"cursor-pointer flex-1",children:[(0,t.jsx)("span",{className:"font-medium",children:a.name}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground ml-2",children:a.email}),a.title&&(0,t.jsxs)("span",{className:"text-xs text-muted-foreground ml-2",children:["(",a.title,")"]}),a.readiness?(0,t.jsxs)("span",{className:"ml-2 inline-flex items-center gap-1 text-xs",children:[(0,t.jsxs)("span",{className:a.readiness.score>=eo?"text-emerald-700":"text-red-700",children:["Readiness ",a.readiness.score," (",a.readiness.tier,")"]}),a.readiness.stale?(0,t.jsx)("span",{className:"text-amber-700",children:"stale"}):null]}):null,a.canonicalStatus&&"resolved"!==a.canonicalStatus?(0,t.jsxs)("span",{className:"ml-2 inline-flex items-center gap-1 text-xs text-red-700",children:["Canonical ",a.canonicalStatus]}):null,a.canonicalBlockedReason?(0,t.jsx)("span",{className:"ml-2 text-xs text-red-700",children:a.canonicalBlockedReason}):null]}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)(i.Button,{type:"button",variant:"outline",size:"sm",className:"h-6 px-2 text-[10px]",onClick:()=>{X(e=>e+1),C(e=>e.filter(e=>e!==a.id)),(0,n.toast)("Recipient deferred")},children:"Defer"}),(0,t.jsx)(i.Button,{type:"button",variant:"outline",size:"sm",className:"h-6 px-2 text-[10px]",onClick:()=>(0,n.toast)("Use Contacts workspace to replace this contact."),children:"Replace Contact"}),(0,t.jsx)(i.Button,{type:"button",variant:"outline",size:"sm",className:"h-6 px-2 text-[10px]",onClick:()=>window.open(`/contacts?account=${encodeURIComponent(e)}`,"_blank"),children:"Open Contacts"})]})]},a.id))})]})})]}),(0,t.jsxs)("div",{className:"rounded-lg border bg-muted/30 p-3 text-xs",children:[(0,t.jsx)("p",{className:"font-medium text-foreground",children:"Pre-send validation"}),(0,t.jsxs)("p",{className:"mt-1 text-muted-foreground",children:["Recipients selected: ",ex," · Selected below advisory readiness floor: ",eg," · Selected with canonical warnings: ",eb," · Selected stale: ",ey]}),(0,t.jsx)(i.Button,{type:"button",variant:"ghost",size:"sm",className:"mt-2 h-7 px-2 text-xs",onClick:()=>J(e=>!e),children:V?"Hide advisory detail":"View advisory detail"}),eN?(0,t.jsx)("p",{className:"mt-1 text-amber-700",children:eN}):(0,t.jsx)("p",{className:"mt-1 text-emerald-700",children:"Warnings are advisory only. Send is user-controlled."}),V&&s?(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(A,{generatedContentId:s,campaignType:l.campaign_type,accountName:e,content:l.content,initialCompleted:l.checklist_completed_item_ids})}):null]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(i.Button,{variant:"outline",onClick:()=>et(!1),disabled:H,children:"Cancel"}),(0,t.jsx)(i.Button,{onClick:eh,disabled:0===ex||H,className:"flex-1",children:H?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(N.Mail,{className:"mr-2 h-4 w-4 animate-pulse"}),"Sending..."]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(y.Send,{className:"mr-2 h-4 w-4"}),"Send to ",ex," Recipient",1!==ex?"s":""]})})]}),Q&&(0,t.jsxs)("div",{className:"rounded-lg border bg-muted/30 p-3 text-sm",children:[(0,t.jsxs)("p",{className:"font-medium",children:["Send result: ",Q.sent," sent, ",Q.failed," failed, ",Q.total," total."]}),(Q.skipped?.length??0)>0&&(0,t.jsxs)("p",{className:"mt-1 text-xs text-muted-foreground",children:["Skipped: ",Q.skipped?.map(e=>`${e.to} (${e.reason})`).join(", ")]})]})]})})]})})]})}e.s(["AssetSendDialog",()=>P],238827);var U=e.i(318504);function F(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function B({data:e,accountName:a}){let n=h(e);return(0,t.jsxs)("div",{className:"one-pager-doc bg-[#0b1a2e] text-white rounded-xl overflow-hidden text-sm",children:[(0,t.jsxs)("div",{className:"px-6 pt-6 pb-3",children:[(0,t.jsxs)("p",{className:"text-xs tracking-[0.25em] text-cyan-300 uppercase font-semibold",children:["For ",a]}),(0,t.jsxs)("h1",{className:"text-3xl font-extrabold mt-1 tracking-tight",children:[(0,t.jsx)("span",{className:"text-cyan-400",children:"Yard"}),(0,t.jsx)("span",{className:"text-white",children:"Flow"}),(0,t.jsx)("span",{className:"text-slate-400 text-lg font-normal ml-2",children:"by FreightRoll"})]})]}),(0,t.jsxs)("div",{className:"px-6 pb-4",children:[(0,t.jsx)("h2",{className:"text-base font-extrabold uppercase tracking-tight text-white leading-snug",children:e.headline}),(0,t.jsx)("p",{className:"mt-2 text-sm text-slate-300 leading-relaxed",children:e.subheadline})]}),(0,t.jsxs)("div",{className:"mx-4 mb-4 grid gap-2 md:grid-cols-3",children:[(0,t.jsxs)("div",{className:"rounded-lg border border-cyan-600/40 bg-cyan-950/30 p-2",children:[(0,t.jsx)("p",{className:"text-[10px] uppercase tracking-[0.2em] text-cyan-300",children:"Commercial Impact"}),(0,t.jsx)("p",{className:"mt-1 text-xs text-slate-200",children:"Grow production capacity without adding dock-office headcount."})]}),(0,t.jsxs)("div",{className:"rounded-lg border border-blue-600/40 bg-blue-950/30 p-2",children:[(0,t.jsx)("p",{className:"text-[10px] uppercase tracking-[0.2em] text-blue-300",children:"Operational Control"}),(0,t.jsx)("p",{className:"mt-1 text-xs text-slate-200",children:"Standardize gate-to-dock execution across sites."})]}),(0,t.jsxs)("div",{className:"rounded-lg border border-emerald-600/40 bg-emerald-950/30 p-2",children:[(0,t.jsx)("p",{className:"text-[10px] uppercase tracking-[0.2em] text-emerald-300",children:"Executive Visibility"}),(0,t.jsx)("p",{className:"mt-1 text-xs text-slate-200",children:"Create board-ready proof of dwell and margin lift."})]})]}),(0,t.jsx)("div",{className:"mx-4 rounded-lg border border-slate-600/60 overflow-hidden",children:(0,t.jsxs)("div",{className:"grid grid-cols-[1fr_1.3fr_1fr]",children:[(0,t.jsxs)("div",{className:"border-r border-slate-600/60",children:[(0,t.jsx)("div",{className:"bg-red-900/50 px-3 py-2 text-center border-b border-slate-600/40",children:(0,t.jsx)("span",{className:"text-[10px] font-bold uppercase tracking-[0.2em] text-red-300",children:"Typical Reality"})}),(0,t.jsx)("div",{className:"px-3 py-3 space-y-2.5",children:n.painPoints.map((e,a)=>(0,t.jsxs)("div",{className:"flex gap-2 text-xs text-slate-300 leading-snug",children:[(0,t.jsx)("span",{className:"text-red-400 shrink-0 text-sm",children:"â "}),(0,t.jsx)("span",{children:e})]},a))})]}),(0,t.jsxs)("div",{className:"border-r border-slate-600/60",children:[(0,t.jsx)("div",{className:"bg-blue-900/50 px-3 py-2 text-center border-b border-slate-600/40",children:(0,t.jsx)("span",{className:"text-[10px] font-bold uppercase tracking-[0.2em] text-blue-300",children:"Standardized Operating Protocol"})}),(0,t.jsx)("div",{className:"px-3 py-3",children:(0,t.jsx)("div",{className:"relative",children:n.solutionSteps.map((a,n)=>(0,t.jsxs)("div",{className:"relative pl-6 pb-3 last:pb-0",children:[n<e.solutionSteps.length-1&&(0,t.jsx)("div",{className:"absolute left-[9px] top-5 bottom-0 w-0.5 bg-gradient-to-b from-cyan-500/60 to-cyan-500/20"}),(0,t.jsx)("div",{className:"absolute left-0 top-0 w-6 h-6 rounded-full border-2 border-cyan-500/70 bg-[#0b1a2e] flex items-center justify-center",children:(0,t.jsx)("span",{className:"text-xs leading-none font-bold text-cyan-400 flex items-center justify-center h-full w-full",children:a.step})}),(0,t.jsxs)("div",{className:"text-xs",children:[(0,t.jsx)("span",{className:"text-cyan-300 font-bold",children:a.title}),(0,t.jsx)("p",{className:"text-slate-400 mt-0.5 leading-snug text-[11px]",children:a.description})]})]},a.step))})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"bg-emerald-900/50 px-3 py-2 text-center border-b border-slate-600/40",children:(0,t.jsx)("span",{className:"text-[10px] font-bold uppercase tracking-[0.2em] text-emerald-300",children:"YardFlow Effect"})}),(0,t.jsx)("div",{className:"px-3 py-3 space-y-2.5",children:n.outcomes.map((e,a)=>(0,t.jsxs)("div",{className:"flex gap-2 text-xs text-slate-300 leading-snug",children:[(0,t.jsx)("span",{className:"text-emerald-400 shrink-0",children:"â"}),(0,t.jsx)("span",{children:e})]},a))})]})]})}),(0,t.jsxs)("div",{className:"mx-4 mt-4",children:[(0,t.jsx)("div",{className:"text-center mb-3",children:(0,t.jsx)("span",{className:"text-[10px] tracking-[0.3em] uppercase text-slate-400 font-bold border-t border-b border-slate-600 px-6 py-1.5 inline-block",children:"Proof from Live Deployment"})}
2),(0,t.jsx)("div",{className:"grid grid-cols-5 gap-2",children:n.proofStats.map((e,a)=>(0,t.jsxs)("div",{className:"text-center bg-slate-800/50 rounded-lg py-3 px-1 border border-slate-700/40",children:[(0,t.jsx)("div",{className:"text-sm mb-1",children:["ð","ð","ð¤","â±","ð°"][a]??"ð"}),(0,t.jsx)("p",{className:"text-base font-bold text-white leading-none",children:e.value}),(0,t.jsx)("p",{className:"text-[9px] text-slate-400 mt-1 leading-tight",children:e.label})]},a))})]}),(0,t.jsx)("div",{className:"mx-4 mt-4 bg-slate-800/30 rounded-lg px-4 py-3 border-l-2 border-cyan-400/60",children:(0,t.jsxs)("p",{className:"text-xs text-slate-300 italic leading-relaxed",children:["â",n.customerQuote,"â"]})}),(0,t.jsxs)("div",{className:"px-6 py-4 mt-2 border-t border-slate-700/50 space-y-1.5",children:[(0,t.jsxs)("p",{className:"text-xs text-slate-300",children:[(0,t.jsx)("strong",{className:"text-slate-100",children:"Best fit:"})," ",n.bestFit]}),n.publicContext&&(0,t.jsxs)("p",{className:"text-xs text-slate-400",children:[(0,t.jsx)("strong",{className:"text-slate-300",children:"Public source context:"})," ",n.publicContext]})]}),(0,t.jsxs)("div",{className:"mx-4 mb-5 rounded-lg border border-cyan-500/40 bg-cyan-950/20 p-3",children:[(0,t.jsx)("p",{className:"text-[10px] uppercase tracking-[0.2em] text-cyan-300",children:"Suggested Next Step"}),(0,t.jsx)("p",{className:"mt-1 text-xs text-slate-100",children:n.suggestedNextStep||L(a)})]})]})}function H(e,t){let a=h(e),n=F(t),i=F(a.headline),r=F(a.subheadline),s=F(a.customerQuote),l=F(a.bestFit),o=F(a.publicContext),c=F(a.suggestedNextStep||L(t)),d=a.painPoints.map(e=>`<div style="display:flex;gap:8px;font-size:12px;color:#cbd5e1;margin-bottom:8px;line-height:1.5;"><span style="color:#f87171;flex-shrink:0;">â </span><span>${F(e)}</span></div>`).join(""),p=a.solutionSteps.map((e,t)=>`<div style="position:relative;padding-left:32px;margin-bottom:${t<a.solutionSteps.length-1?"12":"0"}px;"> 3 <div style="position:absolute;left:0;top:0;width:24px;height:24px;border-radius:50%;border:2px solid rgba(34,211,238,0.7);background:#0b1a2e;display:flex;align-items:center;justify-content:center;font-size:10px;font-weight:700;line-height:1;color:#22d3ee;">${e.step}</div> 4 ${t<a.solutionSteps.length-1?'<div style="position:absolute;left:11px;top:26px;bottom:-4px;width:2px;background:linear-gradient(to bottom,rgba(34,211,238,0.5),rgba(34,211,238,0.15));"></div>':""} 5 <div style="font-size:12px;"><span style="color:#67e8f9;font-weight:700;">${F(e.title)}</span><p style="color:#94a3b8;margin:2px 0 0;font-size:11px;line-height:1.4;">${F(e.description)}</p></div> 6 </div>`).join(""),m=a.outcomes.map(e=>`<div style="display:flex;gap:8px;font-size:12px;color:#cbd5e1;margin-bottom:8px;line-height:1.5;"><span style="color:#34d399;flex-shrink:0;">â</span><span>${F(e)}</span></div>`).join(""),u=["ð","ð","ð¤","â±","ð°"],x=a.proofStats.map((e,t)=>`<td style="text-align:center;background:#1e293b;border-radius:8px;padding:12px 4px;border:1px solid rgba(71,85,105,0.4);"><div style="font-size:14px;margin-bottom:4px;">${u[t]??"ð"}</div><div style="font-size:18px;font-weight:700;color:#fff;">${F(e.value)}</div><div style="font-size:9px;color:#94a3b8;margin-top:4px;line-height:1.3;">${F(e.label)}</div></td>`).join(""),f=a.publicContext?`<p style="font-size:11px;color:#94a3b8;margin:0;line-height:1.5;"><strong style="color:#cbd5e1;">Public source context:</strong> ${o}</p>`:"";return`<!DOCTYPE html><html><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><title>YardFlow â ${n}</title></head> 7<body style="margin:0;padding:24px;background:#f1f5f9;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;"> 8<div style="max-width:720px;margin:0 auto;background:#0b1a2e;border-radius:12px;overflow:hidden;color:#fff;"> 9 <div style="padding:24px 24px 12px;"> 10 <p style="font-size:11px;letter-spacing:4px;color:#67e8f9;text-transform:uppercase;margin:0;font-weight:600;">For ${n}</p> 11 <h1 style="font-size:28px;margin:4px 0 0;font-weight:800;letter-spacing:-0.5px;"><span style="color:#22d3ee;">Yard</span><span style="color:#fff;">Flow</span><span style="color:#94a3b8;font-size:16px;font-weight:400;margin-left:8px;">by FreightRoll</span></h1> 12 </div> 13 <div style="padding:0 24px 16px;"> 14 <h2 style="font-size:16px;text-transform:uppercase;letter-spacing:-0.3px;margin:0;color:#fff;font-weight:800;line-height:1.3;">${i}</h2> 15 <p style="margin:8px 0 0;font-size:13px;color:#cbd5e1;line-height:1.6;">${r}</p> 16 </div> 17 <div style="margin:0 16px 16px;"> 18 <table width="100%" cellpadding="0" cellspacing="6"><tr> 19 <td style="background:rgba(8,145,178,0.2);border:1px solid rgba(34,211,238,0.35);border-radius:8px;padding:10px;vertical-align:top;"> 20 <div style="font-size:9px;letter-spacing:2px;text-transform:uppercase;color:#67e8f9;font-weight:700;">Commercial Impact</div> 21 <div style="font-size:11px;color:#e2e8f0;margin-top:6px;line-height:1.4;">Grow production capacity without adding dock-office headcount.</div> 22 </td> 23 <td style="background:rgba(30,58,138,0.2);border:1px solid rgba(96,165,250,0.35);border-radius:8px;padding:10px;vertical-align:top;"> 24 <div style="font-size:9px;letter-spacing:2px;text-transform:uppercase;color:#93c5fd;font-weight:700;">Operational Control</div> 25 <div style="font-size:11px;color:#e2e8f0;margin-top:6px;line-height:1.4;">Standardize gate-to-dock execution across sites.</div> 26 </td> 27 <td style="background:rgba(6,95,70,0.2);border:1px solid rgba(52,211,153,0.35);border-radius:8px;padding:10px;vertical-align:top;"> 28 <div style="font-size:9px;letter-spacing:2px;text-transform:uppercase;color:#6ee7b7;font-weight:700;">Executive Visibility</div> 29 <div style="font-size:11px;color:#e2e8f0;margin-top:6px;line-height:1.4;">Create board-ready proof of dwell and margin lift.</div> 30 </td> 31 </tr></table> 32 </div> 33 <div style="margin:0 16px;border:1px solid rgba(71,85,105,0.5);border-radius:8px;overflow:hidden;"> 34 <table width="100%" cellpadding="0" cellspacing="0"><tr> 35 <td width="30%" style="vertical-align:top;border-right:1px solid rgba(71,85,105,0.5);"> 36 <div style="background:rgba(127,29,29,0.35);padding:8px;text-align:center;border-bottom:1px solid rgba(71,85,105,0.3);"><span style="font-size:10px;font-weight:700;letter-spacing:2px;color:#fca5a5;text-transform:uppercase;">Typical Reality</span></div> 37 <div style="padding:12px;">${d}</div> 38 </td> 39 <td width="40%" style="vertical-align:top;border-right:1px solid rgba(71,85,105,0.5);"> 40 <div style="background:rgba(30,58,138,0.35);padding:8px;text-align:center;border-bottom:1px solid rgba(71,85,105,0.3);"><span style="font-size:10px;font-weight:700;letter-spacing:2px;color:#93c5fd;text-transform:uppercase;">Standardized Operating Protocol</span></div> 41 <div style="padding:12px;">${p}</div> 42 </td> 43 <td width="30%" style="vertical-align:top;"> 44 <div style="background:rgba(6,78,59,0.35);padding:8px;text-align:center;border-bottom:1px solid rgba(71,85,105,0.3);"><span style="font-size:10px;font-weight:700;letter-spacing:2px;color:#6ee7b7;text-transform:uppercase;">YardFlow Effect</span></div> 45 <div style="padding:12px;">${m}</div> 46 </td> 47 </tr></table> 48 </div> 49 <div style="margin:16px 16px 0;text-align:center;"> 50 <span style="font-size:9px;letter-spacing:4px;text-transform:uppercase;color:#94a3b8;font-weight:700;border-top:1px solid #475569;border-bottom:1px solid #475569;padding:6px 20px;display:inline-block;">Proof from Live Deployment</span> 51 </div> 52 <div style="margin:12px 16px 0;"><table width="100%" cellpadding="0" cellspacing="6"><tr>${x}</tr></table></div> 53 <div style="margin:16px 16px;background:rgba(30,41,59,0.3);border-radius:8px;padding:12px 16px;border-left:3px solid rgba(34,211,238,0.5);"> 54 <p style="font-size:12px;color:#cbd5e1;font-style:italic;margin:0;line-height:1.6;">"${s}"</p> 55 </div> 56 <div style="padding:16px 24px;border-top:1px solid rgba(51,65,85,0.5);"> 57 <p style="font-size:11px;color:#cbd5e1;margin:0 0 6px;line-height:1.5;"><strong style="color:#f1f5f9;">Best fit:</strong> ${l}</p> 58 ${f} 59 </div> 60 <div style="margin:0 16px 16px;background:rgba(8,145,178,0.15);border:1px solid rgba(34,211,238,0.35);border-radius:8px;padding:12px;"> 61 <div style="font-size:9px;letter-spacing:2px;text-transform:uppercase;color:#67e8f9;font-weight:700;">Suggested Next Step</div> 62 <p style="font-size:11px;color:#e2e8f0;margin:6px 0 0;line-height:1.5;">${c}</p> 63 </div> 64</div> 65</body></html>`}function $({accountName:e,trigger:s,variant:m="dialog",open:u,onOpenChange:h,recipients:x=[],initialSelectedRecipientIds:f}){let g=(0,U.useActor)(),[b,y]=(0,a.useState)(!1),[v,N]=(0,a.useState)(null),[w,k]=(0,a.useState)(!1),[_,j]=(0,a.useState)(!1),[T,S]=(0,a.useState)(!0),[C,A]=(0,a.useState)(null);async function E(){let t=!!v;k(!0),N(null);try{let a=await fetch("/api/ai/one-pager",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accountName:e,useLiveIntel:T})}),n=await a.json();if(!a.ok)throw Error(n.error??"Generation failed");if(!n.content)throw Error("Could not parse structured one-pager content");N(n.content),A(n.agentContext??null),t&&M("regen_after_preview_rate",{accountName:e,action:"one_pager",status:"success",value:1})}catch(e){n.toast.error(e instanceof Error?e.message:"One-pager generation failed")}finally{k(!1)}}async function D(){if(v&&!_){j(!0);try{let t=await fetch("/api/revops/playbook-blocks",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:`${e} one-pager block`,body:JSON.stringify(v),blockType:"one-pager",accountName:e,stage:"one_pager",createdBy:g})}),a=await t.json().catch(()=>({}));if(!t.ok)throw Error(a.error??"Failed to save playbook block");n.toast.success("Saved as playbook block")}catch(e){n.toast.error(e instanceof Error?e.message:"Failed to save playbook block")}finally{j(!1)}}}let L=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex-1 overflow-auto px-6 py-4",children:[(0,t.jsx)("div",{className:"mb-4 flex items-center gap-2 text-xs",children:(0,t.jsxs)("label",{className:"flex items-center gap-2",children:[(0,t.jsx)("input",{type:"checkbox",checked:T,onChange:e=>S(e.target.checked)}),"Use latest live intel"]})}),C?(0,t.jsxs)("div",{className:"mb-4 rounded-lg border bg-muted/30 p-3 text-sm",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-xs text-muted-foreground",children:[(0,t.jsx)("span",{children:"Context used"}),(0,t.jsx)("span",{className:"rounded bg-background px-2 py-0.5 font-mono",children:C.provider}),(0,t.jsx)("span",{className:"rounded bg-background px-2 py-0.5 font-mono",children:C.freshness.source})]}),(0,t.jsx)("p",{className:"mt-2",children:C.summary})]}):null,w&&(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground animate-pulse py-20 justify-center",children:[(0,t.jsx)(o.RefreshCw,{className:"h-4 w-4 animate-spin"}),"Generating custom one-pager with Gemini..."]}),!w&&v&&(0,t.jsx)(B,{data:v,accountName:e}),!w&&!v&&(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center text-sm text-muted-foreground border-2 border-dashed rounded-md py-20 gap-3",children:[(0,t.jsx)(l,{className:"h-8 w-8 text-muted-foreground
65/50"}),(0,t.jsxs)("p",{children:["Generate a custom YardFlow one-pager tailored to ",e,"'s business case"]}),(0,t.jsxs)(i.Button,{onClick:E,className:"gap-2 mt-2",children:[(0,t.jsx)(l,{className:"h-4 w-4"}),"Generate One-Pager"]})]})]}),(0,t.jsxs)("div",{className:"px-6 py-4 border-t flex items-center justify-between shrink-0",children:[(0,t.jsxs)(i.Button,{onClick:E,disabled:w,variant:v?"outline":"default",className:"gap-2",children:[(0,t.jsx)(o.RefreshCw,{className:"h-4 w-4"}),v?"Regenerate":"Generate"]}),v&&(0,t.jsxs)("div",{className:"flex gap-2",children:[x.length>0?(0,t.jsx)(P,{accountName:e,generatedContent:{account_name:e,content:H(v,e),provider_used:C?.provider,prompt_policy_version:O,cta_mode:R,legacy_policy:!1},recipients:x,initialSelectedRecipientIds:f,trigger:(0,t.jsx)(i.Button,{size:"sm",className:"gap-1.5",children:"Send"})}):null,(0,t.jsxs)(i.Button,{variant:"outline",size:"sm",onClick:function(){if(!v)return;let t=H(v,e);navigator.clipboard.writeText(t),n.toast.success("HTML copied to clipboard â paste into email or save as .html")},className:"gap-1.5",children:[(0,t.jsx)(c.Copy,{className:"h-3.5 w-3.5"})," Copy HTML"]}),(0,t.jsxs)(i.Button,{variant:"outline",size:"sm",onClick:function(){if(!v)return;let t=new Blob([H(v,e)],{type:"text/html"}),a=URL.createObjectURL(t),i=document.createElement("a");i.href=a,i.download=`${e.toLowerCase().replace(/\s+/g,"-")}-yardflow-one-pager.html`,i.click(),URL.revokeObjectURL(a),n.toast.success("Downloaded")},className:"gap-1.5",children:[(0,t.jsx)(d.Download,{className:"h-3.5 w-3.5"})," Download"]}),(0,t.jsxs)(i.Button,{variant:"outline",size:"sm",onClick:D,className:"gap-1.5",disabled:_,children:[(0,t.jsx)(p,{className:"h-3.5 w-3.5"})," ",_?"Saving...":"Save as Playbook Block"]})]})]})]});return"inline"===m?(0,t.jsx)("div",{className:"flex flex-col h-full border rounded-lg overflow-hidden bg-card",children:L}):(0,t.jsxs)(r.Dialog,{open:"dialog"!==m||(u??b),onOpenChange:"dialog"===m?h??y:()=>{},children:[(0,t.jsx)(r.DialogTrigger,{asChild:!0,children:s??(0,t.jsxs)(i.Button,{variant:"outline",size:"sm",className:"gap-1.5",children:[(0,t.jsx)(l,{className:"h-3.5 w-3.5"}),"One-Pager"]})}),(0,t.jsx)(r.DialogContent,{className:"max-h-[90vh] max-w-3xl overflow-hidden p-0",children:(0,t.jsxs)("div",{className:"flex h-full max-h-[90vh] flex-col",children:[(0,t.jsx)(r.DialogHeader,{className:"shrink-0 border-b px-6 py-4",children:(0,t.jsxs)(r.DialogTitle,{className:"flex items-center gap-2",children:[(0,t.jsx)(l,{className:"h-5 w-5 text-blue-500"}),"YardFlow One-Pager â ",e]})}),L]})})]})}}]); 66 67//# debugId=045fc8d9-6ce5-de8e-47d0-393ee6fd11bf
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.