@articles-media/articles-dev-box 1.0.7 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/Ad.cjs +1 -1
- package/dist/Ad.js +317 -281
- package/dist/{AdConfirmExitModal-TTHQo9Ou.js → AdConfirmExitModal-CxBj8QjF.js} +1 -1
- package/dist/{AdConfirmExitModal-BRpOrF3L.cjs → AdConfirmExitModal-ZUzQA_M8.cjs} +1 -1
- package/dist/{AdDetailsModal-CvFpYG_9.js → AdDetailsModal-CZTFVOLB.js} +1 -1
- package/dist/{AdDetailsModal-Diavle2E.cjs → AdDetailsModal-Cj0Uwazv.cjs} +1 -1
- package/dist/GameScoreboard.cjs +1 -1
- package/dist/GameScoreboard.js +93 -3832
- package/dist/GlobalBody.cjs +1 -1
- package/dist/GlobalBody.js +1 -1
- package/dist/GlobalHead.cjs +1 -1
- package/dist/GlobalHead.js +1 -1
- package/dist/ViewUserModal.cjs +1 -0
- package/dist/ViewUserModal.js +3793 -0
- package/dist/{toDate-CDo8dBwb.js → index-DLYx67wi.js} +476 -501
- package/dist/index-Ddv_TnxK.cjs +6 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +14 -8
- package/dist/toDate-CDU0W0Ek.cjs +1 -0
- package/dist/toDate-DiBqlcLH.js +28 -0
- package/dist/useUserDetails.cjs +1 -0
- package/dist/useUserDetails.js +33 -0
- package/dist/useUserToken.cjs +1 -0
- package/dist/useUserToken.js +22 -0
- package/package.json +18 -3
- package/dist/toDate-CzgAa_PT.cjs +0 -6
package/README.md
CHANGED
|
@@ -32,6 +32,8 @@ npm link @articles-media/articles-dev-box
|
|
|
32
32
|
- Articles Ad component that connects with user data.
|
|
33
33
|
- GlobalBody
|
|
34
34
|
- Easy way to add future logic and components to all projects with ease. For now handling the font awesome script.
|
|
35
|
+
- ViewUserModal
|
|
36
|
+
- View user profile data and recent activity
|
|
35
37
|
|
|
36
38
|
# Roadmap
|
|
37
39
|
⏹️ Remove Bootstrap reliance
|
package/dist/Ad.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const s=require("./jsx-runtime-nZSsnGb7.cjs"),c=require("react"),m=require("./toDate-CzgAa_PT.cjs"),W=require("./Button-BVYvDTtH.cjs");function X(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e)if(i!=="default"){const n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:()=>e[i]})}}return t.default=e,Object.freeze(t)}const w=X(c);var I=new Map,A=new WeakMap,T=0,K;function F(e){return e?(A.has(e)||(T+=1,A.set(e,T.toString())),A.get(e)):"0"}function G(e){return Object.keys(e).sort().filter(t=>e[t]!==void 0).map(t=>`${t}_${t==="root"?F(e.root):e[t]}`).toString()}function H(e){const t=G(e);let i=I.get(t);if(!i){const n=new Map;let l;const d=new IntersectionObserver(u=>{u.forEach(a=>{var o;const p=a.isIntersecting&&l.some(g=>a.intersectionRatio>=g);e.trackVisibility&&typeof a.isVisible>"u"&&(a.isVisible=p),(o=n.get(a.target))==null||o.forEach(g=>{g(p,a)})})},e);l=d.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),i={id:t,observer:d,elements:n},I.set(t,i)}return i}function J(e,t,i={},n=K){if(typeof window.IntersectionObserver>"u"&&n!==void 0){const o=e.getBoundingClientRect();return t(n,{isIntersecting:n,target:e,intersectionRatio:typeof i.threshold=="number"?i.threshold:0,time:0,boundingClientRect:o,intersectionRect:o,rootBounds:o}),()=>{}}const{id:l,observer:d,elements:u}=H(i),a=u.get(e)||[];return u.has(e)||u.set(e,a),a.push(t),d.observe(e),function(){a.splice(a.indexOf(t),1),a.length===0&&(u.delete(e),d.unobserve(e)),u.size===0&&(d.disconnect(),I.delete(l))}}function Q({threshold:e,delay:t,trackVisibility:i,rootMargin:n,root:l,triggerOnce:d,skip:u,initialInView:a,fallbackInView:o,onChange:p}={}){var g;const[y,C]=w.useState(null),M=w.useRef(p),N=w.useRef(a),[j,D]=w.useState({inView:!!a,entry:void 0});M.current=p,w.useEffect(()=>{if(N.current===void 0&&(N.current=a),u||!y)return;let E;return E=J(y,(b,_)=>{const S=N.current;N.current=b,!(S===void 0&&!b)&&(D({inView:b,entry:_}),M.current&&M.current(b,_),_.isIntersecting&&d&&E&&(E(),E=void 0))},{root:l,rootMargin:n,threshold:e,trackVisibility:i,delay:t},o),()=>{E&&E()}},[Array.isArray(e)?e.toString():e,y,l,n,d,u,i,o,t]);const h=(g=j.entry)==null?void 0:g.target,R=w.useRef(void 0);!y&&h&&!d&&!u&&R.current!==h&&(R.current=h,D({inView:!!a,entry:void 0}),N.current=a);const v=[C,j.inView,j.entry];return v.ref=v[0],v.inView=v[1],v.entry=v[2],v}const Y=async e=>{if(process.env.NODE_ENV==="development")try{return(await m.axios.get(`http://localhost:3001/api/ads/${e.ad_id}`,{params:{ad_id:e.ad_id,user_ad_token:e.user_ad_token}})).data.result}catch{}return m.axios.get(e.url,{params:{ad_id:e.ad_id}}).then(t=>t.data.result)},Z=60,ee={dedupingInterval:1e3*60*Z},se=(e,t)=>{const{data:i,error:n,isLoading:l,mutate:d}=m.useSWR(e?{url:`https://articles.media/api/ads/${e}`,ad_id:e,user_ad_token:t}:null,Y,ee);return{data:i,error:n,isLoading:l,mutate:d}};function te(e){return t=>{const n=(e?Math[e]:Math.trunc)(t);return n===0?0:n}}function re(e,t){return+m.toDate(e)-+m.toDate(t)}function V(e,t,i){const n=re(e,t)/m.millisecondsInMinute;return te(i?.roundingMethod)(n)}function L(e){return Math.trunc(e*m.millisecondsInMinute)}const ne=async e=>{if(process.env.NODE_ENV==="development")try{return(await m.axios.get("http://localhost:3001/api/ads",{params:{}})).data}catch{}return m.axios.get(e.url,{params:{}}).then(t=>t.data)},B=60,oe={dedupingInterval:L(B),focusThrottleInterval:L(B)},ie=e=>{const{data:t,error:i,isLoading:n,mutate:l}=m.useSWR({url:"https://articles.media/api/ads"},ne,oe);return{data:t,error:i,isLoading:n,mutate:l}},ae=c.lazy(()=>Promise.resolve().then(()=>require("./AdDetailsModal-Diavle2E.cjs"))),ce=c.lazy(()=>Promise.resolve().then(()=>require("./AdConfirmExitModal-BRpOrF3L.cjs")));function le(e,t){return Math.floor(Math.random()*(t-e+1))+e}function de(e){const i=[],{data:n}=ie();let{previewMode:l,darkMode:d,user_ad_token:u,userDetails:a}=e,o=e.previewData||{};const[p,g]=c.useState(null),[y,C]=c.useState(null),[M,N]=c.useState(null),[j,D]=c.useState(null),[h,R]=c.useState(0),[v,E]=c.useState(!1),[b,_]=c.useState(!1),[S,$]=c.useState(!1),[xe,me]=c.useState(new Date),[O,q]=c.useState([]),{data:r}=se(p,u);c.useEffect(()=>{n&&n?.length>0&&!p&&(console.log("Ad Mounted or reduxAds changed"),g(e.ad_id||n[le(0,n?.length-1)]?._id))},[n]),c.useEffect(()=>{},[r]),c.useEffect(()=>{r?.populated_promos&&h>=0&&D(r?.populated_promos[h])},[h,r]);function z(){_(!b)}const{ref:U,inView:k}=Q({threshold:0,triggerOnce:!0});function P(x){if(l&&console.log("Preventing this event from being logged as this ad is being shown in preview mode."),O.find(f=>f==x)){console.log("Already logged this event");return}m.axios.get("/api/ads/event",{params:{ad_id:r?._id,event:x}}).then(function(f){q([...O,x]),console.log(f.data)}).catch(function(f){console.log(f)})}return c.useEffect(()=>{if(!l&&(console.log("inView",k),k&&p)){let x=[{ad_id:p,date:new Date().toString()},...i.filter(f=>{if(console.log(V(new Date,new Date(f.date))),V(new Date,new Date(f.date))>5){console.log("adsViewed - Remove Old Ad View Object");return}else return console.log("adsViewed - Keep Ad View Object"),f})];console.log("unexpiredRecentViews",x)}},[k,p]),s.jsxRuntimeExports.jsxs("div",{ref:U,className:"ad-wrap",style:{"--articles-ad-background-color":o.background_color||r?.background_color,"--articles-ad-font-color":o.font_color||r?.font_color,"--articles-ad-border-color":o.border_color||r?.border_color},children:[b&&s.jsxRuntimeExports.jsx(ae,{setModalShow:_,ad:r,previewData:o}),S&&s.jsxRuntimeExports.jsx(ce,{setModalShow:$,ad:r,previewData:o}),s.jsxRuntimeExports.jsx("div",{className:"ad",children:a?.articles_membership?.status!=="Active"&&s.jsxRuntimeExports.jsxs("div",{className:"main-panel",children:[s.jsxRuntimeExports.jsx("div",{className:"ad-warning flex-header",children:s.jsxRuntimeExports.jsxs("div",{className:"",children:[r?.city&&"Local"," Advertisement"]})}),s.jsxRuntimeExports.jsxs("div",{className:"content-wrap",children:[s.jsxRuntimeExports.jsxs("div",{className:"photo-banner",children:[s.jsxRuntimeExports.jsx("div",{className:"logo",children:(o.logo?.location||r?.logo?.location)&&s.jsxRuntimeExports.jsx("img",{src:o?.logo?.key?`${process.env.NEXT_PUBLIC_CDN}${o?.logo?.key}`:`${process.env.NEXT_PUBLIC_CDN}${r?.logo?.key}`,alt:""})}),s.jsxRuntimeExports.jsx("div",{className:"icon d-none",children:s.jsxRuntimeExports.jsx("i",{className:"fas fa-mug-hot"})}),s.jsxRuntimeExports.jsx("img",{className:"photo",src:o?.background?.key?`${process.env.NEXT_PUBLIC_CDN}${o.background?.key}`:`${process.env.NEXT_PUBLIC_CDN}${r?.background?.key}`,alt:""})]}),s.jsxRuntimeExports.jsxs("div",{className:"details-wrap",children:[s.jsxRuntimeExports.jsxs("div",{className:"detail-title",children:[s.jsxRuntimeExports.jsx("div",{className:"detail",children:s.jsxRuntimeExports.jsx("span",{className:"h4",children:o?.business||r?.business})}),s.jsxRuntimeExports.jsxs("div",{className:"flex flex-column d-none",children:[s.jsxRuntimeExports.jsxs("div",{className:"detail",children:[s.jsxRuntimeExports.jsx("span",{className:"icon",children:s.jsxRuntimeExports.jsx("i",{className:"fas fa-search-location"})}),s.jsxRuntimeExports.jsxs("span",{children:[r?.city,", ",r?.state]})]}),s.jsxRuntimeExports.jsxs("div",{className:"detail",children:[s.jsxRuntimeExports.jsx("span",{className:"icon",children:s.jsxRuntimeExports.jsx("i",{className:"fas fa-clock me-2"})}),s.jsxRuntimeExports.jsx("span",{children:"6:30AM–8PM"})]})]})]}),r?.city&&s.jsxRuntimeExports.jsx("div",{className:"details mb-3 d-none"}),s.jsxRuntimeExports.jsx("div",{className:"short-description",children:o?.description||r?.description})]})]}),(!1)?.roles?.isDev&&r?.populated_promos?.length>0&&s.jsxRuntimeExports.jsxs("div",{children:[j&&s.jsxRuntimeExports.jsx("div",{className:"promos-wrap",children:j&&s.jsxRuntimeExports.jsxs("div",{className:"promo-wrap d-flex justify-content-between align-items-center mx-2 p-1 px-2 border border-2 border-light mb-0",children:[s.jsxRuntimeExports.jsxs("div",{className:"",children:[s.jsxRuntimeExports.jsx("div",{children:j.title}),s.jsxRuntimeExports.jsx("div",{className:"small",children:s.jsxRuntimeExports.jsx("div",{className:"small",children:j.details})})]}),s.jsxRuntimeExports.jsx(W.ArticlesButton,{className:"px-3",small:!0,onClick:()=>{console.log("Load Save Modal"),E(!0)},children:"Save"})]},j._id)}),s.jsxRuntimeExports.jsxs("div",{className:"d-flex justify-content-between",children:[s.jsxRuntimeExports.jsxs("div",{className:"px-2",children:[r?.populated_promos?.length," Promos Active"]}),s.jsxRuntimeExports.jsxs("div",{className:"controls",children:[s.jsxRuntimeExports.jsx("i",{className:"fad fa-arrow-circle-left",type:"button",onClick:()=>{h==0?R(r?.populated_promos?.length-1):R(x=>x-1)}}),r?.populated_promos?.map((x,f)=>s.jsxRuntimeExports.jsx("i",{className:`fa-square ${f==h?"fad":"fas"}`},x._id)),s.jsxRuntimeExports.jsx("i",{className:"fad fa-arrow-circle-right",type:"button",onClick:()=>{h==r?.populated_promos?.length-1?R(0):R(x=>x+1)}})]})]})]}),s.jsxRuntimeExports.jsx("hr",{style:{borderColor:"white"},className:"mt-auto mb-0"}),s.jsxRuntimeExports.jsxs("div",{className:"action-wrap d-flex justify-content-lg-between px-3 py-2",children:[s.jsxRuntimeExports.jsx("div",{onClick:()=>{z(),P("Details")},className:"action flex-grow-1 flex-shrink-0",children:"Details"}),s.jsxRuntimeExports.jsx("span",{className:"px-4"}),s.jsxRuntimeExports.jsx("a",{className:"action flex-grow-1 flex-shrink-0",href:r?.website,target:"_blank",rel:"noreferrer",onClick:x=>{x.preventDefault(),$(!0),P("Confirm Exit Modal Opened")},children:s.jsxRuntimeExports.jsx("div",{children:"Website"})})]})]})}),!l&&s.jsxRuntimeExports.jsx("div",{className:"advertise-with-us p-1",style:{backgroundColor:o.background_color||r?.background_color,color:o.font_color||r?.font_color,borderColor:o.border_color||r?.border_color},children:s.jsxRuntimeExports.jsxs(m.Link,{className:"small d-block w-100 text-center",href:"https://articles.media/advertising",newPage:!0,children:[s.jsxRuntimeExports.jsx("i",{className:"fas fa-share me-1"}),"Advertise with Articles Media!"]})})]})}const ue=c.memo(de);module.exports=ue;
|
|
1
|
+
"use strict";const e=require("./jsx-runtime-nZSsnGb7.cjs"),c=require("react"),M=require("./toDate-CDU0W0Ek.cjs"),N=require("./index-Ddv_TnxK.cjs"),X=require("./Button-BVYvDTtH.cjs");function K(s){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const i in s)if(i!=="default"){const n=Object.getOwnPropertyDescriptor(s,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:()=>s[i]})}}return t.default=s,Object.freeze(t)}const _=K(c);var C=new Map,S=new WeakMap,V=0,Y;function F(s){return s?(S.has(s)||(V+=1,S.set(s,V.toString())),S.get(s)):"0"}function G(s){return Object.keys(s).sort().filter(t=>s[t]!==void 0).map(t=>`${t}_${t==="root"?F(s.root):s[t]}`).toString()}function H(s){const t=G(s);let i=C.get(t);if(!i){const n=new Map;let l;const d=new IntersectionObserver(u=>{u.forEach(a=>{var o;const m=a.isIntersecting&&l.some(h=>a.intersectionRatio>=h);s.trackVisibility&&typeof a.isVisible>"u"&&(a.isVisible=m),(o=n.get(a.target))==null||o.forEach(h=>{h(m,a)})})},s);l=d.thresholds||(Array.isArray(s.threshold)?s.threshold:[s.threshold||0]),i={id:t,observer:d,elements:n},C.set(t,i)}return i}function J(s,t,i={},n=Y){if(typeof window.IntersectionObserver>"u"&&n!==void 0){const o=s.getBoundingClientRect();return t(n,{isIntersecting:n,target:s,intersectionRatio:typeof i.threshold=="number"?i.threshold:0,time:0,boundingClientRect:o,intersectionRect:o,rootBounds:o}),()=>{}}const{id:l,observer:d,elements:u}=H(i),a=u.get(s)||[];return u.has(s)||u.set(s,a),a.push(t),d.observe(s),function(){a.splice(a.indexOf(t),1),a.length===0&&(u.delete(s),d.unobserve(s)),u.size===0&&(d.disconnect(),C.delete(l))}}function Q({threshold:s,delay:t,trackVisibility:i,rootMargin:n,root:l,triggerOnce:d,skip:u,initialInView:a,fallbackInView:o,onChange:m}={}){var h;const[y,$]=_.useState(null),A=_.useRef(m),b=_.useRef(a),[f,D]=_.useState({inView:!!a,entry:void 0});A.current=m,_.useEffect(()=>{if(b.current===void 0&&(b.current=a),u||!y)return;let g;return g=J(y,(R,w)=>{const k=b.current;b.current=R,!(k===void 0&&!R)&&(D({inView:R,entry:w}),A.current&&A.current(R,w),w.isIntersecting&&d&&g&&(g(),g=void 0))},{root:l,rootMargin:n,threshold:s,trackVisibility:i,delay:t},o),()=>{g&&g()}},[Array.isArray(s)?s.toString():s,y,l,n,d,u,i,o,t]);const j=(h=f.entry)==null?void 0:h.target,E=_.useRef(void 0);!y&&j&&!d&&!u&&E.current!==j&&(E.current=j,D({inView:!!a,entry:void 0}),b.current=a);const v=[$,f.inView,f.entry];return v.ref=v[0],v.inView=v[1],v.entry=v[2],v}const Z=async s=>{if(process.env.NODE_ENV==="development")try{return(await N.axios.get(`http://localhost:3001/api/ads/${s.ad_id}`,{params:{ad_id:s.ad_id,user_ad_token:s.user_ad_token}})).data.result}catch{}return N.axios.get(s.url,{params:{ad_id:s.ad_id}}).then(t=>t.data.result)},ee=60,se={dedupingInterval:1e3*60*ee},te=(s,t)=>{const{data:i,error:n,isLoading:l,mutate:d}=N.useSWR(s?{url:`https://articles.media/api/ads/${s}`,ad_id:s,user_ad_token:t}:null,Z,se);return{data:i,error:n,isLoading:l,mutate:d}};function re(s){return t=>{const n=(s?Math[s]:Math.trunc)(t);return n===0?0:n}}function ne(s,t){return+M.toDate(s)-+M.toDate(t)}function L(s,t,i){const n=ne(s,t)/M.millisecondsInMinute;return re(i?.roundingMethod)(n)}function q(s){return Math.trunc(s*M.millisecondsInMinute)}const oe=async s=>{if(process.env.NODE_ENV==="development")try{return(await N.axios.get("http://localhost:3001/api/ads",{params:{}})).data}catch{}return N.axios.get(s.url,{params:{}}).then(t=>t.data)},B=60,ie={dedupingInterval:q(B),focusThrottleInterval:q(B)},ae=s=>{const{data:t,error:i,isLoading:n,mutate:l}=N.useSWR({url:"https://articles.media/api/ads"},oe,ie);return{data:t,error:i,isLoading:n,mutate:l}},ce=c.lazy(()=>Promise.resolve().then(()=>require("./AdDetailsModal-Cj0Uwazv.cjs"))),le=c.lazy(()=>Promise.resolve().then(()=>require("./AdConfirmExitModal-ZUzQA_M8.cjs")));function de(s,t){return Math.floor(Math.random()*(t-s+1))+s}function ue(s){const i=[],{data:n}=ae();let{previewMode:l,darkMode:d,user_ad_token:u,userDetails:a}=s,o=s.previewData||{};const[m,h]=c.useState(null),[y,$]=c.useState(null),[A,b]=c.useState(null),[f,D]=c.useState(null),[j,E]=c.useState(0),[v,g]=c.useState(!1),[R,w]=c.useState(!1),[k,O]=c.useState(!1),[me,pe]=c.useState(new Date),[P,W]=c.useState([]),{data:r}=te(m,u);c.useEffect(()=>{n&&n?.length>0&&!m&&(console.log("Ad Mounted or reduxAds changed"),h(s.ad_id||n[de(0,n?.length-1)]?._id))},[n]),c.useEffect(()=>{},[r]),c.useEffect(()=>{r?.populated_promos&&j>=0&&D(r?.populated_promos[j])},[j,r]);function z(){w(!R)}const{ref:U,inView:I}=Q({threshold:0,triggerOnce:!0});function T(x){if(l&&console.log("Preventing this event from being logged as this ad is being shown in preview mode."),P.find(p=>p==x)){console.log("Already logged this event");return}N.axios.get("/api/ads/event",{params:{ad_id:r?._id,event:x}}).then(function(p){W([...P,x]),console.log(p.data)}).catch(function(p){console.log(p)})}return c.useEffect(()=>{if(!l&&(console.log("inView",I),I&&m)){let x=[{ad_id:m,date:new Date().toString()},...i.filter(p=>{if(console.log(L(new Date,new Date(p.date))),L(new Date,new Date(p.date))>5){console.log("adsViewed - Remove Old Ad View Object");return}else return console.log("adsViewed - Keep Ad View Object"),p})];console.log("unexpiredRecentViews",x)}},[I,m]),e.jsxRuntimeExports.jsxs("div",{ref:U,className:"ad-wrap",style:{"--articles-ad-background-color":o.background_color||r?.background_color,"--articles-ad-font-color":o.font_color||r?.font_color,"--articles-ad-border-color":o.border_color||r?.border_color},children:[R&&e.jsxRuntimeExports.jsx(ce,{setModalShow:w,ad:r,previewData:o}),k&&e.jsxRuntimeExports.jsx(le,{setModalShow:O,ad:r,previewData:o}),e.jsxRuntimeExports.jsxs("div",{className:"ad",children:[a?.articles_membership?.status!=="Active"&&e.jsxRuntimeExports.jsxs("div",{className:"main-panel",children:[e.jsxRuntimeExports.jsx("div",{className:"ad-warning flex-header",children:e.jsxRuntimeExports.jsxs("div",{className:"",children:[r?.city&&"Local"," Advertisement"]})}),e.jsxRuntimeExports.jsxs("div",{className:"content-wrap",children:[e.jsxRuntimeExports.jsxs("div",{className:"photo-banner",children:[e.jsxRuntimeExports.jsx("div",{className:"logo",children:(o.logo?.location||r?.logo?.location)&&e.jsxRuntimeExports.jsx("img",{src:o?.logo?.key?`${process.env.NEXT_PUBLIC_CDN}${o?.logo?.key}`:`${process.env.NEXT_PUBLIC_CDN}${r?.logo?.key}`,alt:""})}),e.jsxRuntimeExports.jsx("div",{className:"icon d-none",children:e.jsxRuntimeExports.jsx("i",{className:"fas fa-mug-hot"})}),e.jsxRuntimeExports.jsx("img",{className:"photo",src:o?.background?.key?`${process.env.NEXT_PUBLIC_CDN}${o.background?.key}`:`${process.env.NEXT_PUBLIC_CDN}${r?.background?.key}`,alt:""})]}),e.jsxRuntimeExports.jsxs("div",{className:"details-wrap",children:[e.jsxRuntimeExports.jsxs("div",{className:"detail-title",children:[e.jsxRuntimeExports.jsx("div",{className:"detail",children:e.jsxRuntimeExports.jsx("span",{className:"h4",children:o?.business||r?.business})}),e.jsxRuntimeExports.jsxs("div",{className:"flex flex-column d-none",children:[e.jsxRuntimeExports.jsxs("div",{className:"detail",children:[e.jsxRuntimeExports.jsx("span",{className:"icon",children:e.jsxRuntimeExports.jsx("i",{className:"fas fa-search-location"})}),e.jsxRuntimeExports.jsxs("span",{children:[r?.city,", ",r?.state]})]}),e.jsxRuntimeExports.jsxs("div",{className:"detail",children:[e.jsxRuntimeExports.jsx("span",{className:"icon",children:e.jsxRuntimeExports.jsx("i",{className:"fas fa-clock me-2"})}),e.jsxRuntimeExports.jsx("span",{children:"6:30AM–8PM"})]})]})]}),r?.city&&e.jsxRuntimeExports.jsx("div",{className:"details mb-3 d-none"}),e.jsxRuntimeExports.jsx("div",{className:"short-description",children:o?.description||r?.description})]})]}),(!1)?.roles?.isDev&&r?.populated_promos?.length>0&&e.jsxRuntimeExports.jsxs("div",{children:[f&&e.jsxRuntimeExports.jsx("div",{className:"promos-wrap",children:f&&e.jsxRuntimeExports.jsxs("div",{className:"promo-wrap d-flex justify-content-between align-items-center mx-2 p-1 px-2 border border-2 border-light mb-0",children:[e.jsxRuntimeExports.jsxs("div",{className:"",children:[e.jsxRuntimeExports.jsx("div",{children:f.title}),e.jsxRuntimeExports.jsx("div",{className:"small",children:e.jsxRuntimeExports.jsx("div",{className:"small",children:f.details})})]}),e.jsxRuntimeExports.jsx(X.ArticlesButton,{className:"px-3",small:!0,onClick:()=>{console.log("Load Save Modal"),g(!0)},children:"Save"})]},f._id)}),e.jsxRuntimeExports.jsxs("div",{className:"d-flex justify-content-between",children:[e.jsxRuntimeExports.jsxs("div",{className:"px-2",children:[r?.populated_promos?.length," Promos Active"]}),e.jsxRuntimeExports.jsxs("div",{className:"controls",children:[e.jsxRuntimeExports.jsx("i",{className:"fad fa-arrow-circle-left",type:"button",onClick:()=>{j==0?E(r?.populated_promos?.length-1):E(x=>x-1)}}),r?.populated_promos?.map((x,p)=>e.jsxRuntimeExports.jsx("i",{className:`fa-square ${p==j?"fad":"fas"}`},x._id)),e.jsxRuntimeExports.jsx("i",{className:"fad fa-arrow-circle-right",type:"button",onClick:()=>{j==r?.populated_promos?.length-1?E(0):E(x=>x+1)}})]})]})]}),e.jsxRuntimeExports.jsx("hr",{style:{borderColor:"white"},className:"mt-auto mb-0"}),e.jsxRuntimeExports.jsxs("div",{className:"action-wrap d-flex justify-content-lg-between px-3 py-2",children:[e.jsxRuntimeExports.jsx("div",{onClick:()=>{z(),T("Details")},className:"action flex-grow-1 flex-shrink-0",children:"Details"}),e.jsxRuntimeExports.jsx("span",{className:"px-4"}),e.jsxRuntimeExports.jsx("a",{className:"action flex-grow-1 flex-shrink-0",href:r?.website,target:"_blank",rel:"noreferrer",onClick:x=>{x.preventDefault(),O(!0),T("Confirm Exit Modal Opened")},children:e.jsxRuntimeExports.jsx("div",{children:"Website"})})]})]}),a?.articles_membership?.status=="Active"&&e.jsxRuntimeExports.jsx("div",{className:"main-panel",children:e.jsxRuntimeExports.jsxs("div",{className:"content-wrap",children:[e.jsxRuntimeExports.jsxs("div",{className:"photo-banner",children:[e.jsxRuntimeExports.jsx("div",{className:"logo"}),e.jsxRuntimeExports.jsx("div",{className:"icon d-none",children:e.jsxRuntimeExports.jsx("i",{className:"fas fa-mug-hot"})}),e.jsxRuntimeExports.jsx("img",{className:"photo",alt:""})]}),e.jsxRuntimeExports.jsxs("div",{className:"details-wrap",children:[e.jsxRuntimeExports.jsx("div",{className:"detail-title",children:e.jsxRuntimeExports.jsx("div",{className:"detail",children:e.jsxRuntimeExports.jsx("span",{className:"h4",children:"Thank You So Much!"})})}),e.jsxRuntimeExports.jsxs("div",{className:"short-description",children:[e.jsxRuntimeExports.jsx("div",{className:"mb-2",children:"Without support from users like you, we wouldn't be here."}),e.jsxRuntimeExports.jsxs("div",{children:[e.jsxRuntimeExports.jsx("i",{className:"fas fa-comments-alt"}),"3 unread messages."]}),e.jsxRuntimeExports.jsxs("div",{children:[e.jsxRuntimeExports.jsx("i",{className:"fas fa-bell"}),"2 notifications."]})]})]})]})})]}),!l&&e.jsxRuntimeExports.jsx("div",{className:"advertise-with-us p-1",style:{backgroundColor:o.background_color||r?.background_color,color:o.font_color||r?.font_color,borderColor:o.border_color||r?.border_color},children:e.jsxRuntimeExports.jsxs(M.Link,{className:"small d-block w-100 text-center",href:"https://articles.media/advertising",newPage:!0,children:[e.jsxRuntimeExports.jsx("i",{className:"fas fa-share me-1"}),"Advertise with Articles Media!"]})})]})}const xe=c.memo(ue);module.exports=xe;
|