1import{a as ge}from"./chunk-27KSWXRN.js";import{a as se,b as ce,d as pe,e as me,f as _e}from"./chunk-BR4T6J6J.js";import{a as le,b as de}from"./chunk-VGNCCFA2.js";import"./chunk-GKJRRXIW.js";import{b as $}from"./chunk-KMVCKHBG.js";import"./chunk-6ZBVNRZM.js";import"./chunk-ZJH4KWUE.js";import{a as ae,b as re}from"./chunk-VLZT7LEU.js";import{a as st,b as ct}from"./chunk-3OMGMEY4.js";import"./chunk-PKDDGBGX.js";import{a as ie,b as oe,c as A}from"./chunk-LI2T6WGG.js";import"./chunk-P62PB5FM.js";import{B as _t,C as Xt,d as Vt,e as Ft,f as Ht,g as At,k as Lt,m as zt,p as U,q as jt,r as Rt,w as Zt}from"./chunk-ZRUB5RAM.js";import"./chunk-FWLW7ANH.js";import"./chunk-RBWYWP5P.js";import{a as mt}from"./chunk-3OGZZWZI.js";import"./chunk-ZOXUN7KU.js";import"./chunk-AWMXOLHB.js";import"./chunk-VNEK3QQJ.js";import"./chunk-NKY4LFZ2.js";import"./chunk-6YKQPAFB.js";import"./chunk-6XP4NHCS.js";import"./chunk-C6G32BO3.js";import"./chunk-AGSZ5YOG.js";import"./chunk-KJ646VJZ.js";import{a as te,c as ee,d as ne}from"./chunk-ZBOUF5EW.js";import"./chunk-RDCOIPFA.js";import"./chunk-2RTZPCT2.js";import{b as dt,c as Jt,d as Kt}from"./chunk-CZRXZ7LT.js";import"./chunk-GN45IZLP.js";import"./chunk-QOY55ZI6.js";import"./chunk-NJ7DPYL4.js";import"./chunk-HUQUY6LH.js";import"./chunk-JZIRNZ4O.js";import"./chunk-HOQ6Q3US.js";import"./chunk-KZOZNFQA.js";import{H as X}from"./chunk-U7LC6A3A.js";import"./chunk-EY2VZUZB.js";import{b as Ut,c as $t}from"./chunk-BFS7WB7G.js";import"./chunk-GSDNJFEX.js";import{a as Yt,b as Wt}from"./chunk-WRAKFX24.js";import"./chunk-IORNFJFE.js";import"./chunk-NCFG7NMN.js";import"./chunk-2ULRYTGT.js";import{D as Qt,g as qt,k as Nt,p as Gt}from"./chunk-VAXT7SEG.js";import{N as K,P as lt,Q as It,R as Z}from"./chunk-IW5X5NS4.js";import"./chunk-5H5SGHCH.js";import"./chunk-3XS3ZBPH.js";import"./chunk-GSK5XISC.js";import"./chunk-ZGGTSUVP.js";import{a as I,d as Bt,u as J}from"./chunk-YDKCM3XM.js";import{l as rt}from"./chunk-Z4IUR6GC.js";import"./chunk-AGLEDWR5.js";import{l as Tt}from"./chunk-E7QCVT25.js";import{h as St}from"./chunk-XD6NS5E4.js";import{Bb as Q,Bc as o,Bd as Dt,Cd as H,Dd as nt,Fa as _,Ga as g,Id as at,Jc as T,Ka as it,Kc as B,La as N,Lc as V,Mc as z,Na as G,Nb as E,Nc as P,Pb as pt,Pc as bt,Qc as m,R,Ra as ut,Rb as F,Rc as W,Sb as vt,Sc as Mt,Tc as Ot,Vc as Pt,Wc as wt,Xc as kt,Ya as ft,_ as q,a as C,b as x,cc as yt,ec as c,fc as p,fd as ot,gd as Et,hc as D,ic as b,jc as M,kc as f,l as j,lc as d,mc as s,nc as O,oa as Ct,oc as w,pc as S,qc as L,rb as k,ub as xt,vc as y,wb as a,wc as Y,xa as v,zc as h}from"./chunk-2GZCTCDN.js";var gt=(()=>{class n{constructor(){this.mapping=new Map,this.observer=new IntersectionObserver(t=>{for(let e of t){let i=this.mapping.get(e.target);i&&i(e.isIntersecting)}},{})}add(t,e){this.mapping.set(t,e),this.observer.observe(t)}ngOnDestroy(){this.mapping.clear(),this.observer.disconnect()}remove(t){this.mapping.delete(t),this.observer.unobserve(t)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275dir=pt({type:n,selectors:[["","intersectionObserverList",""]]})}}return n})(),he=(()=>{class n{constructor(){this.cdr=v(at);let t=v(gt),e=v(ft);this.parent=t,this.elementRef=e,this.isIntersecting=!1}ngOnDestroy(){this.parent.remove(this.elementRef.nativeElement)}ngOnInit(){this.parent.add(this.elementRef.nativeElement,t=>{this.isIntersecting=t,this.cdr.markForCheck()})}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275dir=pt({type:n,selectors:[["","intersectionObserver",""]],exportAs:["intersection"]})}}return n})();function we(n,r){if(n&1&&(w(0,"span"),m(1,"\uFF5C "),w(2,"a",6),m(3),S()()),n&2){let t=o();a(2),Y("href","mailto:"+t.email,k),a(),W(t.email)}}function ke(n,r){if(n&1&&(w(0,"span"),m(1,"\uFF5C "),w(2,"a",6),m(3),S()()),n&2){let t=o();a(2),Y("href","tel:"+t.phone,k),a(),W(t.phone)}}function Ee(n,r){if(n&1&&(w(0,"li",7)(1,"a",8),L(2,"img",9),S()()),n&2){let t=o().$implicit,e=o(),i=o();a(),Y("href",i.getSocialValue(e.social,t),k),a(),Y("src","assets/social/"+t+".svg",k)("alt",t)}}function De(n,r){if(n&1&&c(0,Ee,3,3,"li",7),n&2){let t=r.$implicit,e=o(),i=o();p(i.getSocialValue(e.social,t)?0:-1)}}function Se(n,r){if(n&1&&(w(0,"div",0)(1,"div",2),L(2,"img",3),w(3,"p")(4,"span"),m(5),S(),c(6,we,4,2,"span"),c(7,ke,4,2,"span"),S()(),w(8,"div",4)(9,"ul",5),b(10,De,1,1,null,null,D),S()()()),n&2){let t=r,e=o();a(2),Y("src",e.workspace().logo2,k),a(3),W(t.location),a(),p(t.email?6:-1),a(),p(t.phone?7:-1),a(3),M(e.getSocialKeys(t==null?null:t.social))}}var Ce=(()=>{class n{constructor(){this.workspace=Dt()}getSocialKeys(t){return t?Object.keys(t):[]}getSocialValue(t,e){return t?.[e]}getYear(){return new Date().getFullYear()}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=E({type:n,selectors:[["app-guest-footer"]],inputs:{workspace:[1,"workspace"]},decls:5,vars:4,consts:[[1,"footer-wrapper"],[1,"light"],[1,"footer-contact"],["alt","Workspace logo",3,"src"],[1,"footer-social"],[1,"footer-social-menu"],[3,"href"],[1,"social-menu-item"],["target","_blank",3,"href"],[1,"social-image",3,"src","alt"]],template:function(e,i){if(e&1&&(w(0,"footer"),c(1,Se,12,4,"div",0),S(),w(2,"footer",1)(3,"div",0),m(4),S()()),e&2){let l;z("background-color",i.workspace().primaryColor),a(),p((l=i.workspace().company)?1:-1,l),a(3),Mt(" \xA9",i.getYear()," Momently, Inc. All Rights Reserved. ")}},styles:["[_nghost-%COMP%] footer.light[_ngcontent-%COMP%]{color:#6e6e73;padding-top:0;padding-bottom:0;margin:0}[_nghost-%COMP%] footer.light[_ngcontent-%COMP%] .footer-wrapper[_ngcontent-%COMP%]{font-size:12px;line-height:12px;margin-top:8px;margin-bottom:8px}[_nghost-%COMP%] footer[_ngcontent-%COMP%]{display:flex;padding:16px 24px;margin:24px 24px 0;border-radius:var(--border-radius)}[_nghost-%COMP%] footer[_ngcontent-%COMP%], [_nghost-%COMP%] footer[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#fff}[_nghost-%COMP%] footer[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:180px}[_nghost-%COMP%] footer[_ngcontent-%COMP%] .footer-wrapper[_ngcontent-%COMP%]{display:flex;width:100%;max-width:890px;max-width:1200px;margin:16px auto;flex-direction:column}@media only screen and (min-width:960px){[_nghost-%COMP%] footer[_ngcontent-%COMP%] .footer-wrapper[_ngcontent-%COMP%]{flex-direction:row;align-items:center}}[_nghost-%COMP%] footer[_ngcontent-%COMP%] .footer-contact[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:8px 0}[_nghost-%COMP%] footer[_ngcontent-%COMP%] .footer-social[_ngcontent-%COMP%]{padding:24px 0 0}@media only screen and (min-width:960px){[_nghost-%COMP%] footer[_ngcontent-%COMP%] .footer-social[_ngcontent-%COMP%]{margin-left:auto;padding:0}}[_nghost-%COMP%] footer[_ngcontent-%COMP%] .footer-social[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;gap:16px;list-style:none}[_nghost-%COMP%] footer[_ngcontent-%COMP%] .footer-social[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{height:40px;width:40px}"],changeDetection:0})}}return n})();var Te=["video"],Be=(n,r)=>r.id,fe=(n,r)=>r.url;function Ie(n,r){if(n&1){let t=y();d(0,"div",17)(1,"div",18),h("fileDropped",function(i){_(t);let l=o(4);return g(l.onDrop(i))}),d(2,"app-upload",19),h("onUpload",function(i){_(t);let l=o(4);return g(l.onUpload(i))}),s()()()}if(n&2){let t=o(4);a(2),f("id","banner")("reset",t.resetEvent)("drop",t.dropEvent)}}function Ve(n,r){if(n&1&&c(0,Ie,3,3,"div",17),n&2){let t=r.$implicit;p(t.id==="upload"?0:-1)}}function Fe(n,r){if(n&1){let t=y();b(0,Ve,1,1,null,null,Be),d(2,"div",12)(3,"button",13),h("click",function(){_(t);let i=o(2);return g(i.save())}),m(4,"Save "),s(),d(5,"button",14),h("click",function(){_(t);let i=o(2);return g(i.cancel())}),m(6,"Cancel "),s(),d(7,"button",15),h("click",function(){_(t);let i=o(2);return g(i.toggleEditState())}),d(8,"span",16),m(9,"close"),s()()()}if(n&2){let t=o(2);M(t.ctas),a(3),f("disabled",!t.showUploadCta),a(2),f("disabled",!t.showUploadCta)}}function He(n,r){if(n&1){let t=y();d(0,"div",3)(1,"div",4),h("click",function(){_(t);let i=o();return g(i.setEditState(!0))}),s(),d(2,"div",5)(3,"div",6)(4,"button",7),h("click",function(){_(t);let i=o();return g(i.toggleEditState())}),m(5,"Click to edit "),s()(),d(6,"div",8)(7,"div",9)(8,"div",10)(9,"div"),m(10,"Edit banner"),s(),O(11,"span",11),s()()(),c(12,Fe,10,2),s()()}if(n&2){let t=o();P("active",t.isEditActive),a(),P("active",t.isEditActive),a(2),P("active",!t.isEditActive),a(3),P("active",t.isEditActive),a(6),p(t.isEditActive?12:-1)}}function Ae(n,r){if(n&1&&O(0,"source",21),n&2){let t=r.$implicit;f("srcset",t.url)}}function Le(n,r){if(n&1&&(d(0,"picture"),b(1,Ae,1,1,"source",21,fe),O(3,"img",22),s()),n&2){let t=o(2);a(),M(t.media.urls),a(2),f("src",t.media.urls[0].url,k)}}function ze(n,r){if(n&1&&O(0,"source",24),n&2){let t=r.$implicit;f("src",t.url)("type",t.type)}}function Ue(n,r){if(n&1){let t=y();d(0,"video",23,0),h("loadedmetadata",function(i){_(t);let l=V(1),u=o(2);return g(u.onVideoLoad(i,l))}),b(2,ze,1,2,"source",24,fe),s()}if(n&2){let t=o(2);a(2),M(t.media.urls)}}function $e(n,r){if(n&1&&c(0,Le,4,1,"picture")(1,Ue,4,0,"video",20),n&2){let t,e=o();p((t=e.media.type)==="image"?0:1)}}var xe=(()=>{class n extends A{constructor(){super(),this.isEditActive=!1,this.ctas=[{id:"upload",name:"Change cover"}
1],this.showUploadCta=!1,this.resetEvent=new G,this.dropEvent=new G,this.video=H("video"),this.quillConfig={modules:{toolbar:[[{header:1},{header:2}],["bold","italic","underline","link"]]},placeholder:"Add title ...",theme:"bubble"},this.initConfig={header:1,align:"center",placeholder:"Add title ..."}}ngOnInit(){this.nodeData=this.data()?.node,this.media=this.nodeData.media,this.quillConfig=x(C({},this.quillConfig),{readOnly:this.nodeData.readOnly})}ngAfterViewInit(){}toggleEditState(){this.isEditActive=!this.isEditActive}setEditState(t){this.isEditActive=t}onCta(t){}onUpload(t){t?.url&&(this.media={type:t.type.split("/")[0],urls:[{url:t.url,type:t.type}]},this.showUploadCta=!0)}save(){this.nodeData.media=this.media,this.clicked({type:"update",data:this.nodeData}),this.reset()}cancel(){this.media=this.nodeData.media,this.reset()}reset(){this.resetEvent.emit(),this.showUploadCta=!1}onEditorSave(t){this.nodeData=x(C({},this.nodeData),{editor:x(C({},this.nodeData.editor),{data:{blocks:t}})}),this.clicked({type:"update_editor",data:this.nodeData})}onDrop(t){this.dropEvent.emit(t)}onVideoLoad(t,e){t.currentTarget.muted=!0}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=E({type:n,selectors:[["app-banner"]],viewQuery:function(e,i){e&1&&T(i.video,Te,5),e&2&&B()},features:[F],decls:3,vars:2,consts:[["video",""],[1,"toolbar-wrapper",3,"active"],[1,"banner"],[1,"toolbar-wrapper"],[1,"border",3,"click"],[1,"toolbar-wrapper-inner"],[1,"toolbar","primary"],["mat-raised-button","","color","accent",3,"click"],[1,"toolbar","secondary"],[1,"row","flex-row","items-center"],[1,"left-panel"],[1,"divider"],[1,"right-panel","flex-row","items-center"],["mat-flat-button","","color","accent",1,"mr-2",3,"click","disabled"],["mat-flat-button","","color","accent",3,"click","disabled"],["mat-icon-button","","aria-label","Close",1,"close",3,"click"],[1,"material-symbols-rounded"],[1,"upload-wrapper"],["app-drag","",1,"drag",3,"fileDropped"],[3,"onUpload","id","reset","drop"],["preload","auto","playsinline","","muted","","loop","","autoplay",""],[3,"srcset"],["alt","Highlight banner",3,"src"],["preload","auto","playsinline","","muted","","loop","","autoplay","",3,"loadedmetadata"],[3,"src","type"]],template:function(e,i){e&1&&(c(0,He,13,9,"div",1),d(1,"div",2),c(2,$e,2,1),s()),e&2&&(p(i.nodeData&&!i.nodeData.readOnly?0:-1),a(2),p(i.media?2:-1))},dependencies:[Z,lt,K,ct,st],styles:['[_nghost-%COMP%]{display:flex;justify-content:center;align-items:center;position:relative}@media only screen and (min-width:600px){[_nghost-%COMP%]{min-height:400px}}[_nghost-%COMP%] .editor[_ngcontent-%COMP%], [_nghost-%COMP%] app-editor[_ngcontent-%COMP%]{position:relative;z-index:2;display:block;width:100%;max-width:700px;margin:40px auto 0}@media only screen and (min-width:600px){[_nghost-%COMP%] .editor[_ngcontent-%COMP%], [_nghost-%COMP%] app-editor[_ngcontent-%COMP%]{margin:16px auto 0}}[_nghost-%COMP%] .banner[_ngcontent-%COMP%]{width:100%;position:absolute;top:0;bottom:0;display:flex;align-items:center;overflow:hidden;z-index:0}[_nghost-%COMP%] .banner[_ngcontent-%COMP%] picture[_ngcontent-%COMP%], [_nghost-%COMP%] .banner[_ngcontent-%COMP%] video[_ngcontent-%COMP%], [_nghost-%COMP%] .banner[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%}[_nghost-%COMP%] .banner[_ngcontent-%COMP%]:after{content:"";position:absolute;left:0;top:0;width:100%;height:100%;background-color:#0006;z-index:1}',".toolbar[_ngcontent-%COMP%]{display:flex;align-items:center;transition-duration:218ms;transition-property:all;height:0;opacity:0;transform:scaleY(0)}.toolbar.active[_ngcontent-%COMP%]{height:100%;opacity:1;transform:scaleY(1)}.toolbar.hidden[_ngcontent-%COMP%]{display:none}.toolbar-wrapper[_ngcontent-%COMP%]{position:absolute;top:0;right:0;left:0;z-index:2}.toolbar-wrapper.active[_ngcontent-%COMP%]{bottom:0}.toolbar-wrapper[_ngcontent-%COMP%] .border[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%;border:3px solid transparent}.toolbar-wrapper[_ngcontent-%COMP%] .border.active[_ngcontent-%COMP%]{border-color:var(--color-primary)}.toolbar-wrapper-inner[_ngcontent-%COMP%]{width:100%;height:56px}@media(max-width:600px){.toolbar-wrapper-inner[_ngcontent-%COMP%]{font-size:13px;height:40px}}.toolbar.secondary[_ngcontent-%COMP%]{background-color:var(--color-primary);color:#fff}.toolbar.secondary[_ngcontent-%COMP%] .divider[_ngcontent-%COMP%]{background-color:#ffffffb3;align-self:center;height:32px;width:1px;margin:0 8px 0 16px}.toolbar.secondary[_ngcontent-%COMP%] > .row[_ngcontent-%COMP%]{padding:0 24px;width:100%;justify-content:space-between;margin:0}.toolbar.primary[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{max-height:36px;margin:0 24px}@media(max-width:600px){.toolbar.primary[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin:0 24px;font-size:13px;line-height:26px;padding:0 8px}}.left-panel[_ngcontent-%COMP%], .right-panel[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center}.right-panel[_ngcontent-%COMP%]{position:absolute;top:8px;right:0;color:#fff}.right-panel[_ngcontent-%COMP%] .close[_ngcontent-%COMP%]{--mat-icon-button-state-layer-color: #fff;--mat-icon-button-icon-color: #fff;color:#fff}@media(max-width:600px){.right-panel[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-width:auto;padding:0 6px}.right-panel[_ngcontent-%COMP%] button[_ngcontent-%COMP%] .material-symbols-rounded[_ngcontent-%COMP%]{font-size:18px}}@media(max-width:600px){.left-panel[_ngcontent-%COMP%]{display:none}}.upload-wrapper[_ngcontent-%COMP%] .drag[_ngcontent-%COMP%]{padding-top:100px;padding-left:24px}"],changeDetection:0})}}return n})();var je=["metricsTpl"],Re=["slider"],qe=["editorList"],ht=n=>({active:n}),ye=(n,r)=>r.id;function Ne(n,r){if(n&1){let t=y();d(0,"div",19)(1,"div",24)(2,"div",25)(3,"div",26)(4,"div",27)(5,"div"),m(6,"Details"),s(),O(7,"span",28),d(8,"button",29),h("click",function(){_(t);let i=o(2).$implicit,l=o(2);return g(l.onCta("edit_metrics",i))}),m(9,"Edit "),s()()()()()()}}function Ge(n,r){if(n&1&&O(0,"app-bar-chart",23),n&2){let t=o(2).$implicit;f("data",t.breakdown.data)}}function Qe(n,r){if(n&1&&O(0,"div",null,4),n&2){let t=o(2).$implicit;yt("id",t.id)}}function Ye(n,r){if(n&1&&(d(0,"div",16,1)(2,"div",17,3)(4,"div",18),c(5,Ne,10,0,"div",19),d(6,"div",20)(7,"div",21),m(8),s(),d(9,"div",22),m(10),s(),c(11,Ge,1,1,"app-bar-chart",23),s(),c(12,Qe,2,1,"div"),s()()()),n&2){let t=V(1),e=o().$implicit,i=o(2);P("visible",t.isIntersecting),a(2),P("readOnly",i.nodeData.readOnly),a(3),p(i.nodeData.readOnly?-1:5),a(3),W(e.metric.value[i.activeIndex]),a(2),Ot(" ",e.metric.name," - ",e.metric.note," "),a(),p(e.breakdown?11:-1),a(),p(i.isEditorHidden(e.editor.data)?-1:12)}}function We(n,r){if(n&1&&c(0,Ye,13,10,"div",15),n&2){let t=r.$implicit,e=o(2);p(e.isMetricZero(t.metric)?-1:0)}}function Je(n,r){if(n&1){let t=y();d(0,"div",35),h("click",function(){let i=_(t).$index,l=o(3);return g(l.onTabChange(i))}),O(1,"div",36),s()}if(n&2){let t=r.$index,e=o(3);P("selected",t===e.activeIndex)}}function Ke(n,r){if(n&1){let t=y();d(0,"div",33)(1,"button",37),h("click",function(){_(t);let i=o(3);return g(i.prevTab())}),d(2,"span",38),m(3,"chevron_left"),s()()()}}function Ze(n,r){if(n&1){let t=y();d(0,"div",34)(1,"button",37),h("click",function(){_(t);let i=o(3);return g(i.nextTab())}),d(2,"span",38),m(3,"chevron_right"),s()()()}}function Xe(n,r){if(n&1&&(d(0,"div",30)(1,"div",31),b(2,Je,2,2,"div",32,D),s()(),d(4,"div"),c(5,Ke,4,0,"div",33),c(6,Ze,4,0,"div",34),s()),n&2){let t=o(2);a(2),M(t.config.items),a(3),p(t.activeIndex!==0?5:-1),a(),p(t.activeIndex!==t.nodeData.screenshots.length-1?6:-1)}}function tn(n,r){if(n&1){let t=y();d(0,"div",47)(1,"div",48),h("fileDropped",function(i){_(t);let l=o().$index,u=o(6);return g(u.onDrop(i,l))}),d(2,"app-upload",49),h("onUpload",function(i){_(t);let l=o().$index,u=o(6);return g(u.uploadEvents[l](i,l))}),s()()()}if(n&2){let t=o().$index,e=o(6);a(2),f("id",""+t)("reset",e.resetEvents[t])("drop",e.dropEvents[t])}}function en(n,r){if(n&1&&c(0,tn,3,3,"div",47),n&2){let t=r.$index,e=o(6);p(t===e.activeIndex?0:-1)}}function nn(n,r){if(n&1&&b(0,en,1,1,null,null,D),n&2){let t=o(5);M(t.nodeData.screenshots)}}function on(n,r){if(n&1&&c(0,nn,2,0),n&2){let t=r.$implicit;p(t.id==="upload"?0:-1)}}function an(n,r){if(n&1){let t=y();b(0,on,1,1,null,null,ye),d(2,"div",43)(3,"button",44),h("click",function(){_(t);let i=o(3);return g(i.save())}),m(4,"Save "),s(),d(5,"button",45),h("click",function(){_(t);let i=o(3);return g(i.cancel())}),m(6,"Cancel "),s(),d(7,"button",46),h("click",function(){_(t);let i=o(3);return g(i.toggleEditState())}),d(8,"span",38),m(9,"close"),s()()()}if(n&2){let t=o(3);M(t.nodeData.ctas),a(2),P("active",t.isEditActive),a(),f("disabled",!t.showUploadCta[t.activeIndex]),a(2),f("disabled",!t.showUploadCta[t.activeIndex])}}function rn(n,r){if(n&1){let t=y();d(0,"div",19)(1,"div",39),h("click",function(){_(t);let i=o(2);return g(i.setEditState(!0))}),s(),d(2,"div",24)(3,"div",40)(4,"button",41),h("click",function(){_(t);let i=o(2);return g(i.toggleEditState())}),m(5,"Click to edit "),s()(),d(6,"div",42)(7,"div",26)(8,"div",27)(9,"div"),m(10,"Edit"),s(),O(11,"span",28),s()()(),c(12,an,10,4),s()()}if(n&2){let t=o(2);P("active",t.isEditActive),a(),P("active",t.isEditActive),a(2),f("ngClass",ot(7,ht,!t.isEditActive)),a(3),f("ngClass",ot(9,ht,t.isEditActive)),a(6),p(t.isEditActive?12:-1)}}function ln(n,r){if(n&1){let t=y();d(0,"img",52,5),h("click",function(){_(t);let i=o(5);return g(i.setEditState(!0))}),s(),O(2,"a",53)}if(n&2){let t=r.$implicit,e=o(5);f("src",t.url,k),a(2),f("ngClass",ot(3,ht,!e.isEditActive))("href",e.no
1deData.media[t.mediaIds[0]]==null?null:e.nodeData.media[t.mediaIds[0]].link,k)}}function dn(n,r){if(n&1&&b(0,ln,3,5,null,null,D),n&2){let t=o(2).$implicit;M(t.images)}}function sn(n,r){if(n&1){let t=y();d(0,"img",52),h("click",function(){let i=_(t).$implicit,l=o(5);return g(l.onMediaClick(i))}),s()}if(n&2){let t=r.$implicit;f("src",t.imageUrl,k)}}function cn(n,r){if(n&1&&(d(0,"div",54),b(1,sn,1,1,"img",55,D),s()),n&2){let t=o(4);z("column-count",t.imageGalleryCols),a(),M(t.imageGallery)}}function pn(n,r){if(n&1&&c(0,dn,2,0)(1,cn,3,2,"div",51),n&2){let t=o().$implicit;p(t.images.length===1?0:t.images.length>1?1:-1)}}function mn(n,r){n&1&&(d(0,"mat-tab"),vt(1,pn,2,1,"ng-template",50),s())}function _n(n,r){if(n&1){let t=y();d(0,"div")(1,"a",6,0),h("mouseenter",function(){_(t);let i=V(2),l=o();return g(l.onCtaMouseEnter(i))})("mouseleave",function(){_(t);let i=V(2),l=o();return g(l.onCtaMouseLeave(i))}),m(3,"Explore campaign in further detail"),s()(),d(4,"div",7)(5,"div",8),b(6,We,1,1,null,null,ye),s(),d(8,"div",9),c(9,Xe,7,2),d(10,"div")(11,"div",10),c(12,rn,13,11,"div",11),d(13,"mat-tab-group",12),kt("selectedIndexChange",function(i){_(t);let l=o();return wt(l.activeIndex,i)||(l.activeIndex=i),g(i)}),b(14,mn,2,0,"mat-tab",null,D),s()()()()(),d(16,"div",13,1)(18,"a",14,2),h("mouseenter",function(){_(t);let i=V(19),l=o();return g(l.onCtaMouseEnter(i))})("mouseleave",function(){_(t);let i=V(19),l=o();return g(l.onCtaMouseLeave(i))}),m(20,"Explore campaign in further detail"),s()()}if(n&2){let t=V(17),e=o();a(),z("background-color",e.workspace.secondaryColor),f("routerLink",e.nodeData.reportLink),a(5),M(e.sections),a(3),p(e.nodeData.screenshots.length!==1?9:-1),a(),z("min-height",e.minHeight+"px"),a(2),p(!e.nodeData.readOnly&&e.nodeData.ctas&&e.nodeData.ctas.length!==0?12:-1),a(),Pt("selectedIndex",e.activeIndex),a(),M(e.config.items),a(2),P("visible",t.isIntersecting),a(2),z("background-color",e.workspace.secondaryColor),f("routerLink",e.nodeData.reportLink)}}var be=(()=>{class n extends A{constructor(){super(),this.destroyRef=v(N),this.document=v(it),this.store=v(J),this.dialogService=v(dt),this.metricsTpl=nt("metricsTpl"),this.slider=H("slider"),this.sections=[],this.config={items:[],autoplayEnabled:!1},this.isEditActive=!1,this.showUploadCta=[],this.resetEvents=[],this.uploadEvents=[],this.dropEvents=[],this.quillConfig={modules:{toolbar:[["bold","italic","underline","link"]]},placeholder:"Add text ...",theme:"bubble"},this.initConfig={},this.staticHtml={},this.editorList=nt("editorList"),this.store.select(U).pipe(q()).subscribe(t=>{this.workspace=t.workspace}),Q(()=>this.initQuill())}ngOnInit(){let t=this.data();this.sections=structuredClone(t.node.sections);let e=0;this.sections.map((u,et)=>{e=e+350}),this.minHeight=e,this.nodeData=structuredClone(t.node);let i=[];this.nodeData.screenshots.map(u=>{i=u,this.config.items.push({images:i}),this.resetEvents.push(new G),this.dropEvents.push(new G),this.uploadEvents.push((et,Pe)=>{this.onImageUpload(et,Pe)}),this.showUploadCta.push(!1)}),this.onTabChange(0),this.quillConfig=x(C({},this.quillConfig),{readOnly:this.nodeData.readOnly});let l;this.sections.map((u,et)=>{u.editor.data?.blocks?l=X(u.editor.data.blocks):l="",this.staticHtml[u.id]=l})}initQuill(){let t,e;this.editorList()?.map((i,l)=>{e=this.sections[l],i.nativeElement.innerHTML=this.staticHtml[e.id],t=new $(i.nativeElement,this.quillConfig);for(let u in this.initConfig)t.format(u,this.initConfig[u]);e.editor.data?.ops&&t.setContents(e.editor.data),this.autoSave(e.id,t)})}autoSave(t,e){let i=new j;e.on("text-change",()=>i.next()),i.pipe(R(2e3),I(this.destroyRef)).subscribe(()=>{let l=this.sections.filter(et=>et.id===t)[0],u=x(C({},l),{editor:x(C({},l.editor),{data:e.getContents()})});this.store.dispatch(Zt({data:u}))})}setupImageGallery(t){this.imageGallery=this.getImages(t.images),this.imageGalleryGutter=2;let e=this.imageGallery.length,i;e<4?i=1:e<10?i=2:e<60?i=3:i=4,this.imageGalleryCols=i;let l=650-this.imageGalleryGutter*(i-1);this.imageGalleryWidth=l/i}onMediaClick(t){t.mediaIds.length===1?this.openMediaDetailDialog(t.mediaIds[0],t.mediaType):t.mediaIds.length>1&&this.openMediaListDialog(t.mediaIds,t.mediaType)}openMediaListDialog(t,e){let i={mediaType:e,items:t,media:this.nodeData.media,template:"mediaList",title:"Media List"};this.openDialog(ge,"400px",i)}openMediaDetailDialog(t,e){let i="500px;";e==="facebook_videos"&&(i="650px");let l=x(C({},this.nodeData.media[t]),{mediaType:e});this.openDialog(ce,i,l)}getImages(t){return t.map(i=>({mediaType:i.mediaType,mediaIds:i.mediaIds,imageUrl:i.url}))}updateConfig(t,e){let i;this.config=x(C({},this.config),{items:this.config.items.map((l,u)=>u===e?(this.showUploadCta[u]=!0,i=l.images[0],{images:[{mediaType:i.mediaType,mediaIds:i.mediaIds,url:t.url}],loaded:!0}):l)})}save(){let t=this.activeIndex;this.nodeData.screenshots[t]=[x(C({},this.nodeData.screenshots[t][0]),{url:this.config.items[t].images[0].url})],this.clicked({type:"update",data:this.nodeData}),this.reset(t)}cancel(){let t=this.activeIndex,e=this.nodeData.screenshots[t];this.config=x(C({},this.config),{items:this.config.items.map((i,l)=>l===t?(this.showUploadCta[l]=!0,{images:e,loaded:!0}):i)}),this.reset(t)}reset(t){this.resetEvents[t].emit(),this.showUploadCta[t]=!1}openDialog(t,e,i){this.dialogService.open({content:t,origin:this.document,width:e,height:"100%",
1noBackdrop:!1,isGlobal:!0,data:C({animation:!0},i),position:{top:0,right:0,bottom:0,left:0}})}openSettingsDetail(t){this.store.dispatch(Xt({data:t})),this.openDialog(le,"400px",{parentActions:_t})}onImageUpload(t,e){this.updateConfig(t,e)}onDrop(t,e){this.dropEvents[e].emit(t)}onCta(t,e){t==="edit_metrics"&&this.openSettingsDetail(e.id)}toggleEditState(){this.isEditActive=!this.isEditActive}setEditState(t){this.isEditActive=t}isEditorHidden(t){return t&&Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype&&this.nodeData.readOnly}onCtaMouseEnter(t){t.style.backgroundColor=this.workspace.primaryColor}onCtaMouseLeave(t){t.style.backgroundColor=this.workspace.secondaryColor}onTabChange(t){this.activeIndex=t;let e=this.config.items[t];e&&e.images&&this.setupImageGallery(e)}prevTab(){this.activeIndex>0&&this.activeIndex--}nextTab(){this.activeIndex<this.nodeData.screenshots.length-1&&this.activeIndex++}isMetricZero(t){return t?.value?parseInt(t.value[this.activeIndex])===0:!0}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=E({type:n,selectors:[["app-body"]],viewQuery:function(e,i){e&1&&T(i.metricsTpl,je,5)(i.slider,Re,5)(i.editorList,qe,5),e&2&&B(3)},features:[F],decls:1,vars:1,consts:[["el",""],["lazy","intersection"],["el2",""],["metricsTpl",""],["editorList",""],["image",""],["target","_blank","queryParamsHandling","merge",1,"main-cta","main-cta-1","visible",3,"mouseenter","mouseleave","routerLink"],[1,"wrapper"],[1,"h-card-wrapper"],[1,"relative"],[1,"h-screenshot","relative"],[1,"toolbar-wrapper",3,"active"],[3,"selectedIndexChange","selectedIndex"],["intersectionObserver","",1,"lazy"],["target","_blank","queryParamsHandling","merge",1,"main-cta",3,"mouseenter","mouseleave","routerLink"],["intersectionObserver","",1,"h-card","lazy",3,"visible"],["intersectionObserver","",1,"h-card","lazy"],[1,"h-card-inner"],[1,"h-card-inner2"],[1,"toolbar-wrapper"],[1,"h-metric"],[1,"h-number"],[1,"h-description"],[3,"data"],[1,"toolbar-wrapper-inner"],[1,"toolbar","secondary"],[1,"row"],[1,"left-panel"],[1,"divider"],["mat-flat-button","","color","accent",3,"click"],[1,"dots-wrapper"],[1,"dots"],[1,"dot-wrapper",3,"selected"],[1,"prev"],[1,"next"],[1,"dot-wrapper",3,"click"],[1,"dot"],["mat-mini-fab","","color","primary",3,"click"],[1,"material-symbols-rounded"],[1,"border",3,"click"],[1,"toolbar","primary",3,"ngClass"],["mat-raised-button","","color","accent",3,"click"],[1,"toolbar","secondary",3,"ngClass"],[1,"right-panel"],["mat-flat-button","","color","accent",1,"mr-2",3,"click","disabled"],["mat-flat-button","","color","accent",3,"click","disabled"],["mat-icon-button","","aria-label","Close",1,"close",3,"click"],[1,"upload-wrapper"],["app-drag","",1,"drag",3,"fileDropped"],[3,"onUpload","id","reset","drop"],["matTabContent",""],[1,"masonry",3,"column-count"],["alt","Media","loading","lazy",3,"click","src"],["target","_blank",1,"media-link",3,"ngClass","href"],[1,"masonry"],["alt","Media","loading","lazy",3,"src"]],template:function(e,i){e&1&&c(0,_n,21,13),e&2&&p(i.nodeData?0:-1)},dependencies:[Z,lt,It,K,se,St,ct,he,st,rt,ne,ee,te],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:650px;margin:0 auto}@media(max-width:1400px)and (min-width:1280px){[_nghost-%COMP%]{max-width:572px}}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%]{position:relative;min-height:100%}[_nghost-%COMP%] .dot[_ngcontent-%COMP%]{height:8px;width:8px;background-color:#ccc;border-radius:100%;cursor:pointer;transition:background-color .1s linear}[_nghost-%COMP%] .dot[_ngcontent-%COMP%]:hover{background-color:#333}[_nghost-%COMP%] .dots[_ngcontent-%COMP%]{display:flex;flex-direction:row;margin:72px auto 40px}@media only screen and (min-width:1280px){[_nghost-%COMP%] .dots[_ngcontent-%COMP%]{margin-top:0}}[_nghost-%COMP%] .dots-wrapper[_ngcontent-%COMP%]{display:flex;overflow-x:auto;margin:0 64px;padding:0 8px}[_nghost-%COMP%] .dot-wrapper[_ngcontent-%COMP%]{padding:0 4px}[_nghost-%COMP%] .dot-wrapper.selected[_ngcontent-%COMP%] .dot[_ngcontent-%COMP%]{background-color:#333}
1[_nghost-%COMP%] .h-screenshot[_ngcontent-%COMP%]{border-radius:20px;box-shadow:0 1px 3px #0000001f,0 1px 2px #0000003d;width:100%;overflow:hidden}[_nghost-%COMP%] .h-screenshot[_ngcontent-%COMP%] .mat-mdc-tab-header{display:none}[_nghost-%COMP%] .h-screenshot[_ngcontent-%COMP%] .file[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;padding:24px;transition:background-color .1s linear}[_nghost-%COMP%] .h-screenshot[_ngcontent-%COMP%]:hover .file[_ngcontent-%COMP%]{background-color:#0006}[_nghost-%COMP%] .h-metric[_ngcontent-%COMP%]{margin-bottom:16px}[_nghost-%COMP%] .h-card[_ngcontent-%COMP%]{display:flex;text-align:left}[_nghost-%COMP%] .h-card-inner[_ngcontent-%COMP%]{padding:16px 0 0}@media only screen and (min-width:1280px){[_nghost-%COMP%] .h-card-inner[_ngcontent-%COMP%]{padding:40px 0 0;margin-left:-56%}}@media(max-width:1400px)and (min-width:1280px){[_nghost-%COMP%] .h-card-inner[_ngcontent-%COMP%]{margin-left:-60%}}[_nghost-%COMP%] .h-card-inner[_ngcontent-%COMP%] .toolbar-wrapper[_ngcontent-%COMP%]{top:-58px;left:-3px;right:-3px;width:auto}[_nghost-%COMP%] .h-card-inner[_ngcontent-%COMP%]:not(.readOnly):hover .secondary[_ngcontent-%COMP%]{height:100%;opacity:1;transform:scaleY(1)}[_nghost-%COMP%] .h-card-inner[_ngcontent-%COMP%]:not(.readOnly):hover .h-card-inner2[_ngcontent-%COMP%]{border:3px solid #3367d6}[_nghost-%COMP%] .h-card-inner2[_ngcontent-%COMP%]{display:flex;flex-direction:column;border:3px solid transparent;position:relative;padding:16px 12px 12px;transition:border .1s linear;width:100%;width:340px}@media only screen and (min-width:1280px){[_nghost-%COMP%] .h-card-inner2[_ngcontent-%COMP%]{border-top-color:#333}}[_nghost-%COMP%] .h-card-inner[_ngcontent-%COMP%] app-editor[_ngcontent-%COMP%]{display:block;width:100%;max-width:340px}[_nghost-%COMP%] .h-card-wrapper[_ngcontent-%COMP%]{flex-wrap:wrap;display:flex;flex-direction:row;justify-content:space-between;margin-bottom:52px}@media only screen and (min-width:1280px){[_nghost-%COMP%] .h-card-wrapper[_ngcontent-%COMP%]{position:absolute;padding-top:300px;padding-bottom:300px;inset:0;flex-direction:column;justify-content:space-between;flex-wrap:nowrap;margin-bottom:0}}@media only screen and (min-width:1280px){[_nghost-%COMP%] .h-card[_ngcontent-%COMP%]:nth-child(2n) .h-card-inner[_ngcontent-%COMP%]{margin-right:-56%;margin-left:auto}}@media(max-width:1400px)and (min-width:1280px){[_nghost-%COMP%] .h-card[_ngcontent-%COMP%]:nth-child(2n) .h-card-inner[_ngcontent-%COMP%]{margin-right:-60%}}[_nghost-%COMP%] .h-card[_ngcontent-%COMP%] app-bar-chart[_ngcontent-%COMP%]{margin:32px 0}[_nghost-%COMP%] .h-number[_ngcontent-%COMP%]{font-weight:700;letter-spacing:-2px;font-size:clamp(34px,1vh,5rem);line-height:clamp(52px,1vh,6rem)}@media only screen and (min-height:900px){[_nghost-%COMP%] .h-number[_ngcontent-%COMP%]{font-size:5rem;line-height:6rem}}[_nghost-%COMP%] .h-description[_ngcontent-%COMP%]{width:100%;font-size:clamp(14px,1vh,1.8rem);line-height:clamp(20px,1vh,2rem)}@media only screen and (min-height:900px){[_nghost-%COMP%] .h-description[_ngcontent-%COMP%]{font-size:1.8rem;line-height:2.2rem}}[_nghost-%COMP%] .main-cta[_ngcontent-%COMP%]{color:#fff;display:inline-block;font-weight:700;padding:20px;margin:60px auto 32px;transition:background-color .3s cubic-bezier(.25,.8,.25,1);font-size:clamp(16px,1vh,2.4rem);line-height:clamp(18px,1vh,2.4rem)}@media only screen and (min-width:1280px){[_nghost-%COMP%] .main-cta[_ngcontent-%COMP%]{padding:24px;margin:100px auto 40px}}@media only screen and (min-height:900px){[_nghost-%COMP%] .main-cta[_ngcontent-%COMP%]{font-size:2.3rem;line-height:2.3rem}}[_nghost-%COMP%] .main-cta-1[_ngcontent-%COMP%]{margin-top:0;margin-bottom:60px}@media only screen and (min-width:1280px){[_nghost-%COMP%] .main-cta-1[_ngcontent-%COMP%]{padding:24px;margin-bottom:120px}}[_nghost-%COMP%] .prev[_ngcontent-%COMP%], [_nghost-%COMP%] .next[_ngcontent-%COMP%]{background:0 0;border:0;justify-self:center;outline:0;position:absolute;top:-20px;z-index:1;margin-top:-4px}[_nghost-%COMP%] .prev[_ngcontent-%COMP%] button[_ngcontent-%COMP%], [_nghost-%COMP%] .next[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{opacity:.8}[_nghost-%COMP%] .prev[_ngcontent-%COMP%] .mdc-button__label, [_nghost-%COMP%] .next[_ngcontent-%COMP%] .mdc-button__label{display:flex;align-items:center;justify-content:center}[_nghost-%COMP%] .prev[_ngcontent-%COMP%], [_nghost-%COMP%] .next[_ngcontent-%COMP%]{cursor:pointer}[_nghost-%COMP%] .next[_ngcontent-%COMP%]{right:0}[_nghost-%COMP%] .prev[_ngcontent-%COMP%]{left:0}[_nghost-%COMP%] .masonry[_ngcontent-%COMP%]{border-radius:20px;overflow:hidden;column-gap:2px}[_nghost-%COMP%] .masonry[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin-bottom:2px}.gridContainer[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,1fr);grid-template-rows:repeat(8,5vw);grid-gap:15px}.gridContainer[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:none;width:100%;height:100%;object-fit:cover}.media-link[_ngcontent-%COMP%]{position:absolute;inset:0;display:none}.media-link.active[_ngcontent-%COMP%]{display:block}",".toolbar[_ngcontent-%COMP%]{display:flex;align-items:center;transition-duration:218ms;transition-property:all;height:0;opacity:0;transform:scaleY(0)}.toolbar.active[_ngcontent-%COMP%]{height:100%;opacity:1;transform:scaleY(1)}.toolbar.hidden[_ngcontent-%COMP%]{display:none}.toolbar-wrapper[_ngcontent-%COMP%]{position:absolute;top:0;right:0;left:0;z-index:2}.toolbar-wrapper.active[_ngcontent-%COMP%]{bottom:0}.toolbar-wrapper[_ngcontent-%COMP%] .border[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%;border:3px solid transparent}.toolbar-wrapper[_ngcontent-%COMP%] .border.active[_ngcontent-%COMP%]{border-color:var(--color-primary)}.toolbar-wrapper-inner[_ngcontent-%COMP%]{width:100%;height:56px}@media(max-width:600px){.toolbar-wrapper-inner[_ngcontent-%COMP%]{font-size:13px;height:40px}}.toolbar.secondary[_ngcontent-%COMP%]{background-color:var(--color-primary);color:#fff}.toolbar.secondary[_ngcontent-%COMP%] .divider[_ngcontent-%COMP%]{background-color:#ffffffb3;align-self:center;height:32px;width:1px;margin:0 8px 0 16px}.toolbar.secondary[_ngcontent-%COMP%] > .row[_ngcontent-%COMP%]{padding:0 24px;width:100%;justify-content:space-between;margin:0}.toolbar.primary[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{max-height:36px;margin:0 24px}@media(max-width:600px){.toolbar.primary[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin:0 24px;font-size:13px;line-height:26px;padding:0 8px}}.left-panel[_ngcontent-%COMP%], .right-panel[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center}.right-panel[_ngcontent-%COMP%]{position:absolute;top:8px;right:0;color:#fff}.right-panel[_ngcontent-%COMP%] .close[_ngcontent-%COMP%]{--mat-icon-button-state-layer-color: #fff;--mat-icon-button-icon-color: #fff;color:#fff}@media(max-width:600px){.right-panel[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-width:auto;padding:0 6px}.right-panel[_ngcontent-%COMP%] button[_ngcontent-%COMP%] .material-symbols-rounded[_ngcontent-%COMP%]{font-size:18px}}@media(max-width:600px){.left-panel[_ngcontent-%COMP%]{display:none}}.upload-wrapper[_ngcontent-%COMP%] .drag[_ngcontent-%COMP%]{padding-top:100px;padding-left:24px}"],changeDetection:0})}}return n})();var gn=["editorList"];function hn(n,r){n&1&&(w(0,"div",3),L(1,"div",null,0),S())}function Cn(n,r){if(n&1&&c(0,hn,3,0,"div",3),n&2){let t=r.$implicit,e=o(2);p(e.isEditorHidden(t.data)?-1:0)}}function un(n,r){if(n&1&&(w(0,"div",2),b(1,Cn,1,1,null,null,D),S()),n&2){let t=o();P("readOnly",t.nodeData.readOnly),a(),M(t.nodeData.data)}}var Me=(()=>{class n extends A{constructor(){super(),this.destroyRef=v(N),this.init=!1,this.quillConfig={modules:{toolbar:[[{header:1}],["bold","italic","underline","link"]]},placeholder:"Add text ...",theme:"bubble"},this.initConfig={},this.staticHtml=[],this.editorList=nt("editorList"),Q(()=>this.initQuill())}ngOnInit(){this.nodeData=C({},this.data()?.node),this.data2=this.nodeData,this.quillConfig=x(C({},this.quillConfig),{readOnly:this.nodeData.readOnly});let t;this.nodeData.data.map((e,i)=>{e.data?.blocks?t=X(e.data.blocks):t="",this.staticHtml.push(t)})}initQuill(){let t,e;this.editorList()?.map((i,l)=>{e=this.nodeData.data[l],i.nativeElement.innerHTML=this.staticHtml[l],t=new $(i.nativeElement,this.quillConfig);for(let u in this.initConfig)t.format(u,this.initConfig[u]);e.data?.ops&&t.setContents(e.data),this.autoSave(e.id,t)}
1)}autoSave(t,e){let i=new j;e.on("text-change",()=>i.next()),i.pipe(R(2e3),I(this.destroyRef)).subscribe(()=>{this.data2=x(C({},this.data2),{data:this.data2.data.map(l=>l.id===t?x(C({},l),{data:e.getContents()}):l)}),this.clicked({type:"update_editor",data:this.data2})})}onEditorSave(t,e){this.data2=x(C({},this.data2),{data:this.data2.data.map(i=>i.id===e?x(C({},i),{data:{blocks:t}}):i)}),this.clicked({type:"update_editor",data:this.data2})}isEditorHidden(t){return t&&Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype&&this.nodeData.readOnly}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=E({type:n,selectors:[["app-editor-col"]],viewQuery:function(e,i){e&1&&T(i.editorList,gn,5),e&2&&B()},features:[F],decls:1,vars:1,consts:[["editorList",""],[1,"columns",3,"readOnly"],[1,"columns"],[1,"editor_col"]],template:function(e,i){e&1&&c(0,un,3,2,"div",1),e&2&&p(i.nodeData?0:-1)},styles:["[_nghost-%COMP%]{display:block;width:100%;margin:40px auto 0;max-width:700px}@media only screen and (min-width:960px){[_nghost-%COMP%]{max-width:1200px}}[_nghost-%COMP%] .columns[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-left:-16px;margin-right:-16px;justify-content:space-between}@media only screen and (min-width:960px){[_nghost-%COMP%] .columns[_ngcontent-%COMP%]{flex-direction:row}}[_nghost-%COMP%] .columns[_ngcontent-%COMP%] .editor_col[_ngcontent-%COMP%]{padding:16px;width:100%;min-width:33.33%}"],changeDetection:0})}}return n})();var fn=["editor"];function xn(n,r){n&1&&L(0,"div",null,0)}function vn(n,r){if(n&1&&c(0,xn,2,0,"div"),n&2){let t=o();p(t.isEditorHidden(t.nodeData.data)?-1:0)}}var Oe=(()=>{class n extends A{constructor(){super(),this.destroyRef=v(N),this.store=v(J),this.init=!1,this.hasGoogleDrive=!0,this.quillConfig={modules:{toolbar:[[{header:1},{header:2}],["bold","italic","underline","link"]]},placeholder:"Add text...",theme:"bubble"},this.initConfig={},this.editor=H("editor"),this.htmlCache=new Map,this.store.select(U).pipe(I(),q()).subscribe(t=>{this.workspace=t.workspace}),Q(()=>this.initQuill())}ngOnInit(){this.nodeData=this.data()?.node,this.quillConfig=x(C({},this.quillConfig),{readOnly:this.nodeData.readOnly}),this.nodeData.data?.blocks&&(this.staticHtml=X(this.nodeData.data.blocks))}initQuill(){let t=this.editor();if(!t?.nativeElement)return;this.staticHtml&&(t.nativeElement.innerHTML=this.staticHtml);let e=new $(t.nativeElement,this.quillConfig);for(let i in this.initConfig)e.format(i,this.initConfig[i]);this.nodeData.data?.ops&&e.setContents(this.nodeData.data),this.autoSave(e)}autoSave(t){let e=new j;t.on("text-change",()=>e.next()),e.pipe(R(2e3),I(this.destroyRef)).subscribe(()=>{this.nodeData=x(C({},this.nodeData),{data:t.getContents()}),this.clicked({type:"update_editor",data:this.nodeData})})}onEditorSave(t,e){this.nodeData=x(C({},this.nodeData),{data:{blocks:t}}),this.clicked({type:"update_editor",data:this.nodeData})}isEditorHidden(t){return t&&Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype&&this.nodeData.readOnly}getHtml(t){if(!t?.ops)return"";let e=JSON.stringify(t.ops);if(this.htmlCache.has(e))return this.htmlCache.get(e);let i=document.createElement("div");new $(i).setContents(t.ops);let u=i.innerHTML;return this.htmlCache.set(e,u),u}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=E({type:n,selectors:[["app-editor2"]],viewQuery:function(e,i){e&1&&T(i.editor,fn,5),e&2&&B()},features:[F],decls:1,vars:1,consts:[["editor",""]],template:function(e,i){e&1&&c(0,vn,1,1),e&2&&p(i.nodeData?0:-1)},styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:700px;margin:0 auto}"],changeDetection:0})}}return n})();var yn=["video"],bn=(n,r)=>["/",n,r,"pdf"];function Mn(n,r){n&1&&(d(0,"div",16)(1,"span",7),m(2,"sync"),s(),m(3," Saving ... "),s())}function On(n,r){n&1&&(d(0,"div",16)(1,"span",7),m(2,"check_circle"),s(),m(3," Saved successfully "),s())}function Pn(n,r){if(n&1){let t=y();d(0,"div",14)(1,"mat-slide-toggle",15),h("change",function(){_(t);let i=o();return g(i.onPreviewChange())}),m(2,"Preview "),s()(),c(3,Mn,4,0,"div",16),c(4,On,4,0,"div",16)}if(n&2){let t=o();a(),f("formControl",t.preview),a(2),p(t.status()===0?3:-1),a(),p(t.status()===1?4:-1)}}function wn(n,r){if(n&1){let t=y();d(0,"button",17),h("click",function(){_(t);let i=o();return g(i.openSettings())}),d(1,"span",7),m(2,"settings"),s()(),d(3,"button",18),h("click",function(){_(t);let i=o();return g(i.openShareLink())}),d(4,"span",19),m(5,"share"),s()()}}function kn(n,r){n&1&&O(0,"mat-progress-bar",10)}function En(n,r){if(n&1){let t=y();d(0,"app-node-loader",20),h("action",function(i){_(t);let l=o();return g(l.onNodeAction(i))}),s()}if(n&2){let t=r.$implicit;bt(t.data.node.type),f("nodes",t)}}var ho=(()=>{class n{constructor(){this.doc=v(it),this.dialogService=v(dt),this.store=v(J),this.titleService=v(Tt),this.cdr=v(at),this.actions$=v(Ut),this.video=H("video"),this.isLoading=Bt(this.store.select(Rt)),this.readOnly=!0,this.preview=new Nt,this.nodes=[],this.components={banner:xe,editor:Oe,body:be,editor_col:Me},this.status=ut(void 0),this.isDateDisabled=!1,this.parentActions=zt;let t=this.titleService;this.actions$.pipe($t(Vt),I(),Ct(this.store.select(U))).subscribe(([e,i])=>{this.nodes=[],this.date=i.date,i.layout?.map(l=>{this.updateLayout(l)}),this.cdr.markForCheck()}),this.store.select(U).pipe(q()).subscribe(e=>{this.isAuthenticated=e.isAuthenticated,this.readOnly=!e.isAuthenticated,this.link=e.link,this.date=e.date,this.reportId=e.reportId,e.layout?.map(i=>{this.updateLayout(i)}),this.workspace=e.workspace,t.setTitle(`${e.campaign.name} | ${e.campaign.client} `),this.cdr.markForCheck()}),this.store.select(jt).pipe(I()).subscribe(e=>{this.status.set(e),setTimeout(()=>{this.status()===mt.Saved&&this.status.set(mt.Idle)},2e3)})}onResize(){let t=document.getElementsByClassName("ct");for(let e=0;e<t.length;e++)t[e].hasAttribute("style")&&t[e].removeAttribute("style")}updateLayout(t){let e=!1;if(this.nodes.map(i=>{i.data.node.id===t.id&&(e=!0)}),!e){let i=new ie(this.components[t.type],{node:x(C({},t),{readOnly:this.readOnly})},null);this.nodes.push(i)}}downloadCSV(){this.store.dispatch(Lt())}onNodeAction(t){switch(t.type){case"update":this.update(t.data);break;case"update_editor":this.updateEditor(t.data);break;default:}}trackByIndex(t){return t}updateEditor(t){let e=C({},t);delete e.readOnly,this.store.dispatch(Ht({data:e}))}update(t){let e=t;delete e.readOnly,this.store.dispatch(At({data:e}))}onPreviewChange(){this.readOnly=this.preview.value,this.store.dispatch(Ft({data:this.readOnly}))}openSettings(){this.openDialog(de,"600px",{})}openShareLink(){let t=new URL(this.link),e={link:new URL(`${t.origin}${t.pathname}/highlight`),date:this.date};this.openDialog(_e,"500px",e)}openDialog(t,e,i){this.dialogService.open({content:t,origin:this.doc,width:e,height:"100%",
1noBackdrop:!1,isGlobal:!0,data:C({animation:!0},i),position:{top:0,right:0,bottom:0,left:0}})}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=E({type:n,selectors:[["app-highlight"]],viewQuery:function(e,i){e&1&&T(i.video,yn,5),e&2&&B()},hostBindings:function(e,i){e&1&&h("resize",function(){return i.onResize()},xt)},decls:21,vars:13,consts:[["color","primary",1,"main-toolbar"],[1,"pl-header"],[1,"pl-row"],[3,"workspace"],[1,"pl-header-cta"],[3,"date","parentActions","isDisabled"],["mat-icon-button","","aria-label","Download PDF","target","_blank",3,"routerLink","queryParamsHandling"],[1,"material-symbols-rounded"],["mat-icon-button","","aria-label","Download CSV",3,"click"],[1,"csv-button"],["color","accent","mode","indeterminate"],[1,"wrapper"],["intersectionObserverList",""],[3,"class","nodes"],[1,"toggle"],[3,"change","formControl"],[1,"autosave"],["mat-icon-button","","aria-label","Settings",3,"click"],["mat-icon-button","","aria-label","Share",3,"click"],[1,"share","material-symbols-rounded"],[3,"action","nodes"]],template:function(e,i){e&1&&(d(0,"mat-toolbar",0)(1,"div",1)(2,"div",2),O(3,"app-guest-logo",3),c(4,Pn,5,3),s(),d(5,"div",4),O(6,"app-datepicker2",5),c(7,wn,6,0),d(8,"a",6)(9,"span",7),m(10,"picture_as_pdf"),s()(),d(11,"button",8),h("click",function(){return i.downloadCSV()}),d(12,"span",9),m(13,"csv"),s()()()(),c(14,kn,1,0,"mat-progress-bar",10),s(),d(15,"div",11)(16,"div",12)(17,"div"),b(18,En,1,3,"app-node-loader",13,D),s(),O(20,"app-guest-footer",3),s()()),e&2&&(a(3),f("workspace",i.workspace),a(),p(i.isAuthenticated?4:-1),a(2),f("date",i.date)("parentActions",i.parentActions)("isDisabled",i.isDateDisabled),a(),p(i.readOnly?-1:7),a(),f("routerLink",Et(10,bn,i.workspace==null?null:i.workspace.slug,i.reportId))("queryParamsHandling","merge"),a(6),p(i.isLoading()?14:-1),a(4),M(i.nodes),a(2),f("workspace",i.workspace))},dependencies:[Kt,Jt,re,ae,Wt,Yt,Z,K,me,rt,oe,Qt,qt,Gt,gt,Ce,pe],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;background-color:var(--background-color);height:100%}[_nghost-%COMP%] mat-progress-bar[_ngcontent-%COMP%]{position:absolute;bottom:0;left:0}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;overflow:auto}[_nghost-%COMP%] .pl-row[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center}[_nghost-%COMP%] .toggle[_ngcontent-%COMP%]{display:flex;margin-left:16px;font-size:14px}@media only screen and (min-width:1280px){[_nghost-%COMP%] .toggle[_ngcontent-%COMP%]{font-size:inherit;margin-left:82px}}[_nghost-%COMP%] .toggle[_ngcontent-%COMP%] mat-slide-toggle[_ngcontent-%COMP%]{border:1px solid #676767;border-radius:16px;padding:6px 8px;align-items:center;display:flex}[_nghost-%COMP%] app-node-loader[_ngcontent-%COMP%]{display:block;width:100%;max-width:1024px;text-align:center;margin:0 auto 52px;padding:0 24px;font-size:clamp(18px,1vh,1.5rem);line-height:2.2rem}@media only screen and (min-height:900px){[_nghost-%COMP%] app-node-loader[_ngcontent-%COMP%]{font-size:2rem}}[_nghost-%COMP%] app-node-loader.banner[_ngcontent-%COMP%]{max-width:none;padding:0;margin:0 24px 24px;border-radius:var(--border-radius);width:auto;overflow:hidden}[_nghost-%COMP%] app-node-loader.editor_col[_ngcontent-%COMP%]{position:relative;z-index:0;text-align:left}@media only screen and (min-width:960px){[_nghost-%COMP%] app-node-loader.editor_col[_ngcontent-%COMP%]{max-width:none}}@media only screen and (min-width:600px){[_nghost-%COMP%] app-node-loader[_ngcontent-%COMP%]{margin-bottom:72px}}[_nghost-%COMP%] app-node-loader.editor[_ngcontent-%COMP%]{margin-bottom:0}[_nghost-%COMP%] app-node-loader.editor_col[_ngcontent-%COMP%]{margin-bottom:0;padding-bottom:120px}[_nghost-%COMP%] app-node-loader.body[_ngcontent-%COMP%]{margin-top:100px}[_nghost-%COMP%] .autosave[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;font-size:14px;margin-left:32px;color:#137333}[_nghost-%COMP%] .autosave[_ngcontent-%COMP%] .material-symbols-rounded[_ngcontent-%COMP%]{font-size:20px;margin-right:3px;padding:2px 0}@media(max-width:600px){[_nghost-%COMP%] .autosave[_ngcontent-%COMP%]{position:absolute;background:#fff;padding:2px 13px;border-radius:4px;z-index:1;box-shadow:0 10px 20px #00000030,0 6px 6px #0000003b;right:10px;font-size:13px}}@media(max-width:800px){mat-toolbar[_ngcontent-%COMP%] .pl-header[_ngcontent-%COMP%]{padding-right:0}mat-toolbar[_ngcontent-%COMP%] .pl-header-cta[_ngcontent-%COMP%] button[_ngcontent-%COMP%], mat-toolbar[_ngcontent-%COMP%] .pl-header-cta[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:none}}","mat-toolbar[_ngcontent-%COMP%]{min-height:64px;position:relative}.pl-header[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:row;align-items:center;padding:0 16px 0 0}.pl-header-cta[_ngcontent-%COMP%]{margin-left:auto;display:flex;flex-direction:row;align-items:center}.pl-header-cta[_ngcontent-%COMP%] app-datepicker2[_ngcontent-%COMP%]{padding:6px 8px}.pl-header-cta[_ngcontent-%COMP%] .mat-mdc-icon-button.mat-mdc-button-base[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:0}.pl-header-cta[_ngcontent-%COMP%] .mat-mdc-icon-button.mat-mdc-button-base[_ngcontent-%COMP%] .material-symbols-rounded[_ngcontent-%COMP%]{width:30px;font-size:30px;height:30px}.pl-header-cta[_ngcontent-%COMP%] .csv-button[_ngcontent-%COMP%]{font-size:14px;font-weight:700;display:flex;height:24px;align-items:center;justify-content:center;border-radius:4px;padding:0 2px 2px;border:2px solid}"],changeDetection:0})}}return n})();export{ho as default};
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.