PageSourceSearch

https://flowerrie.com/_next/static/chunks/8071.ef26eb8df34134d6.js

js flowerrie.com collected 2026-10-07 17:49:20 UTC 17,827 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8071],{812:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(76555).A)("twitter",[["path",{d:"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z",key:"pff0z6"}]])},1050:(e,t,s)=>{s.d(t,{J:()=>r});var a=s(73365);s(1521);var i=s(59731),n=s(19952);function r(e){let{className:t,...s}=e;return(0,a.jsx)(i.b,{"data-slot":"label",className:(0,n.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),...s})}},9563:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(76555).A)("instagram",[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]])},24997:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(76555).A)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},30452:(e,t,s)=>{s.r(t),s.d(t,{default:()=>S});var a=s(73365),i=s(1521),n=s(21474),r=s(70383),l=s(48158),o=s(96625),c=s(31312),u=s(50434),d=s(58336),h=s(12860),m=s(1050),p=s(89645),x=s(74272),y=s(9563),f=s(72578),v=s(84285),b=s(66703),g=s(812),k=s(68816),j=s(24997),w=s(7477),N=s(38446);let C=[{key:"instagram",label:"Instagram",icon:(0,a.jsx)(y.A,{className:"h-5 w-5"}),apiCapable:!0,metricFields:[{key:"followers",label:"Followers"},{key:"reach",label:"Reach (7d)"},{key:"engagement",label:"Engagement"}]},{key:"youtube",label:"YouTube",icon:(0,a.jsx)(f.A,{className:"h-5 w-5"}),apiCapable:!0,metricFields:[{key:"followers",label:"Subscribers"},{key:"views",label:"Views"}]},{key:"gsc",label:"Google Search",icon:(0,a.jsx)(v.A,{className:"h-5 w-5"}),apiCapable:!0,metricFields:[{key:"impressions",label:"Impressions (7d)"},{key:"clicks7d",label:"Clicks (7d)"}]},{key:"linkedin",label:"LinkedIn",icon:(0,a.jsx)(b.A,{className:"h-5 w-5"}),apiCapable:!1,metricFields:[{key:"followers",label:"Followers"},{key:"impressions7d",label:"Impressions (7d)"}]},{key:"x",label:"X / Twitter",icon:(0,a.jsx)(g.A,{className:"h-5 w-5"}),apiCapable:!1,metricFields:[{key:"followers",label:"Followers"},{key:"impressions7d",label:"Impressions (7d)"}]}];function M(e){return null==e?"—":Number(e).toLocaleString("en-GB")}function S(e){let{onNavigate:t}=e,{data:s,patchData:y,integrations:f,loading:v,refetch:b}=(0,w.U1)(),g=(0,n.jE)(),S=s.social.platforms||{},R=(0,i.useRef)(!1),[A,P]=(0,i.useState)(null),[O,E]=(0,i.useState)({}),F=(0,r.n)({mutationFn:e=>{let{provider:t}=e;return(0,p.I7)(t)},onSuccess:(e,t)=>{let{provider:s,silent:a}=t;if(!a){var i;l.oR.success("".concat((null==(i=C.find(e=>e.key===s))?void 0:i.label)||s," synced"))}b(),g.invalidateQueries({queryKey:["hq-workspace"]})},onError:(e,t)=>{let{silent:s}=t,a=(null==e?void 0:e.message)||"Sync failed — check the connection in Settings";l.oR.error(s?"Auto-sync failed: ".concat(a):a)}});(0,i.useEffect)(()=>{if(v||R.current)return;R.current=!0;let e=Date.now();for(let s of C){var t;if(!s.apiCapable||!(null==(t=f[s.key])?void 0:t.connected))continue;let a=S[s.key],i=(null==a?void 0:a.lastSynced)?new Date(a.lastSynced).getTime():0;(!i||e-i>=432e5)&&F.mutate({provider:s.key,silent:!0})}},[v,f,S,F]);let L=A?C.find(e=>e.key===A):null;return(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsx)(N.u,{title:"Social Pulse",subtitle:"Followers, reach and search visibility — synced from APIs or logged by hand",actions:(0,a.jsx)(c.$,{variant:"outline",size:"sm",onClick:()=>t("settings"),children:"Manage connections"})}),(0,a.jsx)("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-3",children:C.map(e=>{var s,i,n,r,l,d;let h=S[e.key],m=f[e.key],p=!!(null==m?void 0:m.connected),x=e.metricFields[0],y=h?h[x.key]:null,v=(d=null==h||null==(s=h.previous)?void 0:s.followers,null==y||null==d?null:y-d);return(0,a.jsxs)(u.Zp,{className:"hq-card-hover flex flex-col",children:[(0,a.jsxs)(u.aR,{className:"flex-row items-center justify-between space-y-0 pb-2",children:[(0,a.jsxs)(u.ZB,{className:"flex items-center gap-2 text-base",children:[(0,a.jsx)("span",{className:"text-[var(--hq-coral)]",children:e.icon}),e.label]}),e.apiCapable?(0,a.jsx)(o.E,{variant:"outline",className:p?"border-emerald-400 text-emerald-600":"text-muted-foreground",children:p?"Connected":"Not connected"}):(0,a.jsx)(o.E,{variant:"outline",className:"text-muted-foreground",children:"Manual"})]}),(0,a.jsxs)(u.Wu,{className:"flex flex-1 flex-col justify-between gap-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,a.jsx)("span",{className:"text-3xl font-bold tracking-tight",children:M(y)}),null!==v&&0!==v?(0,a.jsxs)("span",{className:"text-xs font-medium ".concat(v>0?"text-emerald-600":"text-red-500"),children:[v>0?"+":"",M(v)]}):null]}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:x.label}),(0,a.jsx)("div",{className:"mt-3 space-y-1",children:e.metricFields.slice(1).map(e=>(0,a.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,a.jsx)("span",{className:"text-muted-foreground",children:e.label}),(0,a.jsx)("span",{className:"font-medium",children:M(h?h[e.key]:null)})]},e.key))}),"gsc"===e.key&&(null==h||null==(i=h.topQueries)?void 0:i.length)?(0,a.jsxs)("div",{className:"mt-3 space-y-1 rounded-lg border bg-muted/30 p-2",children:[(0,a.jsx)("p",{className:"text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:"Top queries"}),h.topQueries.slice(0,3).map((e,t)=>(0,a.jsxs)("p",{className:"truncate text-xs",children:[e.query," ",(0,a.jsxs)("span",{className:"text-muted-foreground",children:["\xb7 ",e.clicks," 
1clicks"]})]},t))]}):null,"instagram"===e.key&&(null==h||null==(n=h.topPosts)?void 0:n.length)?(0,a.jsxs)("div",{className:"mt-3 space-y-1 rounded-lg border bg-muted/30 p-2",children:[(0,a.jsx)("p",{className:"text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:"Top posts"}),h.topPosts.slice(0,3).map((e,t)=>{var s;return(0,a.jsxs)("p",{className:"truncate text-xs",children:[e.title," ",(0,a.jsxs)("span",{className:"text-muted-foreground",children:["\xb7 ",null!=(s=e.likes)?s:0," likes"]})]},t)})]}):null,"youtube"===e.key&&(null==h||null==(r=h.topVideos)?void 0:r.length)?(0,a.jsxs)("div",{className:"mt-3 space-y-1 rounded-lg border bg-muted/30 p-2",children:[(0,a.jsx)("p",{className:"text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:"Latest videos"}),h.topVideos.slice(0,3).map((e,t)=>(0,a.jsx)("p",{className:"truncate text-xs",children:e.title},t))]}):null]}),(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsx)("p",{className:"text-[11px] text-muted-foreground",children:(null==h?void 0:h.lastSynced)?"Updated ".concat(new Date(h.lastSynced).toLocaleDateString("en-GB",{day:"numeric",month:"short"})," (").concat(h.source,")"):"No data yet"}),(0,a.jsxs)("div",{className:"flex gap-1.5",children:[(0,a.jsxs)(c.$,{size:"sm",variant:"ghost",className:"h-7 px-2",onClick:()=>(e=>{let t=S[e.key]||{},s={};for(let a of e.metricFields){let e=t[a.key];s[a.key]=null==e?"":String(e)}E(s),P(e.key)})(e),children:[(0,a.jsx)(k.A,{className:"mr-1 h-3 w-3"})," Log"]}),e.apiCapable?p?(0,a.jsxs)(c.$,{size:"sm",variant:"outline",className:"h-7 px-2",disabled:F.isPending,onClick:()=>F.mutate({provider:e.key}),children:[(0,a.jsx)(j.A,{className:"mr-1 h-3 w-3 ".concat(F.isPending&&(null==(l=F.variables)?void 0:l.provider)===e.key?"animate-spin":"")}),"Sync"]}):(0,a.jsx)(c.$,{size:"sm",variant:"outline",className:"h-7 px-2",onClick:()=>t("settings"),children:"Connect"}):null]})]})]})]},e.key)})}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"Connected APIs auto-sync when you open this tab if the last sync was over 12 hours ago. Log numbers manually any time — deltas are tracked either way."}),(0,a.jsx)(d.lG,{open:!!A,onOpenChange:e=>!e&&P(null),children:(0,a.jsx)(d.Cf,{className:(0,x._)("max-h-[85dvh] max-w-sm overflow-y-auto"),children:L?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.c7,{children:(0,a.jsxs)(d.L3,{children:["Log ",L.label," numbers"]})}),(0,a.jsxs)("div",{className:"space-y-3",children:[L.metricFields.map(e=>{var t;return(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsx)(m.J,{children:e.label}),(0,a.jsx)(h.p,{inputMode:"numeric",value:null!=(t=O[e.key])?t:"",onChange:t=>E(s=>({...s,[e.key]:t.target.value})),placeholder:"0"})]},e.key)}),(0,a.jsx)(c.$,{className:"w-full",onClick:()=>{var e,t,s;if(!A)return;let a=C.find(e=>e.key===A),i=S[A]||{},n={source:"manual",lastSynced:new Date().toISOString(),previous:{followers:null!=(e=i.followers)?e:null,impressions7d:null!=(t=i.impressions7d)?t:null,lastSynced:null!=(s=i.lastSynced)?s:null}};for(let e of a.metricFields){let t=O[e.key];n[e.key]=""===t?null:Number(t.replace(/[^0-9.-]/g,""))||0}y({social:{platforms:{...S,[A]:{...i,...n}}}}),P(null),l.oR.success("".concat(a.label," numbers updated"))},children:"Save"})]})]}):null})})]})}},38446:(e,t,s)=>{s.d(t,{u:()=>n});var a=s(73365),i=s(19952);function n(e){let{title:t,subtitle:s,actions:n,className:r}=e;return(0,a.jsxs)("div",{className:(0,i.cn)("flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",r),children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:t}),s?(0,a.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:s}):null]}),n?(0,a.jsx)("div",{className:"flex flex-wrap items-center gap-2",children:n}):null]})}},50434:(e,t,s)=>{s.d(t,{BT:()=>o,Wu:()=>c,ZB:()=>l,Zp:()=>n,aR:()=>r,wL:()=>u});var a=s(73365);s(1521);var i=s(19952);function n(e){let{className:t,...s}=e;return(0,a.jsx)("div",{"data-slot":"card",className:(0,i.cn)("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",t),...s})}function r(e){let{className:t,...s}=e;return(0,a.jsx)("div",{"data-slot":"card-header",className:(0,i.cn)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",t),...s})}function l(e){let{className:t,...s}=e;return(0,a.jsx)("div",{"data-slot":"card-title",className:(0,i.cn)("leading-none font-semibold",t),...s})}function o(e){let{className:t,...s}=e;return(0,a.jsx)("div",{"data-slot":"card-description",className:(0,i.cn)("text-muted-foreground text-sm",t),...s})}function c(e){let{className:t,...s}=e;return(0,a.jsx)("div",{"data-slot":"card-content",className:(0,i.cn)("px-6",t),...s})}function u(e){let{className:t,...s}=e;return(0,a.jsx)("div",{"data-slot":"card-footer",className:(0,i.cn)("flex items-center px-6 [.border-t]:pt-6",t),...s})}},59731:(e,t,s)=>{s.d(t,{b:()=>l});var a=s(1521),i=s(75968),n=s(73365),r=a.forwardRef((e,t)=>
1(0,n.jsx)(i.sG.label,{...e,ref:t,onMouseDown:t=>{var s;t.target.closest("button, input, select, textarea")||(null==(s=e.onMouseDown)||s.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));r.displayName="Label";var l=r},66703:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(76555).A)("linkedin",[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]])},68816:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(76555).A)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]])},70383:(e,t,s)=>{s.d(t,{n:()=>u});var a=s(1521),i=s(97305),n=s(14370),r=s(93563),l=s(46835),o=class extends r.Q{#e;#t=void 0;#s;#a;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,l.f8)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#s,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,l.EN)(t.mutationKey)!==(0,l.EN)(this.options.mutationKey)?this.reset():this.#s?.state.status==="pending"&&this.#s.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#s?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#n(e)}getCurrentResult(){return this.#t}reset(){this.#s?.removeObserver(this),this.#s=void 0,this.#i(),this.#n()}mutate(e,t){return this.#a=t,this.#s?.removeObserver(this),this.#s=this.#e.getMutationCache().build(this.#e,this.options),this.#s.addObserver(this),this.#s.execute(e)}#i(){let e=this.#s?.state??(0,i.$)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#n(e){n.jG.batch(()=>{if(this.#a&&this.hasListeners()){let t=this.#t.variables,s=this.#t.context,a={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#a.onSuccess?.(e.data,t,s,a)}catch(e){Promise.reject(e)}try{this.#a.onSettled?.(e.data,null,t,s,a)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#a.onError?.(e.error,t,s,a)}catch(e){Promise.reject(e)}try{this.#a.onSettled?.(void 0,e.error,t,s,a)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},c=s(21474);function u(e,t){let s=(0,c.jE)(t),[i]=a.useState(()=>new o(s,e));a.useEffect(()=>{i.setOptions(e)},[i,e]);let r=a.useSyncExternalStore(a.useCallback(e=>i.subscribe(n.jG.batchCalls(e)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),u=a.useCallback((e,t)=>{i.mutate(e,t).catch(l.lQ)},[i]);if(r.error&&(0,l.GU)(i.options.throwOnError,[r.error]))throw r.error;return{...r,mutate:u,mutateAsync:r.mutate}}},72578:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(76555).A)("youtube",[["path",{d:"M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17",key:"1q2vi4"}],["path",{d:"m10 15 5-3-5-3z",key:"1jp15x"}]])},97305:(e,t,s)=>{s.d(t,{$:()=>l,s:()=>r});var a=s(14370),i=s(69131),n=s(71323),r=class extends i.k{#e;#r;#l;#o;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#l=e.mutationCache,this.#r=[],this.state=e.state||l(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#r.includes(e)||(this.#r.push(e),this.clearGcTimeout(),this.#l.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#r=this.#r.filter(t=>t!==e),this.scheduleGc(),this.#l.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#r.length||("pending"===this.state.status?this.scheduleGc():this.#l.remove(this))}continue(){return this.#o?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#c({type:"continue"})},s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#o=(0,n.II)({fn:()=>this.options.mutationFn?this.options.mutationFn(e,s):Promise.reject(Error("No mutationFn found")),onFail:(e,t)=>{this.#c({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#c({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#l.canRun(this)});let a="pending"===this.state.status,i=!this.#o.canStart();try{if(a)t();else{this.#c({type:"pending",variables:e,isPaused:i}),this.#l.config.onMutate&&await this.#l.config.onMutate(e,this,s);let t=await this.options.onMutate?.(e,s);t!==this.state.context&&this.#c({type:"pending",context:t,variables:e,isPaused:i})}let n=await this.#o.start();return await this.#l.config.onSuccess?.(n,e,this.state.context,this,s),await this.options.onSuccess?.(n,e,this.state.context,s),await this.#l.config.onSettled?.(n,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(n,null,e,this.state.context,s),this.#c({type:"success",data:n}),n}catch(t){try{await this.#l.config.onError?.(t,e,this.state.context,this,s)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,s)}catch(e){Promise.reject(e)}try{await this.#l.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,s)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,s)}catch(e){Promise.reject(e)}throw this.#c({type:"error",error:t}),t}finally{this.#l.runNext(this)}}#c(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};
1case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),a.jG.batch(()=>{this.#r.forEach(t=>{t.onMutationUpdate(e)}),this.#l.notify({mutation:this,type:"updated",action:e})})}};function l(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}}}]);

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.