@articles-media/articles-dev-box 1.0.5 → 1.0.6

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 CHANGED
@@ -1,42 +1,44 @@
1
- # Articles Dev Box
2
-
3
- Shared code, functions, and components that are commonly used across Articles Media projects. None of this is meant to work outside the Articles Media frontend React ecosystem.
4
-
5
- ## Getting Started
6
-
7
- For production use add the organization scooped package to your package.json.
8
-
9
- ```bash
10
- npm i @articles-media/articles-dev-box
11
- ```
12
-
13
- For local development, navigate to this project and run this command.
14
-
15
- ```bash
16
- npm link
17
- ```
18
-
19
- Then go to the consuming project directory and run this command.
20
-
21
- ```bash
22
- npm link @articles-media/articles-dev-box
23
- ```
24
-
25
- ## Package Exports
26
-
27
- - ReturnToLauncherButton
28
- - For bringing users back to their state in the games showcase/launcher
29
- - GameScoreboard
30
- - Scoreboard for registered games that links with a user's Articles Media account.
31
- - Ad
32
- - Articles Ad component that connects with user data.
33
-
34
- # Roadmap
35
- ⏹️ Remove Bootstrap reliance
36
- ⏹️ Look into npm package yalc
37
- ⏹️ Automatic GitHub Action for NPM
38
-
39
-
40
- # TODO
41
- - Bundle SCSS on a component level instead of a project level.
1
+ # Articles Dev Box
2
+
3
+ Shared code, functions, and components that are commonly used across Articles Media projects. None of this is meant to work outside the Articles Media frontend React ecosystem.
4
+
5
+ ## Getting Started
6
+
7
+ For production use add the organization scooped package to your package.json.
8
+
9
+ ```bash
10
+ npm i @articles-media/articles-dev-box
11
+ ```
12
+
13
+ For local development, navigate to this project and run this command.
14
+
15
+ ```bash
16
+ npm link
17
+ ```
18
+
19
+ Then go to the consuming project directory and run this command.
20
+
21
+ ```bash
22
+ npm link @articles-media/articles-dev-box
23
+ ```
24
+
25
+ ## Package Exports
26
+
27
+ - ReturnToLauncherButton
28
+ - For bringing users back to their state in the games showcase/launcher
29
+ - GameScoreboard
30
+ - Scoreboard for registered games that links with a user's Articles Media account.
31
+ - Ad
32
+ - Articles Ad component that connects with user data.
33
+ - GlobalBody
34
+ - Easy way to add future logic and components to all projects with ease. For now handling the font awesome script.
35
+
36
+ # Roadmap
37
+ ⏹️ Remove Bootstrap reliance
38
+ ⏹️ Look into npm package yalc
39
+ ⏹️ Automatic GitHub Action for NPM
40
+
41
+
42
+ # TODO
43
+ - Bundle SCSS on a component level instead of a project level.
42
44
  - Verify I am exporting components the most efficient way.
