@blocklet/pages-kit-inner-components 0.1.0 → 0.1.2
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/lib/cjs/home.js +1 -1
- package/lib/cjs/locales.js +1 -1
- package/lib/cjs/resources.js +1 -1
- package/lib/cjs/setting.js +4 -4
- package/lib/cjs/site-state.js +1 -1
- package/lib/cjs/theme.js +239 -0
- package/lib/{draft-data-BR6QMafP.mjs → draft-data-Bbv-4GaF.mjs} +1 -1
- package/lib/{draft-data-DY34VJHh.js → draft-data-CgY7-dem.js} +1 -1
- package/lib/es/home.js +10 -8
- package/lib/es/locales.js +16 -4
- package/lib/es/resources.js +1 -1
- package/lib/es/setting.js +946 -821
- package/lib/es/site-state.js +1 -1
- package/lib/es/theme.js +767 -0
- package/lib/home-D7i9eFDB.js +542 -0
- package/lib/{home-eQg2nzvF.mjs → home-DSngH2He.mjs} +698 -682
- package/lib/{publish-button-CKgx9XuN.mjs → publish-button-B0t_3Z4M.mjs} +2 -2
- package/lib/{publish-button-B-kvMf2a.js → publish-button-CrxBSa6-.js} +1 -1
- package/lib/{site-state-CrZeDXXY.mjs → site-state-BcfhbQn3.mjs} +304 -294
- package/lib/site-state-kBaXBQhY.js +1 -0
- package/lib/state-BQClQU2N.js +1 -0
- package/lib/state-C0vjPuun.mjs +407 -0
- package/package.json +26 -22
- package/lib/home-DhKwQuXD.js +0 -542
- package/lib/site-state-Ur6wK5g3.js +0 -1
- package/lib/state-BfVA6vd8.mjs +0 -378
- package/lib/state-C6F-M3XT.js +0 -1
|
@@ -0,0 +1,542 @@
|
|
|
1
|
+
"use strict";var Ve=Object.create;var pe=Object.defineProperty;var Ge=Object.getOwnPropertyDescriptor;var De=Object.getOwnPropertyNames;var Je=Object.getPrototypeOf,Ke=Object.prototype.hasOwnProperty;var Xe=(e,t,o,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of De(t))!Ke.call(e,r)&&r!==o&&pe(e,r,{get:()=>t[r],enumerable:!(i=Ge(t,r))||i.enumerable});return e};var xe=(e,t,o)=>(o=e!=null?Ve(Je(e)):{},Xe(t||!e||!e.__esModule?pe(o,"default",{value:e,enumerable:!0}):o,e));const n=require("react/jsx-runtime"),w=require("./state-BQClQU2N.js"),ke=require("@arcblock/ux/lib/Locale/context"),Ye=require("@arcblock/ux/lib/Result"),Qe=require("@blocklet/pages-kit/builtin/page/header"),Ze=require("@blocklet/ui-react/lib/Header"),_=require("@emotion/css"),Q=require("@emotion/react"),et=require("@emotion/styled"),p=require("@mui/material"),$e=require("ahooks"),tt=require("isomorphic-dompurify"),A=require("lodash"),nt=require("lodash/isEmpty"),g=require("react"),ot=require("react-helmet"),B=require("react-router-dom"),U=require("react-use"),P=require("ufo");require("@mui/icons-material");const K=require("@blocklet/ai-runtime/components"),rt=require("@mui/utils"),it=require("lodash/pick"),st=require("react-error-boundary"),ee=require("@iconify/react"),at=require("react-markdown"),ct=require("remark-gfm"),lt=require("@mui/lab"),$=require("@arcblock/ux/lib/Theme"),dt=require("@arcblock/react-hooks/lib/useBrowser"),ut=require("@arcblock/ux/lib/Colors"),re=require("@blocklet/pages-kit/components"),mt=require("@mui/material/useMediaQuery"),Se=require("@iconify-icon/react"),pt=require("@arcblock/ux/lib/Screenshot"),xt=require("lodash/omit"),ft=require("@arcblock/ux/lib/Button"),ht=require("is-uri"),X=require("pathe"),gt=require("@blocklet/embed/message"),bt=require("lodash/isEqual"),yt=require("@blocklet/embed/react"),jt=require("react-twitter-embed"),wt=require("@blocklet/ui-react/lib/Footer"),_t=require("webfontloader"),vt=require("@arcblock/did-connect/lib/Session"),S=e=>e&&e.__esModule?e:{default:e},Ce=S(Ye),kt=S(Ze),Be=S(et),$t=S(tt),St=S(nt),Ie=S(g),ie=S(it),Ct=S(at),Bt=S(ct),It=S(dt),fe=S(ut),Ne=S(mt),Nt=S(pt),q=S(xt),Pt=S(ft),te=S(ht),Rt=S(bt),Tt=S(wt),qt=S(_t);function Et(e,t,o,i){e.locales||(e.locales={}),e.locales[o]=e.locales[o]||{},e.locales[o].title=i.title??e.locales[o].title,e.locales[o].image=i.image??e.locales[o].image,e.locales[o].description=i.description??e.locales[o].description,Object.entries(i.sectionsData).forEach(([r,s])=>{var c,l,d,m;const a=Object.values(e.sections).find(u=>u.id===r||u.name===r);if(a&&a.isTemplateSection)if(a.locales=a.locales||{},a.locales[o]=a.locales[o]||{},a.component==="custom-component"){const u=(c=a.config)==null?void 0:c.componentId;if(!u)return;const f=((l=t.components[u])==null?void 0:l.data)||((m=(d=t.resources.components)==null?void 0:d[u])==null?void 0:m.component);if(!f)return;a.locales[o].properties=a.locales[o].properties||{},Object.entries(s||{}).forEach(([x,y])=>{var h,v;const j=((h=f==null?void 0:f.properties)==null?void 0:h[x])||Object.values((f==null?void 0:f.properties)||{}).find(b=>{var k;return((k=b.data)==null?void 0:k.key)===x});j&&(a.locales[o].properties[(v=j.data)==null?void 0:v.id]={value:y})})}else a.locales[o]={...a.locales[o],...s||{}}})}const zt=g.forwardRef(({onClick:e,...t},o)=>{const[i,r]=g.useState(!1),s=g.useCallback(async a=>{try{r(!0),await(e==null?void 0:e(a))}finally{r(!1)}},[e]);return n.jsx(lt.LoadingButton,{ref:o,...t,loading:t.loading||i,onClick:s})});function Wt({tip:e,tipSucceed:t,title:o,titleSucceed:i,icon:r,iconSucceed:s,autoReset:a,placement:c="top",...l}){const[d,m]=g.useState(!1),[u,f]=g.useState(),x=g.useRef(),y=()=>{f(void 0),a&&(x.current=window.setTimeout(()=>{m(!1)},3e3))},j=()=>{clearTimeout(x.current)},h=d?s:r,v=u?n.jsx(p.Box,{color:"error",children:u.message}):d&&t||e,b=d?i:o;return n.jsx(p.Tooltip,{title:v,disableInteractive:!0,placement:c,onClose:y,onOpen:j,children:n.jsx("span",{children:n.jsx(zt,{startIcon:h&&(typeof h=="string"?n.jsx(ee.Icon,{icon:h}):h),loadingPosition:h?"start":void 0,...l,onClick:async k=>{if(l.onClick)try{await l.onClick(k),m(!0)}catch(N){f(N)}},children:b})})})}const Lt=Ie.default.lazy(()=>import("react-syntax-highlighter").then(e=>({default:e.Prism}))),At=p.styled(e=>n.jsx(Ct.default,{...e,remarkPlugins:[Bt.default],components:{pre:Ot,code:({node:t,inline:o,className:i,children:r,...s})=>{if(!r)return null;const a=/language-(\w+)/.exec(i||"");return o?n.jsx(p.Box,{component:"code",className:i,...s,children:r}):n.jsx(p.Box,{component:Lt,language:a==null?void 0:a[1],...s,sx:{borderRadius:1},children:String(r).replace(/\n$/,"")})},table:({className:t,children:o})=>n.jsx(p.Box,{sx:{overflow:"auto",my:1},children:n.jsx("table",{className:t,children:o})})}}))`
|
|
2
|
+
width: 100%;
|
|
3
|
+
overflow: hidden;
|
|
4
|
+
word-break: break-word;
|
|
5
|
+
|
|
6
|
+
> * {
|
|
7
|
+
&:first-child /* emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason */ {
|
|
8
|
+
margin-top: 0;
|
|
9
|
+
}
|
|
10
|
+
&:last-child /* emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason */ {
|
|
11
|
+
margin-bottom: 0;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
pre {
|
|
16
|
+
overflow: auto;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
li {
|
|
20
|
+
margin: 0;
|
|
21
|
+
padding: 0;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
li p {
|
|
25
|
+
display: inline-block;
|
|
26
|
+
vertical-align: top;
|
|
27
|
+
margin: 0;
|
|
28
|
+
padding: 0;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
table {
|
|
32
|
+
border-collapse: collapse;
|
|
33
|
+
white-space: nowrap;
|
|
34
|
+
|
|
35
|
+
th,
|
|
36
|
+
td {
|
|
37
|
+
border: 1px solid grey;
|
|
38
|
+
padding: 4px 8px;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
a {
|
|
43
|
+
color: ${({theme:e})=>e.palette.primary.main};
|
|
44
|
+
|
|
45
|
+
:hover {
|
|
46
|
+
text-decoration: underline;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&.writing > *:last-child {
|
|
51
|
+
&:after {
|
|
52
|
+
content: '';
|
|
53
|
+
display: inline-block;
|
|
54
|
+
vertical-align: middle;
|
|
55
|
+
height: 1.2em;
|
|
56
|
+
margin-top: -0.2em;
|
|
57
|
+
margin-left: 0.1em;
|
|
58
|
+
border-right: 0.2em solid orange;
|
|
59
|
+
border-radius: 10px;
|
|
60
|
+
animation: blink-caret 0.75s step-end infinite;
|
|
61
|
+
|
|
62
|
+
@keyframes blink-caret {
|
|
63
|
+
from,
|
|
64
|
+
to {
|
|
65
|
+
border-color: transparent;
|
|
66
|
+
}
|
|
67
|
+
50% {
|
|
68
|
+
border-color: ${({theme:e})=>e.palette.secondary.main};
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
`;function Ot({children:e}){const t=e==null?void 0:e.props;if(!(t!=null&&t.children))return null;const o=/language-(\w+)/.exec(t.className||""),i=o==null?void 0:o[1];return n.jsxs(p.Box,{component:"div",sx:{fontSize:14,borderRadius:1,bgcolor:"rgb(245, 242, 240)","> pre":{mt:"0 !important"}},children:[n.jsxs(p.Stack,{direction:"row",alignItems:"center",p:.5,pl:1.5,borderBottom:1,borderColor:"grey.200",children:[n.jsx(p.Box,{children:i}),n.jsx(p.Box,{flex:1}),n.jsx(Wt,{autoReset:!0,title:n.jsx(ee.Icon,{icon:"tabler:copy"}),titleSucceed:n.jsx(ee.Icon,{icon:"tabler:copy-check"}),sx:{minWidth:32,minHeight:32,p:0,fontSize:18},onClick:()=>{window.navigator.clipboard.writeText(t.children)}})]}),e]})}function z({actions:e,center:t,className:o,align:i}){return e&&(e!=null&&e.length)?n.jsx(p.Box,{className:_.cx("flex gap-4 flex-wrap","lg:flex-row lg:gap-8",(t||i==="center")&&"justify-center",!t&&i==="right"&&"justify-end",!t&&i==="left"&&"justify-start",o),sx:{alignItems:"center"},children:e}):null}const Ut="section",Ht=p.styled(p.Box)`
|
|
74
|
+
overflow: hidden;
|
|
75
|
+
|
|
76
|
+
.section__title {
|
|
77
|
+
margin-top: 0;
|
|
78
|
+
font-weight: 700;
|
|
79
|
+
}
|
|
80
|
+
.section__title_non_big {
|
|
81
|
+
font-size: 32px;
|
|
82
|
+
@media (max-width: 600px) {
|
|
83
|
+
font-size: 24px;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
&.base-info .section__tag {
|
|
87
|
+
margin-top: 0;
|
|
88
|
+
margin-bottom: 2vw;
|
|
89
|
+
background-color: ${({theme:e})=>e.palette.primary.main};
|
|
90
|
+
white-space: nowrap;
|
|
91
|
+
max-width: 100%;
|
|
92
|
+
display: inline-block;
|
|
93
|
+
padding: 0 10px;
|
|
94
|
+
justify-content: flex-start;
|
|
95
|
+
overflow: hidden;
|
|
96
|
+
text-overflow: ellipsis;
|
|
97
|
+
font-size: 12px;
|
|
98
|
+
color: #fff;
|
|
99
|
+
border-radius: 4px;
|
|
100
|
+
line-height: 20px;
|
|
101
|
+
}
|
|
102
|
+
.section__title {
|
|
103
|
+
a {
|
|
104
|
+
color: ${({theme:e})=>e.palette.primary.main};
|
|
105
|
+
}
|
|
106
|
+
p {
|
|
107
|
+
margin-top: 0;
|
|
108
|
+
margin-bottom: 0;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
.section__description {
|
|
112
|
+
margin-bottom: 4vw;
|
|
113
|
+
margin-top: 0;
|
|
114
|
+
a {
|
|
115
|
+
color: ${({theme:e})=>e.palette.primary.main};
|
|
116
|
+
}
|
|
117
|
+
p {
|
|
118
|
+
margin-top: 0;
|
|
119
|
+
margin-bottom: 0.5rem;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
@media (min-width: ${({theme:e})=>e.breakpoints.values[Ut]}px) {
|
|
123
|
+
.section__tag {
|
|
124
|
+
margin-bottom: 32px;
|
|
125
|
+
}
|
|
126
|
+
.section__title {
|
|
127
|
+
margin-bottom: 32px;
|
|
128
|
+
}
|
|
129
|
+
.section__description {
|
|
130
|
+
margin-bottom: 40px;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
`;function H({title:e,description:t,descriptionMarkdown:o,actions:i,className:r="",classes:s={},prepend:a,append:c,level:l=2,tag:d,badge:m,center:u,logo:f,titleAppearance:x,descriptionAppearance:y,...j}){if(!e&&!t&&!i&&!m&&!d&&!a&&!c&&!f)return null;const h=Math.max(Math.min(5,l+1),1),v={1:"xl:!text-3xl lg:!text-2xl md:!text-xl",2:"xl:!text-2xl lg:!text-xl md:!text-lg",3:"xl:!text-2xl lg:!text-xl md:!text-lg",4:"xl:!text-xl lg:!text-lg md:!text-md",5:"xl:!text-lg md:!text-md sm:!text-sm",6:"!text-sm"},b=l===0?"big":`h${h}`,k=l===0;return n.jsxs(Ht,{className:_.cx("base-info","lg:text-left",u&&"!text-center",r),...j,children:[a&&n.jsx("div",{children:a}),(d||m)&&n.jsx("div",{className:_.cx("section__tag",(s==null?void 0:s.tag)||(s==null?void 0:s.badge)),children:d||m}),f&&n.jsx("img",{className:"w-[120px] m-auto mb-8",src:f,alt:"info",loading:"lazy"}),e&&n.jsx(p.Typography,{sx:{whiteSpace:"pre-wrap",mb:t?"2vw":0,...(x==null?void 0:x.color)&&{color:`${x.color} !important`}},className:_.cx("section__title","text-gray-800","dark:text-gray-50",s.title,"page-kit-section__title",k?"":"section__title_non_big"),component:`h${Math.max(l,1)}`,variant:b,children:e}),t&&(o?n.jsx(p.Box,{sx:{...(y==null?void 0:y.color)&&{color:`${y.color} !important`}},component:At,className:_.cx("section__description","text-gray-800","dark:text-gray-100",v[h],s.description,"page-kit-section__description"),children:t}):n.jsx(p.Typography,{sx:{whiteSpace:"pre-wrap",...(y==null?void 0:y.color)&&{color:`${y.color} !important`}},className:_.cx("section__description","text-gray-800","dark:text-gray-100",v[h],s.description,"page-kit-section__description"),component:"div",variant:"body1",gutterBottom:!0,children:t})),n.jsx(z,{actions:i,center:u,className:"mt-8"}),c&&n.jsx("div",{children:c})]})}const M=["actions","append","badge","tag","center","description","descriptionMarkdown","level","logo","prepend","title","titleAppearance","descriptionAppearance"];function Pe(e){if(e.type===g.Fragment){const o=(e.props.children||[]).filter(i=>g.isValidElement(i));return o.length===1?Pe(o[0]):o.length>1}return Array.isArray(e)}const R="&>*";function se({children:e,col:t,gap:o,className:i,align:r,sx:s,type:a,...c}={children:null,className:"",col:3,gap:void 0,sx:{},align:"center",type:"default"}){const l=$.useTheme(),d=Number(Math.floor(100/t*100)/100),m={center:"justify-center items-center",left:"justify-start items-center",right:"justify-end items-center",top:"justify-center items-start",bottom:"justify-center items-end","top-left":"justify-start items-start","top-right":"justify-end items-start","bottom-left":"justify-start items-end","bottom-right":"justify-end items-end"},u=m[r]||m.center;let x=o??({2:6,3:4,4:4,5:3,6:3}[t]||0);Pe(e)||(x=0);const j=(t-1)*x/t;let h={...s,gap:`${x}rem`};const v={[R]:{width:"100%"}},b={},k={},N={};switch(v.gap="1rem",b.gap=`${x/2}rem`,t){case 3:case 4:b[R]={width:`calc(50% - ${x/2}rem)`};break;case 5:case 6:v[R]={width:`calc(50% - ${x/2/2}rem)`},b[R]={width:`calc(50% - ${x/2/2}rem)`},k[R]={width:`calc(33.33% - ${x*2/3}rem)`};break}return h[R]={width:`calc(${d}% - ${j}rem)`},h[`@media (max-width: ${l.breakpoints.values.xl}px)`]=N,h[`@media (max-width: ${l.breakpoints.values.lg}px)`]=k,h[`@media (max-width: ${l.breakpoints.values.md}px)`]=b,h[`@media (max-width: ${l.breakpoints.values.sm}px)`]=v,a==="wall"&&(h={...s,gap:`${x}rem`},h[R]={width:`calc(${d}% - ${j}rem)`},v[R]={width:`calc(45% - ${x/2/2}rem)`},h[`@media (max-width: ${l.breakpoints.values.sm}px)`]=v),n.jsx(p.Box,{className:_.cx("flex flex-wrap flex-row h-full",u,i),sx:h,...c,children:e})}function Mt(){const e=navigator.userAgent.toLowerCase();return e.includes("safari")&&!e.includes("chrome")}function Ft(e=""){if(e.startsWith("data:image/svg+xml,"))return!0;const t=/^(((ht|f)tps?):\/\/)?([^!@#$%^&*?.\s-]([^!@#$%^&*?.\s]{0,63}[^!@#$%^&*?.\s])?\.)+[a-z]{2,6}\/?/,o=/^(\/|\.\/|\.\.\/)(?:[^/]+\/)*[^/]+$/;return t.test(e)||o.test(e)}function ne(e){return(e==null?void 0:e.endsWith(".mp4"))||(e==null?void 0:e.endsWith(".m4v"))||(e==null?void 0:e.endsWith(".webm"))}function Vt(e){return e!=null&&e.endsWith(".mp4")||e!=null&&e.endsWith(".m4v")?"video/mp4":e!=null&&e.endsWith(".webm")?"video/webm":void 0}function Gt(e){let t={};return typeof e=="string"?w.isGradient(e)?t.image=e:(t.image=w.getImageAbsoluteUrl(e),w.isColorString(e)&&(t.color=e,t.image="")):t=e,t}function Dt(){const[e,t]=g.useState(Date.now());return g.useEffect(()=>{const o=()=>{t(Date.now())};return document.addEventListener("visibilitychange",o),()=>{document.removeEventListener("visibilitychange",o)}},[]),e}function he(e,t,o,i,r){let s=null;const{color:a="",image:c}=Gt(t);return c&&Ft(c)?(delete o.backgroundColor,!(e.mobile.apple.device||Mt())&&ne(c)?s=n.jsx(p.Box,{component:"video",className:"section-bg",width:"100%",autoPlay:!0,loop:!0,muted:!0,controls:!1,playsInline:!0,poster:w.autoResizeImage(w.getImageAbsoluteUrl(i),1200,"quality"),src:ne(c)?c:w.autoResizeImage(c,1200,"quality"),sx:{position:"absolute",zIndex:-9999,right:0,left:0,top:0,width:"100%",height:"100%",objectFit:"cover"}},c):s=n.jsx(re.ResponsiveImage,{src:c,sizesAttr:{sm:600,md:900,lg:1200},className:"section-bg",alt:"",width:"100%",loading:"lazy",sx:{position:"absolute",zIndex:-9999,right:0,left:0,top:0,width:"100%",height:"100%",objectFit:"cover"}},r||c)):c?o.backgroundImage=`${c} !important`:a&&(o.backgroundColor=`${a} !important`),s}function Jt({autoWidth:e,children:t,...o}){return e?n.jsx(p.Box,{display:"flex",...o,children:t}):n.jsx(p.Container,{...o,children:t})}function F({dark:e=!1,children:t,className:o,sx:i={},boxed:r={show:!1},padding:s="normal",boxProps:a,type:c,...l}){const d={...i},m=Ne.default(x=>x.breakpoints.down("md"));e&&(d.color=fe.default.common.white,d.backgroundColor=`${fe.default.grey[900]} !important`);const u={none:"py-0",small:"py-5 md:py-8 lg:py-8 xl:py-12",normal:"py-10 md:py-15 lg:py-20 xl:py-25",large:"py-15 md:py-20 lg:py-25 xl:py-30"};r.show&&(d.display="flex");const f=g.useMemo(()=>!Number(l.boxMaxWidth)||m?{width:"100%"}:c==="wall"&&l.boxMaxWidth?{maxWidth:`${l.boxMaxWidth}px !important`,width:"100%"}:{width:"100%"},[l.boxMaxWidth,m,c]);return n.jsx(Kt,{component:"section",styles:{...d},className:_.cx("base-section","px-2 md:px-5 lg:px-5 xl:px-10",u[s],o,{dark:e}),...A.omit(l,"hoverStyle","boxMaxWidth","embedUrl","autoWidth","paddingXY","iframeHeight","titleAppearance","descriptionAppearance"),children:n.jsx(Jt,{autoWidth:l==null?void 0:l.autoWidth,className:_.cx("section-content h-full"),sx:f,children:r.show?n.jsx(Re,{...a,boxed:r,children:t}):t})})}function Re({background:e="",backgroundVideoPoster:t,children:o,sx:i={},boxed:r={show:!1},className:s="",styles:a={},...c}){const l={...a,...i};let d=null;const m=Ne.default(x=>x.breakpoints.up("sm")),u=It.default(),f=Dt();return e&&(d=he(u,e,l,t,f)),r.show&&(l.borderRadius="10px",l.padding===void 0&&(l.padding=m?"50px":"20px"),r!=null&&r.border&&(l.border="1px solid #c0c0c0"),r!=null&&r.background&&(d=he(u,r==null?void 0:r.background,l,r==null?void 0:r.backgroundVideoPoster,f))),n.jsxs(p.Box,{...c,sx:{...l,...d?{position:"relative",overflow:"hidden",zIndex:0}:{}},className:_.cx(s,(r==null?void 0:r.boxShadow)&&"shadow-xl"),children:[d,o]})}const Kt=$.styled(Re)`
|
|
134
|
+
&:nth-of-type(even) {
|
|
135
|
+
background: #f8f8f8;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
@media (max-width: 600px) {
|
|
139
|
+
.section__title {
|
|
140
|
+
font-size: 24px;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.base-info {
|
|
144
|
+
> *:last-child {
|
|
145
|
+
margin-bottom: 0;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
`;function Te({icon:e,...t}){return n.jsx(Se.Icon,{icon:e,...t,ref:null})}function I(e,t){const o=ie.default(e,t),i=q.default(e,t);return[o,i]}const qe=["title","description","actions","badge","tag","prepend","append","logo"];function Xt({image:e,imageBorder:t,imageShadow:o,className:i,reverse:r=!1,fullSizeImage:s,...a}){const[c,l]=I(a,M),d=Object.keys(c).length>0&&Object.values(ie.default(c,qe)).filter(Boolean).length>0&&n.jsx(H,{...c}),m=g.isValidElement(e)?e:n.jsx(p.Box,{component:"img",src:e,alt:"",className:"block"}),u=["phone","macbook"].includes(t),f=e&&n.jsx(p.Box,{className:_.cx("section__image","m-auto, leading-[1] text-center",o&&"shadow-xl",c!=null&&c.center?"flex justify-center items-center":""),sx:{border:t===!0?"1px solid #c0c0c0":void 0,borderRadius:2,overflow:"hidden","> div":u?{width:"100%",video:{borderRadius:"0 !important"}}:void 0},children:u?n.jsx(Nt.default,{type:t,sx:{width:"100%"},children:m}):m});return n.jsx(F,{className:_.cx("section--block",i,s&&!r&&_.css`
|
|
150
|
+
.section-bg {
|
|
151
|
+
height: 80%;
|
|
152
|
+
}
|
|
153
|
+
`),...l,boxProps:s?{sx:{padding:0,overflow:"hidden"}}:void 0,children:n.jsx(se,{col:e?2:1,className:s?_.css`
|
|
154
|
+
display: flex;
|
|
155
|
+
flex-direction: column;
|
|
156
|
+
|
|
157
|
+
> .base-info,
|
|
158
|
+
> .section__image {
|
|
159
|
+
width: 100%;
|
|
160
|
+
|
|
161
|
+
> img,
|
|
162
|
+
> video {
|
|
163
|
+
width: 100%;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
`:void 0,children:r?n.jsxs(n.Fragment,{children:[f,d]}):n.jsxs(n.Fragment,{children:[d,f]})})})}const V=["editing","height","locale","dev"];function Yt(e){return n.jsx(Qt,{...e})}const Qt=$.styled(p.Box)`
|
|
167
|
+
position: relative;
|
|
168
|
+
`;function Zt({widget:e,reverse:t,projectId:o,assistantId:i,working:r,submitTitle:s,submitIcon:a,submitColor:c,placeholder:l,loadingIndicator:d,section:m,...u}){const[{editing:f},x]=I(u,V),[y,j]=I(x,M),h=o&&i?{projectId:o,gitRef:"main",assistantId:i,working:!0}:void 0,v={children:s,endIcon:a?n.jsx(Te,{icon:a}):void 0,sx:{background:c||void 0,":hover":{background:c||void 0,opacity:.8}}},b=[],k=l&&n.jsx(p.Typography,{variant:"caption",color:"text.disabled",children:l}),N=d&&n.jsx(p.Typography,{variant:"caption",color:"text.disabled",children:d});Object.keys(y).length>0&&Object.values(ie.default(y,qe)).filter(Boolean).length>0&&b.push(n.jsx(H,{...y},"base-info")),h&&(e==="form"?b.push(n.jsx(K.AIForm,{identifier:h,SubmitProps:v},"form")):e==="result"?b.push(n.jsx(K.AIFormResult,{identifier:h,placeholder:k,loadingIndicator:N},"result")):b.push(n.jsxs(p.Stack,{width:"100%",gap:2,direction:"row",children:[n.jsx(K.AIForm,{identifier:h,BoxProps:{flex:1},SubmitProps:v}),n.jsx(K.AIFormResult,{identifier:h,BoxProps:{flex:1},placeholder:k,loadingIndicator:N})]},"form-result"))),t&&b.reverse();const W=p.useTheme(),J=g.useMemo(()=>p.createTheme(rt.deepmerge(W,{palette:{primary:c?{main:c}:void 0}})),[c,W]);return n.jsx(st.ErrorBoundary,{fallbackRender:w.ErrorView,children:n.jsx(p.ThemeProvider,{theme:J,children:n.jsx(F,{...j,sx:f?{pointerEvents:"none"}:{},children:n.jsx(se,{col:b.length,children:b})})})})}const Ee=g.createContext({pages:[],project:void 0}),{Provider:en,Consumer:lo}=Ee;function ze(){return g.useContext(Ee)}function tn({icon:e,className:t="",size:o="1rem",...i}){return n.jsx(nn,{component:Te,className:_.cx("css-icon",t),size:o,...i,icon:e})}const nn=$.styled(p.Box)`
|
|
169
|
+
&.css-icon {
|
|
170
|
+
display: inline-block;
|
|
171
|
+
width: ${({size:e})=>e};
|
|
172
|
+
height: ${({size:e})=>e};
|
|
173
|
+
}
|
|
174
|
+
`;function on({icon:e,className:t="",size:o="1rem",imageMeta:i,...r}){const s=w.autoResizeImage(w.getImageAbsoluteUrl(e),540),[a,c]=g.useState(!1),l=$.useTheme();return a?n.jsx(tn,{icon:"i-mdi:image",color:l.palette.grey[500],size:o,className:t,...r}):n.jsx(rn,{className:_.cx("image-icon",t),size:o,...r,children:n.jsx("img",{className:"image-icon__image",src:s,onError:()=>c(!0),width:i==null?void 0:i.naturalWidth,height:i==null?void 0:i.naturalHeight,alt:(i==null?void 0:i.filename)||"card-icon",loading:"lazy"})})}const rn=$.styled(p.Box)`
|
|
175
|
+
display: inline-block;
|
|
176
|
+
width: ${({size:e})=>e};
|
|
177
|
+
height: ${({size:e})=>e};
|
|
178
|
+
.image-icon__image {
|
|
179
|
+
object-fit: contain;
|
|
180
|
+
height: 100%;
|
|
181
|
+
width: 100%;
|
|
182
|
+
}
|
|
183
|
+
`,ae=e=>typeof e=="string"&&/^[\w-_]+:[\w-_]+$/.test(e);function oe({icon:e,size:t="1rem",imageMeta:o,...i}){const r=window.isNaN(t)?t:`${t}px`;return ae(e)?n.jsx(Se.Icon,{icon:e}):n.jsx(sn,{component:on,imageMeta:o,className:"base-icon",icon:e,size:r,...i})}const sn=$.styled(p.Box)`
|
|
184
|
+
flex-shrink: 0;
|
|
185
|
+
`;function O({text:e,children:t,icon:o="",endIcon:i,color:r="primary",link:s="",href:a="",...c}){const l=o?n.jsx(oe,{icon:o}):null,d=i?n.jsx(oe,{icon:i}):null,m=s||a,u={...c};return m&&(u.href=m,te.default(m)&&(u.target=u.target||"_blank")),n.jsx(Pt.default,{startIcon:l,endIcon:d,color:r,...u,children:e||t})}function We({editing:e,text:t,...o}){const{pages:i=[]}=ze(),r=i.find(s=>s.id===(o.link||o.linkId));if(e)return n.jsx(O,{...q.default(o,["link","linkId"]),children:t});if(r){const s=r.path||"/";return n.jsx(B.Link,{to:s,children:n.jsx(O,{...q.default(o,["link","linkId"]),children:t})})}return n.jsx(O,{...q.default(o,"linkId"),children:t})}function T({type:e="",icon:t="",size:o="3rem",className:i="",...r}){return n.jsx(oe,{icon:t||e,size:o,className:_.cx("content-icon",i),...r})}T.propTypes={};T.defaultProps={type:"",icon:"",size:"3rem",color:"inherit",className:""};function an({to:e,base:t,children:o,className:i,activeClassName:r="active",target:s="auto",autoExternalMark:a=!1,useRouterLink:c,...l}){const{pages:d=[],locale:m=""}={},u=t?X.join("/",t):t||"";let f=s==="auto"?"_self":s,x=X.join(u,e);const y=a?te.default(x):!1;if(t)return x=X.join(u,m,e),n.jsx("a",{className:`no-underline ${i}`,href:P.withoutTrailingSlash(x),rel:"noreferrer noopener",target:f,...l,children:o});if(te.default(e))s==="auto"&&(f="_blank"),x=e;else{P.isRelative(x)&&(x=X.join(window.location.pathname,x));const j=P.parseURL(`${window.location.origin}${x}`),h=d.some(v=>v.pathname===j.pathname);if(c||h)return n.jsx(B.NavLink,{end:!0,to:P.withoutTrailingSlash(x),className:({isActive:v})=>_.cx(i,v?r:""),...l,children:o})}return n.jsxs("a",{className:`no-underline ${i}`,href:P.withoutTrailingSlash(x),rel:"noreferrer noopener",target:f,...l,children:[o,y&&n.jsx(T,{icon:"i-mdi:arrow-top-right",size:"0.9em",className:"smart-link__mark",style:{marginLeft:5}})]})}function G({prepend:e,append:t,children:o,className:i="",dark:r=!1,border:s=!0,...a}){let c={};const{pages:l=[]}=ze(),d=l.find(f=>f.id===a.link),m=!o||Ie.default.Children.toArray(o).every(f=>f===null);a.link&&(c={component:an,to:(d==null?void 0:d.path)||a.link,useRouterLink:!0});const u=r&&s;return n.jsxs(cn,{className:_.cx("base-card card",{"border-gray-200":s},{"dark:border-gray-500":u},{dark:r,"border-transparent":!s},i),...c,...q.default(a,["listType","dark","iconColor","link","hoverStyle","imageSize"]),children:[e,!m&&n.jsx("div",{className:"card__body",children:o}),t]})}const cn=$.styled(p.Box)`
|
|
186
|
+
&.base-card {
|
|
187
|
+
text-align: left;
|
|
188
|
+
border-width: 1px;
|
|
189
|
+
border-style: solid;
|
|
190
|
+
border-radius: 12px;
|
|
191
|
+
overflow: hidden;
|
|
192
|
+
&,
|
|
193
|
+
&:hover {
|
|
194
|
+
text-decoration: none;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
.card__body {
|
|
198
|
+
padding: 15px 15px;
|
|
199
|
+
}
|
|
200
|
+
`;function D({align:e="left",title:t,titleProps:o={},description:i,descriptionProps:r={}}){return n.jsxs(n.Fragment,{children:[t&&n.jsx(p.Typography,{className:_.cx("card__title text-gray-800","dark:text-gray-50"),component:"h5",variant:"h5",gutterBottom:!0,align:e,...o,children:t}),i&&n.jsx(p.Typography,{className:_.cx("card__description","text-gray-500","dark:text-gray-400"),component:"div",variant:"body1",gutterBottom:!0,align:e,...r,children:i})]})}function ln({image:e,title:t,description:o,imageProps:i={},imageMeta:r,imageSize:s,titleProps:a={},descriptionProps:c={},actions:l,align:d,...m}){const u=ae(e),f=w.autoResizeImage(w.getImageAbsoluteUrl(e),540);return n.jsxs(dn,{className:"card-article",...m,prepend:n.jsx("div",{className:"card__image__wrap",children:u&&e?n.jsx(p.Box,{sx:{position:"absolute",left:0,top:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center"},children:n.jsx(T,{icon:e,color:"primary.main"})}):f&&n.jsx("img",{className:"card__image",src:f,...i,alt:i.alt||(r==null?void 0:r.filename)||"card-image",width:r==null?void 0:r.naturalWidth,height:r==null?void 0:r.naturalHeight,style:{width:"100%",height:"100%",objectFit:s||"cover",objectPosition:"center"},loading:"lazy"})}),children:[t||o?n.jsx(D,{align:d,title:t,titleProps:a,description:o,descriptionProps:c}):null,l!=null&&l.length?n.jsx(z,{align:d,actions:l,className:"mt-4"}):null]})}const dn=$.styled(G)`
|
|
201
|
+
${e=>e.hoverStyle==="none"?"":e.link?`transition: box-shadow ease .3s;
|
|
202
|
+
&:hover {
|
|
203
|
+
box-shadow: 0 0 10px rgba(95, 142, 244, 0.42);
|
|
204
|
+
}`:""}
|
|
205
|
+
|
|
206
|
+
.card__image__wrap {
|
|
207
|
+
padding-top: 61.8%;
|
|
208
|
+
width: 100%;
|
|
209
|
+
position: relative;
|
|
210
|
+
}
|
|
211
|
+
.card__image {
|
|
212
|
+
position: absolute;
|
|
213
|
+
top: 0;
|
|
214
|
+
left: 0;
|
|
215
|
+
bottom: 0;
|
|
216
|
+
right: 0;
|
|
217
|
+
width: 100%;
|
|
218
|
+
height: 100%;
|
|
219
|
+
object-position: top center;
|
|
220
|
+
}
|
|
221
|
+
`,ge="section";function be({title:e,image:t,imageMeta:o,description:i,actions:r,align:s,listType:a="",className:c="",...l}){return n.jsxs(un,{className:_.cx("card",`list-type-${a}`,c),align:s,...l,children:[t&&n.jsx(T,{icon:t,color:"primary.main",size:a==="icon-title"?"1.2rem":"3rem",imageMeta:o}),e||i?n.jsx(D,{align:s,title:e,description:i}):null,r!=null&&r.length?n.jsx(z,{align:s,actions:r,className:"mt-4"}):null]})}const un=$.styled(G)`
|
|
222
|
+
padding: 5vw 4vw;
|
|
223
|
+
box-sizing: border-box;
|
|
224
|
+
/* min-height: 320px; */
|
|
225
|
+
color: inherit !important;
|
|
226
|
+
border-radius: 0.5rem;
|
|
227
|
+
/* ${({dark:e,theme:t})=>`background-color:${e?t.palette.grey[900]:t.palette.common.white};`} */
|
|
228
|
+
@media (max-width: ${({theme:e})=>e.breakpoints.values[ge]}px) {
|
|
229
|
+
padding: 1.5rem 2rem;
|
|
230
|
+
}
|
|
231
|
+
@media (max-width: ${({theme:e})=>e.breakpoints.values.sm}px) {
|
|
232
|
+
height: auto;
|
|
233
|
+
min-height: unset;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
${e=>e.hoverStyle==="none"?"":e.link?`transition: box-shadow ease .3s;
|
|
237
|
+
&:hover {
|
|
238
|
+
box-shadow: 0 0 10px rgba(95, 142, 244, 0.42);
|
|
239
|
+
}`:""}
|
|
240
|
+
|
|
241
|
+
.card__title {
|
|
242
|
+
font-weight: 700;
|
|
243
|
+
margin-top: 24px;
|
|
244
|
+
margin-bottom: 12px;
|
|
245
|
+
a {
|
|
246
|
+
color: ${({theme:e})=>e.palette.primary.main};
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
.card__description {
|
|
250
|
+
a {
|
|
251
|
+
color: ${({theme:e})=>e.palette.primary.main};
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
.card__body {
|
|
255
|
+
padding: 0;
|
|
256
|
+
${({align:e})=>`text-align:${e||"left"};`}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
&.list-type-icon-title {
|
|
260
|
+
padding: 1.2rem;
|
|
261
|
+
.title-line {
|
|
262
|
+
display: flex;
|
|
263
|
+
}
|
|
264
|
+
.card__title {
|
|
265
|
+
margin: 0;
|
|
266
|
+
font-size: 1em;
|
|
267
|
+
}
|
|
268
|
+
.css-icon {
|
|
269
|
+
margin-right: 0.5rem;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
@media (min-width: ${({theme:e})=>e.breakpoints.values[ge]}px) {
|
|
274
|
+
padding: 2rem 2rem;
|
|
275
|
+
text-align: left;
|
|
276
|
+
box-sizing: border-box;
|
|
277
|
+
}
|
|
278
|
+
`;function mn({image:e,title:t,description:o,imageProps:i={},imageMeta:r,imageSize:s,titleProps:a={},descriptionProps:c={},actions:l,align:d,...m}){const u=ae(e),f=w.autoResizeImage(w.getImageAbsoluteUrl(e),540);return n.jsxs(pn,{className:"card-article",...m,prepend:n.jsx("div",{className:"card__image__wrap",children:u&&e?n.jsx(p.Box,{sx:{position:"absolute",left:0,top:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center"},children:n.jsx(T,{icon:e,color:"primary.main"})}):f&&n.jsx(p.Box,{component:"img",className:"card__image",src:f,...i,alt:i.alt||(r==null?void 0:r.filename)||"card-image",width:r==null?void 0:r.naturalWidth,height:r==null?void 0:r.naturalHeight,style:{width:"100%",height:"100%",objectFit:s||"contain",objectPosition:"center"},loading:"lazy"})}),children:[t||o?n.jsx(D,{align:d,title:t,titleProps:a,description:o,descriptionProps:c}):null,l!=null&&l.length?n.jsx(z,{align:d,actions:l,className:"mt-4"}):null]})}const pn=$.styled(G)`
|
|
279
|
+
${e=>e.hoverStyle==="none"?"":e.link?`transition: box-shadow ease .3s;
|
|
280
|
+
&:hover {
|
|
281
|
+
box-shadow: 0 0 10px rgba(95, 142, 244, 0.42);
|
|
282
|
+
}`:""}
|
|
283
|
+
|
|
284
|
+
border-radius: 0 !important;
|
|
285
|
+
|
|
286
|
+
.card__body {
|
|
287
|
+
${({align:e})=>`text-align:${e||"left"};`}
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.card__image__wrap {
|
|
291
|
+
width: 100%;
|
|
292
|
+
height: 100%;
|
|
293
|
+
position: relative;
|
|
294
|
+
display: flex;
|
|
295
|
+
justify-content: center;
|
|
296
|
+
align-items: center;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.card__image {
|
|
300
|
+
max-height: 60px;
|
|
301
|
+
}
|
|
302
|
+
`,ye="section";function xn({title:e,image:t,imageMeta:o,iconSize:i=100,description:r,actions:s,align:a,className:c="",...l}){return n.jsx(fn,{className:_.cx("card",c),...l,children:n.jsxs(p.Box,{className:"flex items-center",children:[t&&n.jsx(T,{icon:t,color:"primary.main",size:i,imageMeta:o}),n.jsxs(p.Box,{className:"flex-1 ml-4",children:[n.jsx(D,{align:a,title:e,description:r}),n.jsx(z,{align:a,actions:s,className:"mt-4"})]})]})})}const fn=$.styled(G)`
|
|
303
|
+
padding: 5vw 4vw;
|
|
304
|
+
text-align: left;
|
|
305
|
+
box-sizing: border-box;
|
|
306
|
+
/* min-height: 320px; */
|
|
307
|
+
color: inherit !important;
|
|
308
|
+
border-radius: 0.5rem;
|
|
309
|
+
/* ${({dark:e,theme:t})=>`background-color:${e?t.palette.grey[900]:t.palette.common.white};`} */
|
|
310
|
+
@media (max-width: ${({theme:e})=>e.breakpoints.values[ye]}px) {
|
|
311
|
+
padding: 1.5rem 2rem;
|
|
312
|
+
}
|
|
313
|
+
@media (max-width: ${({theme:e})=>e.breakpoints.values.sm}px) {
|
|
314
|
+
height: auto;
|
|
315
|
+
min-height: unset;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
${e=>e.hoverStyle==="none"?"":e.link?`transition: box-shadow ease .3s;
|
|
319
|
+
&:hover {
|
|
320
|
+
box-shadow: 0 0 10px rgba(95, 142, 244, 0.42);
|
|
321
|
+
}`:""}
|
|
322
|
+
|
|
323
|
+
.card__title {
|
|
324
|
+
font-weight: 700;
|
|
325
|
+
margin-bottom: 12px;
|
|
326
|
+
a {
|
|
327
|
+
color: ${({theme:e})=>e.palette.primary.main};
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
.card__description {
|
|
331
|
+
a {
|
|
332
|
+
color: ${({theme:e})=>e.palette.primary.main};
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
.card__body {
|
|
336
|
+
padding: 0;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
&.list-type-icon-title {
|
|
340
|
+
padding: 1.2rem;
|
|
341
|
+
.title-line {
|
|
342
|
+
display: flex;
|
|
343
|
+
}
|
|
344
|
+
.card__title {
|
|
345
|
+
margin: 0;
|
|
346
|
+
font-size: 1em;
|
|
347
|
+
}
|
|
348
|
+
.css-icon {
|
|
349
|
+
margin-right: 0.5rem;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
@media (min-width: ${({theme:e})=>e.breakpoints.values[ye]}px) {
|
|
354
|
+
padding: 2rem 2rem;
|
|
355
|
+
text-align: left;
|
|
356
|
+
box-sizing: border-box;
|
|
357
|
+
}
|
|
358
|
+
`;function hn({title:e,titleProps:t={},description:o,descriptionProps:i={},image:r,imageMeta:s,className:a="",align:c,hoverStyle:l,...d}){return n.jsxs(gn,{className:_.cx("card-simple",a,`hover-style__${l}`),align:c,...d,children:[r&&n.jsx(T,{icon:r,color:"primary.main",imageMeta:s}),e||o?n.jsx(D,{align:c,title:e,titleProps:t,description:o,descriptionProps:i}):null]})}const gn=$.styled(G)`
|
|
359
|
+
${({dark:e,theme:t})=>`background-color:${e?t.palette.grey[900]:t.palette.common.white};`}
|
|
360
|
+
|
|
361
|
+
&.hover-style__default {
|
|
362
|
+
&.card-simple {
|
|
363
|
+
&:hover {
|
|
364
|
+
border-top-right-radius: 36px;
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
.card__body {
|
|
368
|
+
&:hover {
|
|
369
|
+
&::before {
|
|
370
|
+
width: 42px;
|
|
371
|
+
height: 42px;
|
|
372
|
+
transform: translate(50%, -50%) rotate(45deg);
|
|
373
|
+
}
|
|
374
|
+
&::after {
|
|
375
|
+
transform: none;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
&.card-simple {
|
|
382
|
+
border-radius: 8px;
|
|
383
|
+
border-top-right-radius: 26px;
|
|
384
|
+
|
|
385
|
+
.card__body {
|
|
386
|
+
${({align:e})=>`text-align:${e||"left"};`}
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
${e=>e.link?`
|
|
390
|
+
cursor: pointer;
|
|
391
|
+
`:""}
|
|
392
|
+
/* cursor: pointer; */
|
|
393
|
+
/* &:hover {
|
|
394
|
+
border-top-right-radius: 36px;
|
|
395
|
+
} */
|
|
396
|
+
transition: all 180ms ease 0s;
|
|
397
|
+
overflow: visible;
|
|
398
|
+
.card__title {
|
|
399
|
+
margin: 12px 0;
|
|
400
|
+
}
|
|
401
|
+
.card__body {
|
|
402
|
+
position: relative;
|
|
403
|
+
padding: 20px 16px 18px;
|
|
404
|
+
overflow: hidden;
|
|
405
|
+
transition: all 180ms ease 0s;
|
|
406
|
+
/* &:hover {
|
|
407
|
+
&::before {
|
|
408
|
+
width: 42px;
|
|
409
|
+
height: 42px;
|
|
410
|
+
transform: translate(50%, -50%) rotate(45deg);
|
|
411
|
+
}
|
|
412
|
+
&::after {
|
|
413
|
+
transform: none;
|
|
414
|
+
}
|
|
415
|
+
} */
|
|
416
|
+
&::before,
|
|
417
|
+
&::after {
|
|
418
|
+
content: ${({border:e})=>e?'""':""};
|
|
419
|
+
transition: inherit;
|
|
420
|
+
position: absolute;
|
|
421
|
+
top: 0px;
|
|
422
|
+
right: 0px;
|
|
423
|
+
}
|
|
424
|
+
&::before {
|
|
425
|
+
z-index: 3;
|
|
426
|
+
background: #fff;
|
|
427
|
+
width: 30px;
|
|
428
|
+
height: 30px;
|
|
429
|
+
transform: translate(50%, -50%) rotate(45deg);
|
|
430
|
+
box-shadow: 0 1px 0 0 #e9eaec;
|
|
431
|
+
}
|
|
432
|
+
&::after {
|
|
433
|
+
z-index: 2;
|
|
434
|
+
width: 28px;
|
|
435
|
+
height: 28px;
|
|
436
|
+
border-bottom-left-radius: 6px;
|
|
437
|
+
background: #fcfcfd;
|
|
438
|
+
box-shadow: -1px 1px 0 0 #e9eaec;
|
|
439
|
+
transform: translate(8px, -8px);
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
`;function bn({type:e="default",...t}){const i={article:ln,simple:hn,news:xn,default:be,wall:mn}[e]||be;return n.jsx(i,{...e==="news"?t:A.omit(t,"iconSize")})}function yn({list:e=[],align:t="top",cards:o,listBorder:i=!0,listType:r="",col:s=3,gap:a,iconColor:c,className:l="",type:d="default",dark:m=!1,textAlign:u="left",hoverStyle:f,...x}){return n.jsx(se,{type:d,className:_.cx("card-list py-1",l,"items-stretch"),col:s,gap:a,align:t,...x,children:o||e.map(y=>n.jsx(bn,{borderColor:i,iconColor:c,type:d,listType:r,dark:m,...y,align:u,sx:{bgcolor:d==="wall"?void 0:m?"grey.900":"common.white"},style:a===0&&e.length>1?{borderRadius:0,marginRight:"-1px",marginBottom:"-1px"}:{}},y.id))})}const jn=["align","cards","list","listBorder","listType","col","gap","iconColor","type","textAlign"],wn=$.styled(F)`
|
|
444
|
+
a .card {
|
|
445
|
+
color: #404040;
|
|
446
|
+
cursor: pointer;
|
|
447
|
+
}
|
|
448
|
+
a:not(.MuiButton-root) {
|
|
449
|
+
color: ${({theme:e})=>e.palette.primary.main};
|
|
450
|
+
&:hover,
|
|
451
|
+
&:active {
|
|
452
|
+
color: ${({theme:e})=>e.palette.primary.main};
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
a:hover .card {
|
|
456
|
+
color: #404040;
|
|
457
|
+
}
|
|
458
|
+
`;function _n({className:e,...t}){const[o,i]=I(t,M),[r,s]=I(i,jn);return n.jsxs(wn,{className:_.cx("section--card-list",e),type:t.type,...s,children:[Object.keys(o).length>0&&n.jsx(H,{center:!0,...o,className:"mb-[2.5vw]"}),n.jsx(yn,{...r,dark:!!t.dark})]})}const vn=$.styled(_n)`
|
|
459
|
+
.card__description {
|
|
460
|
+
white-space: pre-wrap;
|
|
461
|
+
}
|
|
462
|
+
.section__description {
|
|
463
|
+
}
|
|
464
|
+
.card {
|
|
465
|
+
/* background: inherit !important; */
|
|
466
|
+
}
|
|
467
|
+
&.dark .card-simple .card__body::before {
|
|
468
|
+
background: #212121 !important;
|
|
469
|
+
}
|
|
470
|
+
.card-simple .card__body::after {
|
|
471
|
+
background: inherit !important;
|
|
472
|
+
}
|
|
473
|
+
`;function kn({section:e,...t}){const[{editing:o},i]=I(t,V),r=g.useMemo(()=>{var s;return{...q.default(i,["listBorder","list","iconSize","imageSize"]),list:(s=i.list)==null?void 0:s.map(a=>{var c,l;return{...q.default(a,"icon","iconColor"),image:["news","simple","default"].includes(i.type)&&a.icon?a.icon:a.image,actions:(l=(c=a.actions)==null?void 0:c.map)==null?void 0:l.call(c,d=>n.jsx(We,{...d,editing:o},d.id)),border:i.listBorder,iconSize:i.iconSize,imageSize:i.imageSize,hoverStyle:i.hoverStyle}})}},[i]);return n.jsx(vn,{style:o?{pointerEvents:"none"}:{},...r})}function $n({properties:e,section:t,locale:o,dev:i}){var r;return(r=t==null?void 0:t.config)!=null&&r.componentId?n.jsx(re.CustomComponentRenderer,{instanceId:t.id,componentId:t.config.componentId,blockletId:t.config.blockletId,blockletTitle:t.config.blockletTitle,componentName:t.config.componentName,locale:o,properties:e,dev:i}):n.jsx(p.Box,{textAlign:"center",py:2,children:n.jsx(p.Typography,{variant:"caption",color:"text.secondary",children:"Please select component to render"})})}function Sn({src:e,dataId:t,isEdit:o=!1,height:i="100%",onLoad:r=()=>{}}){return n.jsx(yt.EmbedIframe,{isEdit:o,embedId:t,src:e,height:i,onLoad:()=>{r()}})}function Cn({dataId:e,src:t,actions:o,center:i,onLoad:r,...s}){const[a,c]=I(s,M);return n.jsxs(F,{...c,children:[Object.keys(a).length>0&&n.jsx(H,{center:i,...a}),n.jsx(Sn,{dataId:e,src:t,onLoad:r,height:s.iframeHeight?`${s.iframeHeight}px`:"100%"}),n.jsx(z,{actions:o,center:i})]})}function Bn({section:e,id:t,src:o,...i}){const r=`${t}-${i.locale}`,[{editing:s},a]=I(i,V),c=g.useRef({}),l=JSON.parse(JSON.stringify(a)),{message:d}=gt.useMessage(r,"server"),m=$e.useLatest(JSON.parse(JSON.stringify(a.config)||"{}"));return g.useEffect(()=>{d&&d.onInit(()=>m.current)},[d]),g.useEffect(()=>{const u=JSON.parse(JSON.stringify(a.config)||"{}");Rt.default(c.current,u)||(c.current=u,d==null||d.send("config-set",u))},[d,a.config]),o?n.jsx(Cn,{...l,dataId:r,src:o,style:s?{pointerEvents:"none"}:{}}):n.jsx(In,{children:'Please set the "src" attribute for this block'})}const In=$.styled("div")`
|
|
474
|
+
user-select: none;
|
|
475
|
+
color: #999;
|
|
476
|
+
padding: 8px;
|
|
477
|
+
height: 200px;
|
|
478
|
+
`,Nn=[/youtu\.be\/([^#&?]{11})/,/\?v=([^#&?]{11})/,/&v=([^#&?]{11})/,/embed\/([^#&?]{11})/,/\/v\/([^#&?]{11})/];function Pn(e){var t;if(/youtu\.?be/.test(e))for(const o of Nn){const i=(t=o.exec(e))==null?void 0:t[1];if(i)return i}}function Rn(e){const t=Pn(e);if(t)return`https://youtube.com/embed/${t}`}function Tn({src:e}){return g.useEffect(()=>{import("@lottiefiles/lottie-player")},[]),n.jsx("lottie-player",{autoplay:!0,loop:!0,mode:"normal",src:e})}function qn(e){return n.jsx(p.Box,{maxHeight:400,overflow:"hidden auto",children:n.jsx(jt.TwitterTimelineEmbed,{...e})})}function En({url:e}){const t=g.useRef(null),o=495,[i,r]=g.useState(t.current?t.current.offsetWidth*.5625:o),s=g.useCallback(()=>{const a=window.innerWidth>990?1:window.innerWidth>522?1.2:window.innerWidth>400?1.45:1.85,c=t.current?t.current.offsetWidth*.5625:o;return r(Math.floor(c*a))},[]);return g.useEffect(()=>{window.addEventListener("resize",s);const a=window.innerWidth>990?1:window.innerWidth>522?1.2:window.innerWidth>400?1.45:1.85,c=t.current?t.current.offsetWidth*.5625:o;return r(Math.floor(c*a)),function(){window.removeEventListener("resize",s)}},[i,s]),n.jsx(p.Box,{component:"iframe",ref:t,title:"youtube",width:"100%",height:`${i}px`,src:e,frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,sx:{display:"block"}})}const zn=$.styled(Xt)`
|
|
479
|
+
.section__description {
|
|
480
|
+
}
|
|
481
|
+
`;function Wn({hasImage:e,fullSizeImage:t,boxed:o,videoPoster:i,imageMeta:r,imageOptimization:s,imageSize:a,section:c,...l}){var x,y;const[{editing:d},m]=I({...l,boxed:t?void 0:o},V);let u=Ln(m.image,i,t,r,s,a);e||(u=null);let f=null;return m.actions&&(f=(y=(x=m.actions)==null?void 0:x.map)==null?void 0:y.call(x,(j,h)=>n.jsx(We,{...j,editing:d},h))),n.jsx(zn,{...m,style:d?{pointerEvents:"none"}:{},image:u,fullSizeImage:e&&t,actions:f})}function Ln(e,t,o,i,r,s){if(e){if(e.endsWith(".json"))return n.jsx(Tn,{src:e});if(e.indexOf("twitter.com")!==-1)return n.jsx(qn,{sourceType:"url",url:e});const a=Rn(e);if(a)return n.jsx(En,{url:a});const{naturalWidth:c,naturalHeight:l,filename:d}=i||{};if(ne(e))return n.jsx("video",{width:c&&`${c}px`,height:l&&`${l}px`,controls:!0,autoPlay:!0,muted:!0,style:{display:"block",objectFit:s||"contain",borderRadius:"8px",width:"100%",height:"100%"},poster:w.autoResizeImage(w.getImageAbsoluteUrl(t),o?1200:540,r),children:n.jsx("source",{src:w.getImageAbsoluteUrl(e),type:Vt(e)})},e);const m=r==="quality"?1:.6;return n.jsx(re.ResponsiveImage,{src:w.getImageAbsoluteUrl(e),sizesAttr:{sm:600*m,md:450*m,lg:540*m,...o&&{md:900*m,lg:1200*m}},width:c&&`${c}px`,height:l&&`${l}px`,alt:d??e,style:{objectFit:s||"contain",display:"block",width:"100%",height:"100%"},loading:"lazy"})}return null}const An=["production","draft"];function Le({mode:e,version:t}={}){const o=t&&typeof t=="number"?{mode:e,version:t}:{mode:e};return w.api.get(`/api/${w.getProjectIdFromPathnameOrWindow()}/pages`,{params:o}).then(i=>i.data)}function On({mode:e,pages:t}){return w.api.post(`/api/${w.getProjectIdFromPathnameOrWindow()}/pages/publish`,{mode:e,pages:t}).then(o=>o.data)}function Un({locale:e,sort:t,page:o,limit:i,mode:r}={}){return w.api.get(`/api/${w.getProjectIdFromPathnameOrWindow()}/pages/toc`,{params:{locale:e,sort:t,page:o,limit:i,mode:r}}).then(s=>s.data)}const je=20;function Hn({style:e,sort:t,section:o,...i}){const[{editing:r,locale:s},a]=I(i,V),[c,l]=I(a,M),[d,m]=g.useState(),u=g.useRef(!1),f=U.useUpdate(),x=B.useNavigate(),y=g.useCallback(async()=>{if(!u.current){u.current=!0,f();try{const j=d?Math.floor(d.list.length/je)+1:1,{list:h,total:v}=await Un({locale:s,sort:t,page:j,limit:je});m(b=>({list:((b==null?void 0:b.list)??[]).concat(h),total:v}))}finally{u.current=!1,f()}}},[d,s,t,f]);return U.useMount(()=>{y()}),n.jsxs(F,{...l,sx:r?{pointerEvents:"none"}:{},children:[Object.keys(c).length>0&&n.jsx(H,{...c}),d?n.jsxs(n.Fragment,{children:[n.jsx(p.Grid,{container:!0,spacing:2,justifyContent:"center",children:d==null?void 0:d.list.map(j=>n.jsx(p.Grid,{item:!0,xs:12,sm:e==="card"?6:12,md:e==="card"?3:12,children:n.jsxs(Mn,{elevation:0,className:_.cx(e==="card"&&"style-card"),onClick:r?void 0:()=>x(j.slug),children:[!!j.image&&n.jsx(p.CardMedia,{component:"img",alt:"",image:w.autoResizeImage(w.getImageAbsoluteUrl(j.image),540),loading:"lazy"}),n.jsxs(p.CardContent,{children:[n.jsx(p.Typography,{variant:"h6",component:"div",className:we,children:j.title||j.id}),n.jsx(p.Typography,{variant:"body2",className:we,children:j.description})]})]})},j.id))}),n.jsx(p.Box,{textAlign:"center",mt:2,children:d.total>d.list.length?n.jsx(O,{variant:"outlined",color:"secondary",onClick:y,loading:u.current,children:"More"}):n.jsx(O,{variant:"outlined",color:"secondary",disabled:!0,children:"No More"})})]}):n.jsx(p.Box,{p:2,textAlign:"center",children:n.jsx(p.CircularProgress,{size:24})})]})}const we=_.css`
|
|
482
|
+
display: -webkit-box;
|
|
483
|
+
-webkit-box-orient: vertical;
|
|
484
|
+
-webkit-line-clamp: 2;
|
|
485
|
+
overflow: hidden;
|
|
486
|
+
text-overflow: ellipsis;
|
|
487
|
+
`,Mn=$.styled(p.Card)`
|
|
488
|
+
border: 1px solid #e0e0e0;
|
|
489
|
+
background-color: transparent;
|
|
490
|
+
cursor: pointer;
|
|
491
|
+
display: flex;
|
|
492
|
+
color: inherit;
|
|
493
|
+
|
|
494
|
+
> .MuiCardMedia-root {
|
|
495
|
+
width: 30vw;
|
|
496
|
+
max-height: 50vw;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
&.style-card {
|
|
500
|
+
display: block;
|
|
501
|
+
|
|
502
|
+
> .MuiCardMedia-root {
|
|
503
|
+
width: 100%;
|
|
504
|
+
max-height: 50vw;
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
`,Fn={iframe:Bn,section:Wn,"section-card-list":kn,toc:Hn,"ai-runtime":Zt,"custom-component":$n};function Vn({id:e,type:t,mode:o,config:i,section:r,...s}){const a=Fn[t],c=a&&n.jsx(a,{mode:o,...i,id:e,section:r});return t==="custom-component"?c:n.jsx(Yt,{...s,height:i.height,children:c})}const Gn=$.styled(Tt.default,{shouldForwardProp:e=>!!e})`
|
|
508
|
+
& > div > .MuiContainer-root {
|
|
509
|
+
max-width: unset;
|
|
510
|
+
}
|
|
511
|
+
`;function Dn({meta:e,...t}){const o=$.useTheme();return n.jsx(Gn,{...t,meta:e,theme:o||{}})}function Ae(e){return n.jsx(p.Box,{display:"flex",flex:1,height:"100%",alignItems:"center",justifyContent:"center",...e,children:n.jsx(p.CircularProgress,{size:30})})}function Jn(e){return n.jsx(Kn,{...e})}const Kn=$.styled(p.Box)`
|
|
512
|
+
position: fixed;
|
|
513
|
+
left: 0;
|
|
514
|
+
top: 0;
|
|
515
|
+
z-index: 999999999999;
|
|
516
|
+
width: 80px;
|
|
517
|
+
font-size: 12px;
|
|
518
|
+
text-align: center;
|
|
519
|
+
opacity: 0.7;
|
|
520
|
+
transform: translateX(-23%) translateY(70%) rotate(-45deg);
|
|
521
|
+
pointer-events: none;
|
|
522
|
+
`,Xn=e=>new Promise((t,o)=>{(e==null?void 0:e.length)>0?qt.default.load({google:{families:e},fontactive:()=>{t("success")},fontinactive:()=>{o(new Error("load font fail"))}}):t("success")}),_e=`Avenir, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
|
|
523
|
+
sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'`,ve={};function Yn({titleFontFamily:e,descriptionFontFamily:t}){const o=async i=>{if(i&&!document.querySelectorAll(`link[href*="${i}" i]`).length)try{ve[i]||(await Xn([i]),ve[i]=!0)}catch(r){console.error(r)}};return g.useEffect(()=>{e&&o(e),t&&o(t)},[e,t]),n.jsx(Q.Global,{styles:Q.css`
|
|
524
|
+
#app {
|
|
525
|
+
.page-kit-section__title {
|
|
526
|
+
font-family: ${JSON.stringify(e)}, ${_e};
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
.page-kit-section__description {
|
|
530
|
+
font-family: ${JSON.stringify(t)}, ${_e};
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
`})}const{SessionProvider:uo,SessionContext:Qn,SessionConsumer:mo,withSession:po}=vt.createAuthServiceSessionContext();function ce(){return g.useContext(Qn)}function Zn(...e){var o;const{session:t}=ce();return e.includes((o=t.user)==null?void 0:o.role)}function eo(...e){var i;const{session:t}=ce(),o=Zn(...e);return((i=window.blocklet)==null?void 0:i.tenantMode)==="multiple"?!!t.user:o}function to(e){return e!=null}function no(){const[e]=B.useSearchParams(),{session:t}=ce(),o=eo("owner","admin","pagesEditor","member"),i=g.useMemo(()=>{const s=e.get("mode");return An.includes(s)?s:"production"},[e]),r=i==="production"?i:t.user?o?i:"production":null;return r?n.jsx(Oe,{mode:r}):null}function Oe({mode:e}){if(e!=="draft"){const t=window.__PAGE_STATE__;return t?n.jsx(Y,{mode:e,state:t}):n.jsx(ro,{mode:e,children:({state:o})=>n.jsx(Y,{mode:e,state:o})})}return n.jsx(oo,{children:({state:t})=>n.jsx(Y,{mode:e,state:t})})}const oo=g.lazy(()=>Promise.resolve().then(()=>require("./draft-data-CgY7-dem.js")));function ro({mode:e,children:t}){const o=document.querySelector('meta[property="pages:version"]'),i=o==null?void 0:o.content,r=w.useProjectId(),s=g.useMemo(()=>{if(i==="{{pagesPublishedAt}}"){const l=localStorage.getItem(w.getProjectPageVersionKey(r??""));return Number(l)?Number(l):new Date().getTime()}return Number(i)},[i]),{loading:a,value:c}=U.useAsync(()=>Le({mode:e,version:s}),[e,s]);return a?n.jsx(Ae,{}):c?t({state:c}):null}function Y({mode:e,state:t}){var y,j,h,v;const{t:o,locale:i}=ke.useLocaleContext(),{pageIds:r,pages:s,supportedLocales:a,config:{defaultLocale:c},resources:l}=t,d=w.getAllComponents(t),m=g.useMemo(()=>a!=null&&a.some(b=>b.locale===i)?i:void 0,[i,a]),u=Object.values(s).find(b=>(b==null?void 0:b.slug)==="/")?void 0:Object.values(s)[0],f=g.useMemo(()=>r.map(b=>{const k=s[b];return k&&{id:k.id,path:P.joinURL("/",m||"",k.slug,e!=="production"?`?mode=${e}`:"")}}).filter(to),[r,s,m,e]),x=([...b])=>(e!=="production"&&b.unshift(n.jsx(g.Suspense,{fallback:n.jsx("div",{}),children:n.jsx(so,{mode:"production",state:t})})),b);return n.jsxs(en,{value:{pages:f},children:[n.jsxs(B.Routes,{children:[u&&n.jsx(B.Route,{index:!0,element:n.jsx(B.Navigate,{to:P.joinURL("/",m||"",u.slug)})}),r.map(b=>{const k=s[b];return k?n.jsx(B.Route,{path:P.joinURL(":projectIdOrSlug?",k.slug),element:n.jsx(Z,{mode:e,components:d,page:k,locale:m,defaultLocale:c,headerAddons:x})},k.id):null}),l.pages&&Object.values(l.pages).map(({blockletId:b,page:k})=>n.jsx(B.Route,{path:P.joinURL("/",`@${b}`,k.slug),element:n.jsx(Z,{mode:e,components:d,page:k,locale:m,defaultLocale:c,headerAddons:x})},k.id)),n.jsx(B.Route,{path:"*",element:n.jsx(p.Box,{width:"100vw",height:"100vh",display:"flex",justifyContent:"center",alignItems:"center",children:n.jsx(Ce.default,{style:{background:"inherit"},status:404,extra:n.jsx(Me,{href:"/",children:o("common.back")})})})})]}),e!=="production"&&n.jsx(Jn,{sx:{bgcolor:"info.light"},children:e}),n.jsx(Yn,{titleFontFamily:(j=(y=t.config)==null?void 0:y.fontFamily)==null?void 0:j.title,descriptionFontFamily:(v=(h=t.config)==null?void 0:h.fontFamily)==null?void 0:v.description})]})}function io({mode:e,state:t,path:o,pageData:i}){const{t:r,locale:s}=ke.useLocaleContext(),{pages:a,supportedLocales:c,config:{defaultLocale:l},resources:d}=t,m=Object.values(a).find(h=>(h==null?void 0:h.slug)===o),u=Object.values(d.pages||{}).find(h=>h.page.slug===o),f=g.useMemo(()=>c!=null&&c.some(h=>h.locale===s)?s:void 0,[s,c]),x=$e.useReactive({page:null});g.useEffect(()=>{const h=m||(u==null?void 0:u.page)||null;h?x.page=A.cloneDeep(h):x.page=null},[m,u]);const y=g.useRef();if(g.useEffect(()=>{A.isEqual(i,y.current)||i&&x.page&&(Et(x.page,t,f,i),y.current=A.cloneDeep(i))},[{}]),!m&&!(u!=null&&u.page))return n.jsx(p.Box,{width:"100vw",height:"100vh",display:"flex",justifyContent:"center",alignItems:"center",children:n.jsx(Ce.default,{style:{background:"inherit"},status:404,extra:n.jsx(Me,{href:"/",children:r("common.back")})})});const j=w.getAllComponents(t);return x.page?n.jsx(Z,{mode:e,components:j,page:x.page,locale:f,defaultLocale:l}):null}function Z({mode:e,components:t,page:o,locale:i,defaultLocale:r,headerAddons:s}){var h,v,b,k,N,W,J,le,de;const a=((h=o.locales)==null?void 0:h[i])??((v=o.locales)==null?void 0:v[r])??{},c=a.title||((b=window.blocklet)==null?void 0:b.appName),l=a.description||((k=window.blocklet)==null?void 0:k.appDescription),d=w.autoResizeImage(w.getImageAbsoluteUrl(a.image),540),{logo:m,brand:u,description:f,...x}=Qe.useHeaderState(),y=g.useMemo(()=>E=>{var L;let C=(s==null?void 0:s(E))??E;return C=((L=x.addons)==null?void 0:L.call(x,C))??C,C},[x.addons,s]),j=(N=a.header)!=null&&N.translucent?He:Ue;return n.jsxs(n.Fragment,{children:[!!a.backgroundColor&&n.jsx(Q.Global,{styles:Q.css`
|
|
534
|
+
body {
|
|
535
|
+
background-color: ${a.backgroundColor} !important;
|
|
536
|
+
}
|
|
537
|
+
`}),n.jsx(j,{hideNavMenu:!!((W=a.header)!=null&&W.hideNavMenus),translucentTextColor:(J=a.header)==null?void 0:J.translucentTextColor,...m?{logo:m}:{},...u?{brand:u}:{},...f?{description:f}:{},className:_.cx(((le=a.header)==null?void 0:le.sticky)&&"sticky","page-header"),maxWidth:!1,addons:y}),n.jsx(B.ScrollRestoration,{}),n.jsxs(ot.Helmet,{children:[n.jsx("title",{children:c}),n.jsx("meta",{name:"og:title",content:c}),n.jsx("meta",{name:"og:description",content:l}),n.jsx("meta",{name:"og:image",content:d}),n.jsx("meta",{name:"twitter:image:src",content:d}),n.jsx("meta",{name:"twitter:image",content:d}),n.jsx("meta",{property:"twitter:description",content:l}),n.jsx("meta",{property:"twitter:title",content:c}),n.jsx("meta",{name:"description",content:l})]}),n.jsx(p.Stack,{flexGrow:1,children:o.sectionIds.map(E=>{var ue,me;const C=o.sections[E];if(!C||C.visibility==="hidden")return null;const L=(ue=C.locales)==null?void 0:ue[i],Fe=((me=C.locales)==null?void 0:me[r])??{};return n.jsx(Vn,{id:E,type:C.component,mode:e,section:C,config:{...St.default(L)?Fe:L,locale:i,dev:e==="draft"?{mode:e,components:t,defaultLocale:r}:{mode:e}}},E)})}),!((de=a.footer)!=null&&de.hidden)&&n.jsx(Dn,{})]})}const so=g.lazy(()=>Promise.resolve().then(()=>require("./publish-button-CrxBSa6-.js"))),Ue=Be.default(kt.default)`
|
|
538
|
+
&.sticky {
|
|
539
|
+
position: sticky;
|
|
540
|
+
top: 0;
|
|
541
|
+
}
|
|
542
|
+
`;function ao({logo:e}){const[t,o]=g.useState(),{value:i}=U.useAsync(()=>new Promise(r=>{fetch("/.well-known/service/blocklet/logo-rect").then(s=>{const a=s.headers.get("content-type");a!=null&&a.includes("svg")&&s.text().then(c=>{o(c),r(null)}),r(s.url)})}),[]);if(e)return e;if(t)return n.jsx(p.Box,{sx:{filter:"initial !important"},dangerouslySetInnerHTML:{__html:$t.default.sanitize(t)}});if(i){const r=new URL(i);r.searchParams.set("imageFilter","convert"),r.searchParams.set("f","png"),r.searchParams.set("h","88"),r.searchParams.set("hash","00c22ff");const s=r.toString();return n.jsx("img",{src:s,alt:"logo"})}return null}function He({logo:e,translucentTextColor:t,...o}){const{y:i}=U.useWindowScroll();let r=Math.min(i/800,1),s="";if(r>.1){r=Math.max(r,.6);const a=Math.round(255*Math.min(1-r,.2));s=`rgb(${a}, ${a}, ${a})`}else s=t||"#EEEEEE";return n.jsx(Ue,{logo:n.jsx(ao,{logo:e}),...o,className:_.cx(r<=.7&&"reverse-color"),style:{backgroundColor:`rgba(255,255,255,${r})`,"--logo-invert":r<=.7?1-r/6:1-r},sx:{backdropFilter:r>=.6?"blur(10px)":"blur(0px)",transition:"all 0.3s ease",position:"fixed !important",left:0,top:0,right:0,bgcolor:"transparent","&.reverse-color":{".navmenu-root>.navmenu-sub>span,\n .navmenu-root>.navmenu-item,\n .header-addons>button,\n .header-addons>a,\n .header-addons>div>button":{color:`${s} !important`}},".header-logo > div":{filter:"invert(var(--logo-invert))"},".header-logo":{color:s}}})}const Me=Be.default(p.Button)``;exports.Home=no;exports.HomeView=Oe;exports.Loading=Ae;exports.PageRoutes=Y;exports.PageView=Z;exports.PageViewByPath=io;exports.TranslucentHeader=He;exports.getPages=Le;exports.publishPages=On;
|