package/dist/Ad.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";const s=require("./jsx-runtime-nZSsnGb7.cjs"),l=require("react"),R=require("./index-CqsCVLvJ.cjs"),X=require("./Button-BVYvDTtH.cjs");function z(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,r.get?r:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const N=z(l);var C=new Map,A=new WeakMap,O=0,F;function K(e){return e?(A.has(e)||(O+=1,A.set(e,O.toString())),A.get(e)):"0"}function G(e){return Object.keys(e).sort().filter(t=>e[t]!==void 0).map(t=>`${t}_${t==="root"?K(e.root):e[t]}`).toString()}function H(e){const t=G(e);let o=C.get(t);if(!o){const r=new Map;let d;const i=new IntersectionObserver(c=>{c.forEach(a=>{var x;const E=a.isIntersecting&&d.some(h=>a.intersectionRatio>=h);e.trackVisibility&&typeof a.isVisible>"u"&&(a.isVisible=E),(x=r.get(a.target))==null||x.forEach(h=>{h(E,a)})})},e);d=i.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),o={id:t,observer:i,elements:r},C.set(t,o)}return o}function J(e,t,o={},r=F){if(typeof window.IntersectionObserver>"u"&&r!==void 0){const x=e.getBoundingClientRect();return t(r,{isIntersecting:r,target:e,intersectionRatio:typeof o.threshold=="number"?o.threshold:0,time:0,boundingClientRect:x,intersectionRect:x,rootBounds:x}),()=>{}}const{id:d,observer:i,elements:c}=H(o),a=c.get(e)||[];return c.has(e)||c.set(e,a),a.push(t),i.observe(e),function(){a.splice(a.indexOf(t),1),a.length===0&&(c.delete(e),i.unobserve(e)),c.size===0&&(i.disconnect(),C.delete(d))}}function Q({threshold:e,delay:t,trackVisibility:o,rootMargin:r,root:d,triggerOnce:i,skip:c,initialInView:a,fallbackInView:x,onChange:E}={}){var h;const[w,g]=N.useState(null),_=N.useRef(E),u=N.useRef(a),[j,I]=N.useState({inView:!!a,entry:void 0});_.current=E,N.useEffect(()=>{if(u.current===void 0&&(u.current=a),c||!w)return;let v;return v=J(w,(S,b)=>{const M=u.current;u.current=S,!(M===void 0&&!S)&&(I({inView:S,entry:b}),_.current&&_.current(S,b),b.isIntersecting&&i&&v&&(v(),v=void 0))},{root:d,rootMargin:r,threshold:e,trackVisibility:o,delay:t},x),()=>{v&&v()}},[Array.isArray(e)?e.toString():e,w,d,r,i,c,o,x,t]);const y=(h=j.entry)==null?void 0:h.target,D=N.useRef(void 0);!w&&y&&!i&&!c&&D.current!==y&&(D.current=y,I({inView:!!a,entry:void 0}),u.current=a);const f=[g,j.inView,j.entry];return f.ref=f[0],f.inView=f[1],f.entry=f[2],f}const Y=async e=>{if(process.env.NODE_ENV==="development")try{return(await R.axios.get(`http://localhost:3001/api/ads/${e.ad_id}`,{params:{ad_id:e.ad_id}})).data.result}catch{}return R.axios.get(e.url,{params:{ad_id:e.ad_id}}).then(t=>t.data.result)},Z=60,ee={dedupingInterval:1e3*60*Z},se=e=>{const{data:t,error:o,isLoading:r,mutate:d}=R.useSWR(e?{url:`https://articles.media/api/ads/${e}`,ad_id:e}:null,Y,ee);return{data:t,error:o,isLoading:r,mutate:d}},q=6e4,P=Symbol.for("constructDateFrom");function te(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&P in e?e[P](t):e instanceof Date?new e.constructor(t):new Date(t)}function T(e,t){return te(e,e)}function re(e){return t=>{const r=(e?Math[e]:Math.trunc)(t);return r===0?0:r}}function ne(e,t){return+T(e)-+T(t)}function V(e,t,o){const r=ne(e,t)/q;return re(o?.roundingMethod)(r)}function L(e){return Math.trunc(e*q)}const oe=async e=>{if(process.env.NODE_ENV==="development")try{return(await R.axios.get("http://localhost:3001/api/ads",{params:{}})).data}catch{}return R.axios.get(e.url,{params:{}}).then(t=>t.data)},B=60,ie={dedupingInterval:L(B),focusThrottleInterval:L(B)},ae=e=>{const{data:t,error:o,isLoading:r,mutate:d}=R.useSWR({url:"https://articles.media/api/ads"},oe,ie);return{data:t,error:o,isLoading:r,mutate:d}},ce=l.lazy(()=>Promise.resolve().then(()=>require("./AdDetailsModal-BCRLBkc_.cjs")));function le(e,t){return Math.floor(Math.random()*(t-e+1))+e}function de(e){const o=[],{data:r}=ae();let{previewMode:d}=e,i=e.previewData||{};const[c,a]=l.useState(null),[x,E]=l.useState(null),[h,w]=l.useState(null),[g,_]=l.useState(null),[u,j]=l.useState(0),[I,y]=l.useState(!1),[D,f]=l.useState(!1),[v,S]=l.useState(new Date),[b,M]=l.useState([]),{data:n}=se(c);l.useEffect(()=>{r&&r?.length>0&&!c&&(console.log("Ad Mounted or reduxAds changed"),a(e.ad_id||r[le(0,r?.length-1)]?._id))},[r]),l.useEffect(()=>{},[n]),l.useEffect(()=>{n?.populated_promos&&u>=0&&_(n?.populated_promos[u])},[u,n]);function W(){f(!D)}const{ref:U,inView:k}=Q({threshold:0,triggerOnce:!0});function $(m){if(d&&console.log("Preventing this event from being logged as this ad is being shown in preview mode."),b.find(p=>p==m)){console.log("Already logged this event");return}R.axios.get("/api/ads/event",{params:{ad_id:n?._id,event:m}}).then(function(p){M([...b,m]),console.log(p.data)}).catch(function(p){console.log(p)})}return l.useEffect(()=>{if(!d&&(console.log("inView",k),k&&c)){let m=[{ad_id:c,date:new Date().toString()},...o.filter(p=>{if(console.log(V(new Date,new Date(p.date))),V(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",m)}},[k,c]),s.jsxRuntimeExports.jsxs("div",{ref:U,className:"ad-wrap",style:{"--articles-ad-background-color":i.background_color||n?.background_color,"--articles-ad-font-color":i.font_color||n?.font_color,"--articles-ad-border-color":i.border_color||n?.border_color},children:[D&&s.jsxRuntimeExports.jsx(ce,{setModalShow:f,ad:n,previewData:i}),s.jsxRuntimeExports.jsx("div",{className:"ad",children:s.jsxRuntimeExports.jsxs("div",{className:"main-panel",children:[s.jsxRuntimeExports.jsx("div",{className:"ad-warning flex-header",children:s.jsxRuntimeExports.jsxs("div",{className:"",children:[n?.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:(i.logo?.location||n?.logo?.location)&&s.jsxRuntimeExports.jsx("img",{src:i?.logo?.key?`${process.env.NEXT_PUBLIC_CDN}${i?.logo?.key}`:`${process.env.NEXT_PUBLIC_CDN}${n?.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:i?.background?.key?`${process.env.NEXT_PUBLIC_CDN}${i.background?.key}`:`${process.env.NEXT_PUBLIC_CDN}${n?.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:i?.business||n?.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:[n?.city,", ",n?.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"})]})]})]}),n?.city&&s.jsxRuntimeExports.jsx("div",{className:"details mb-3 d-none"}),s.jsxRuntimeExports.jsx("div",{className:"short-description",children:i?.description||n?.description})]})]}),(!1)?.roles?.isDev&&n?.populated_promos?.length>0&&s.jsxRuntimeExports.jsxs("div",{children:[g&&s.jsxRuntimeExports.jsx("div",{className:"promos-wrap",children:g&&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:g.title}),s.jsxRuntimeExports.jsx("div",{className:"small",children:s.jsxRuntimeExports.jsx("div",{className:"small",children:g.details})})]}),s.jsxRuntimeExports.jsx(X.ArticlesButton,{className:"px-3",small:!0,onClick:()=>{console.log("Load Save Modal"),y(!0)},children:"Save"})]},g._id)}),s.jsxRuntimeExports.jsxs("div",{className:"d-flex justify-content-between",children:[s.jsxRuntimeExports.jsxs("div",{className:"px-2",children:[n?.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:()=>{u==0?j(n?.populated_promos?.length-1):j(m=>m-1)}}),n?.populated_promos?.map((m,p)=>s.jsxRuntimeExports.jsx("i",{className:`fa-square ${p==u?"fad":"fas"}`},m._id)),s.jsxRuntimeExports.jsx("i",{className:"fad fa-arrow-circle-right",type:"button",onClick:()=>{u==n?.populated_promos?.length-1?j(0):j(m=>m+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:()=>{W(),$("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:n?.website,target:"_blank",rel:"noreferrer",onClick:()=>$("Website"),children:s.jsxRuntimeExports.jsx("div",{children:"Website"})})]})]})}),!d&&s.jsxRuntimeExports.jsx("div",{className:"advertise-with-us p-1",style:{backgroundColor:i.background_color||n?.background_color,color:i.font_color||n?.font_color,borderColor:i.border_color||n?.border_color},children:s.jsxRuntimeExports.jsxs("div",{className:"small d-block w-100 text-center",children:[s.jsxRuntimeExports.jsx("i",{className:"fas fa-share me-1"}),"Advertise with Articles Media!"]})})]})}const ue=l.memo(de);module.exports=ue;
1
+ "use strict";const s=require("./jsx-runtime-nZSsnGb7.cjs"),c=require("react"),m=require("./toDate-CzgAa_PT.cjs"),U=require("./Button-BVYvDTtH.cjs");function W(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 b=W(c);var k=new Map,S=new WeakMap,P=0,X;function K(e){return e?(S.has(e)||(P+=1,S.set(e,P.toString())),S.get(e)):"0"}function F(e){return Object.keys(e).sort().filter(t=>e[t]!==void 0).map(t=>`${t}_${t==="root"?K(e.root):e[t]}`).toString()}function G(e){const t=F(e);let i=k.get(t);if(!i){const n=new Map;let d;const o=new IntersectionObserver(l=>{l.forEach(a=>{var p;const N=a.isIntersecting&&d.some(v=>a.intersectionRatio>=v);e.trackVisibility&&typeof a.isVisible>"u"&&(a.isVisible=N),(p=n.get(a.target))==null||p.forEach(v=>{v(N,a)})})},e);d=o.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),i={id:t,observer:o,elements:n},k.set(t,i)}return i}function H(e,t,i={},n=X){if(typeof window.IntersectionObserver>"u"&&n!==void 0){const p=e.getBoundingClientRect();return t(n,{isIntersecting:n,target:e,intersectionRatio:typeof i.threshold=="number"?i.threshold:0,time:0,boundingClientRect:p,intersectionRect:p,rootBounds:p}),()=>{}}const{id:d,observer:o,elements:l}=G(i),a=l.get(e)||[];return l.has(e)||l.set(e,a),a.push(t),o.observe(e),function(){a.splice(a.indexOf(t),1),a.length===0&&(l.delete(e),o.unobserve(e)),l.size===0&&(o.disconnect(),k.delete(d))}}function J({threshold:e,delay:t,trackVisibility:i,rootMargin:n,root:d,triggerOnce:o,skip:l,initialInView:a,fallbackInView:p,onChange:N}={}){var v;const[w,E]=b.useState(null),_=b.useRef(N),x=b.useRef(a),[h,A]=b.useState({inView:!!a,entry:void 0});_.current=N,b.useEffect(()=>{if(x.current===void 0&&(x.current=a),l||!w)return;let g;return g=H(w,(R,D)=>{const C=x.current;x.current=R,!(C===void 0&&!R)&&(A({inView:R,entry:D}),_.current&&_.current(R,D),D.isIntersecting&&o&&g&&(g(),g=void 0))},{root:d,rootMargin:n,threshold:e,trackVisibility:i,delay:t},p),()=>{g&&g()}},[Array.isArray(e)?e.toString():e,w,d,n,o,l,i,p,t]);const y=(v=h.entry)==null?void 0:v.target,M=b.useRef(void 0);!w&&y&&!o&&!l&&M.current!==y&&(M.current=y,A({inView:!!a,entry:void 0}),x.current=a);const j=[E,h.inView,h.entry];return j.ref=j[0],j.inView=j[1],j.entry=j[2],j}const Q=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}})).data.result}catch{}return m.axios.get(e.url,{params:{ad_id:e.ad_id}}).then(t=>t.data.result)},Y=60,Z={dedupingInterval:1e3*60*Y},ee=e=>{const{data:t,error:i,isLoading:n,mutate:d}=m.useSWR(e?{url:`https://articles.media/api/ads/${e}`,ad_id:e}:null,Q,Z);return{data:t,error:i,isLoading:n,mutate:d}};function se(e){return t=>{const n=(e?Math[e]:Math.trunc)(t);return n===0?0:n}}function te(e,t){return+m.toDate(e)-+m.toDate(t)}function T(e,t,i){const n=te(e,t)/m.millisecondsInMinute;return se(i?.roundingMethod)(n)}function V(e){return Math.trunc(e*m.millisecondsInMinute)}const re=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)},L=60,ne={dedupingInterval:V(L),focusThrottleInterval:V(L)},oe=e=>{const{data:t,error:i,isLoading:n,mutate:d}=m.useSWR({url:"https://articles.media/api/ads"},re,ne);return{data:t,error:i,isLoading:n,mutate:d}},ie=c.lazy(()=>Promise.resolve().then(()=>require("./AdDetailsModal-CHgLXn9p.cjs"))),ae=c.lazy(()=>Promise.resolve().then(()=>require("./AdConfirmExitModal-BRpOrF3L.cjs")));function ce(e,t){return Math.floor(Math.random()*(t-e+1))+e}function le(e){const i=[],{data:n}=oe();let{previewMode:d}=e,o=e.previewData||{};const[l,a]=c.useState(null),[p,N]=c.useState(null),[v,w]=c.useState(null),[E,_]=c.useState(null),[x,h]=c.useState(0),[A,y]=c.useState(!1),[M,j]=c.useState(!1),[g,R]=c.useState(!1),[D,C]=c.useState(new Date),[$,B]=c.useState([]),{data:r}=ee(l);c.useEffect(()=>{n&&n?.length>0&&!l&&(console.log("Ad Mounted or reduxAds changed"),a(e.ad_id||n[ce(0,n?.length-1)]?._id))},[n]),c.useEffect(()=>{},[r]),c.useEffect(()=>{r?.populated_promos&&x>=0&&_(r?.populated_promos[x])},[x,r]);function q(){j(!M)}const{ref:z,inView:I}=J({threshold:0,triggerOnce:!0});function O(u){if(d&&console.log("Preventing this event from being logged as this ad is being shown in preview mode."),$.find(f=>f==u)){console.log("Already logged this event");return}m.axios.get("/api/ads/event",{params:{ad_id:r?._id,event:u}}).then(function(f){B([...$,u]),console.log(f.data)}).catch(function(f){console.log(f)})}return c.useEffect(()=>{if(!d&&(console.log("inView",I),I&&l)){let u=[{ad_id:l,date:new Date().toString()},...i.filter(f=>{if(console.log(T(new Date,new Date(f.date))),T(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",u)}},[I,l]),s.jsxRuntimeExports.jsxs("div",{ref:z,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:[M&&s.jsxRuntimeExports.jsx(ie,{setModalShow:j,ad:r,previewData:o}),g&&s.jsxRuntimeExports.jsx(ae,{setModalShow:R,ad:r,previewData:o}),s.jsxRuntimeExports.jsx("div",{className:"ad",children: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:[E&&s.jsxRuntimeExports.jsx("div",{className:"promos-wrap",children:E&&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:E.title}),s.jsxRuntimeExports.jsx("div",{className:"small",children:s.jsxRuntimeExports.jsx("div",{className:"small",children:E.details})})]}),s.jsxRuntimeExports.jsx(U.ArticlesButton,{className:"px-3",small:!0,onClick:()=>{console.log("Load Save Modal"),y(!0)},children:"Save"})]},E._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:()=>{x==0?h(r?.populated_promos?.length-1):h(u=>u-1)}}),r?.populated_promos?.map((u,f)=>s.jsxRuntimeExports.jsx("i",{className:`fa-square ${f==x?"fad":"fas"}`},u._id)),s.jsxRuntimeExports.jsx("i",{className:"fad fa-arrow-circle-right",type:"button",onClick:()=>{x==r?.populated_promos?.length-1?h(0):h(u=>u+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:()=>{q(),O("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:u=>{u.preventDefault(),R(!0),O("Confirm Exit Modal Opened")},children:s.jsxRuntimeExports.jsx("div",{children:"Website"})})]})]})}),!d&&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 de=c.memo(le);module.exports=de;