@ibti-tech/chatbot 0.9.3 → 0.9.5
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 +5 -0
- package/dist/ibti-chatbot-embed.js +25 -7
- package/dist/ibti-chatbot-embed.js.map +2 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.mjs +25 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -92,6 +92,11 @@ Import: `import type { ChatbotTypes } from '@ibti-tech/chatbot'`
|
|
|
92
92
|
|
|
93
93
|
For static HTML, WordPress, PHP, or any site without React, load the script from the CDN:
|
|
94
94
|
|
|
95
|
+
**Mobile (position top):** When using `position="top-right"` or `position="top-left"` on mobile, add `viewport-fit=cover` to your viewport meta so the chatbot respects safe areas (notch, status bar) and the close button stays visible:
|
|
96
|
+
```html
|
|
97
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
|
|
98
|
+
```
|
|
99
|
+
|
|
95
100
|
```html
|
|
96
101
|
<script>
|
|
97
102
|
window.IBTIChatbotConfig = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* IBTI Chatbot – Embed script
|
|
3
|
-
* @version 0.9.
|
|
3
|
+
* @version 0.9.5
|
|
4
4
|
*
|
|
5
5
|
* Standalone widget for embedding the IBTI chatbot on any website (HTML, WordPress, PHP, etc.)
|
|
6
6
|
* without requiring React or a build step. Include this script and set window.IBTIChatbotConfig
|
|
@@ -315,7 +315,7 @@ Error generating stack: `+a.message+`
|
|
|
315
315
|
`;var q1=({filled:e=!1,onMouseOver:t,onMouseLeave:r,onClick:n,readOnly:o,layer:a=0})=>(0,nu.jsx)(W1,{$readOnly:o,onClick:n,onMouseLeave:r,onMouseOver:t,children:(0,nu.jsx)(V1,{$filled:e,$layer:a,viewBox:"0 0 24 24",width:"2rem",xmlns:"http://www.w3.org/2000/svg",children:(0,nu.jsx)("path",{d:"M11.0137 2.76683C11.379 1.89022 12.6208 1.89022 12.9861 2.76683L14.9102 7.38462C15.0654 7.75726 15.4295 8 15.8332 8H20.893C21.8234 8 22.2893 9.12483 21.6314 9.78268L17.5391 13.875C17.2823 14.1318 17.185 14.5076 17.2847 14.8568L18.9076 20.5369C19.1816 21.496 18.1122 22.2767 17.2822 21.7234L12.5546 18.5716C12.2187 18.3477 11.7811 18.3477 11.4452 18.5717L6.72544 21.7182C5.89284 22.2732 4.81988 21.49 5.09479 20.5279L6.71509 14.8568C6.81486 14.5076 6.71747 14.1318 6.46068 13.875L2.38859 9.8029C1.72328 9.13758 2.19448 8 3.13538 8H8.16658C8.57028 8 8.93438 7.75726 9.08965 7.38462L11.0137 2.76683Z"})})});var G1=D.div`
|
|
316
316
|
display: flex;
|
|
317
317
|
align-items: center;
|
|
318
|
-
`;var l2=[1,2,3,4,5],Q1=({value:e,setValue:t,readOnly:r=!1,layer:n})=>{let[o,a]=(0,gp.useState)(0),[i,l]=(0,gp.useState)(null);return(0,hp.jsx)(G1,{children:l2.map(s=>(0,hp.jsx)(q1,{filled:i?i>=s:(e||o)>=s,layer:n,onClick:()=>{t&&t(s),a(s)},onMouseLeave:()=>{!r&&l(null)},onMouseOver:()=>{!r&&l(s)},readOnly:r},s))})};var hn=z(Ie(),1),bi=z(Y(),1);var ou=({label:e,fillWidth:t,layer:r=1,setRef:n,info:o,error:a,success:i,showCharsCount:l,value:s,max:u,onFocused:f,onBlur:d,onFocus:c,onChange:p,rows:y=5,resize:w="none",...E})=>{let[h,g]=(0,bi.useState)(!1),[m,L]=(0,bi.useState)("");(0,bi.useEffect)(()=>{f&&f(h)},[f,h]);let I=B1({error:a,info:o,success:i}),v=s||m;return(0,hn.jsxs)(ki.Root,{className:E.className,fillWidth:t,style:E.style,children:[(0,hn.jsx)(ki.Label,{children:e}),(0,hn.jsxs)(mp.Wrapper,{$disabled:E.disabled,$focused:h,$hasCharsCounter:l,$hasError:!!a,$hasSuccess:!!i,$layer:r,children:[(0,hn.jsx)(mp.TextArea,{as:"textarea",onBlur:C=>{g(!1),d&&d(C)},onChange:C=>{L(C.target.value),p&&p(C)},onFocus:C=>{g(!0),c&&c(C)},ref:n,rows:y,value:s,maxLength:u,$resize:w,...E}),l&&(0,hn.jsx)(ki.CharsLimit,{charsCount:v.length,limit:u})]}),(0,hn.jsx)(ki.Status,{...I})]})};var Ei=z(Ie(),1);var K1=$t({content:(0,Ei.jsx)(Ei.Fragment,{children:(0,Ei.jsx)("path",{d:"M413 251.562C405.14 259.812 394.578 264 384 264C374.093 264 364.187 260.344 356.453 253L264 165.18V440C264 462.094 246.093 480 224 480S184 462.094 184 440V165.18L91.547 253C75.562 268.188 50.234 267.531 35 251.562C19.781 235.531 20.437 210.219 36.453 195L196.453 43C211.89 28.312 236.109 28.312 251.547 43L411.547 195C427.562 210.219 428.218 235.531 413 251.562Z"})}),viewBox:"0 0 448 512"});var X1=z(Ie(),1);var xp=$t({content:(0,X1.jsx)("path",{d:"M436.908 339.657C429.049 347.875 418.533 352 408.002 352C398.048 352 388.095 348.313 380.345 340.907L224 191.354L67.655 340.907C51.702 356.156 26.342 355.625 11.092 339.657C-4.174 323.689 -3.611 298.378 12.342 283.098L196.344 107.109C211.812 92.297 236.188 92.297 251.656 107.109L435.658 283.098C451.611 298.378 452.174 323.689 436.908 339.657Z"}),viewBox:"0 0 448 612"});var Y1={light:m1,dark:p1};function Z1(e,t){let r=i=>i&&i.trim().length>0;if(!t||!Object.values(t).some(r))return e;let n=r(t.primaryColor)?t.primaryColor:e.colors.palette.primary.normal,o=r(t.headerBackground)?t.headerBackground:r(t.primaryColor)?t.primaryColor:e.colors.palette.primary.normal,a=r(t.userBalloonColor)?t.userBalloonColor:r(t.primaryColor)?t.primaryColor:e.colors.palette.primary.normal;return{...e,colors:{...e.colors,palette:{...e.colors.palette,primary:{...e.colors.palette.primary,normal:n}},custom:{headerBackground:o,userBalloonColor:a}}}}var s2=["localhost","127.0.0.1","null","https://admin-chatbot.ibti.tech","https://admin-chatbot.ibti.tech/","http://admin-chatbot.ibti.tech","http://admin-chatbot.ibti.tech/"];function u2(e){let t=e.toLowerCase().trim();return t.startsWith("localhost")||t.startsWith("127.0.0.1")?t.split(":")[0]??t:t}function f2(e){return e.toLowerCase().trim()}function J1(e){let t=e.toLowerCase().trim();if(t.startsWith("http://")||t.startsWith("https://"))try{return new URL(t).hostname}catch{return t.split(":")[0]??t}return t.split(":")[0]??t}function c2(e,t){let r=t??s2,n=e.toLowerCase().trim().replace(/\/+$/,""),o=J1(e);return r.some(a=>{let i=a.toLowerCase().trim().replace(/\/+$/,""),l=J1(i);return n===i||o===l?!0:o==="localhost"||o==="127.0.0.1"?l==="localhost"||l==="127.0.0.1":!1})}function eS(e,t,r){let n=e??"";if(!n||n==="null"||c2(n,r))return!0;let o=u2(n.startsWith("http")?new URL(n).host:n),a=f2(t);if(o===a)return!0;let i=o.split(":")[0]??o;return!!(i===a||i.endsWith("."+a))}var d2="ibtiChatbot@visitorId";function p2(e,t){let r=e.replace(/\/+$/,"");return`${d2}:${r}:${t}`}function au(e,t){if(typeof window>"u")return un();let r=p2(e,t),n=localStorage.getItem(r);if(n)return n;let o=un();return localStorage.setItem(r,o),o}var tS=({locale:e,children:t,apiURL:r,publicHash:n,theme:o,isOpen:a=!1,texts:i,allowedOriginsWithoutCheck:l,skipDomainCheck:s,colors:u,icon:f})=>{let[d,c]=(0,ze.useState)(n?"loading":"ready"),[p,y]=(0,ze.useState)(),[w,E]=(0,ze.useState)(!n),[h,g]=(0,ze.useState)(()=>{}),m=d==="ready"&&(w||!n);(0,ze.useEffect)(()=>{if(m&&s&&typeof window<"u"&&window.self!==window.top)try{window.parent.postMessage({type:"IBTI_CHATBOT_READY"},"*")}catch{}},[m,s]);let{makeQuestion:L,chatMessages:I,loading:v,writing:C,error:T,apiConnectionError:M,suggestedQuestions:O}=Ry({apiURL:r,locale:e,publicHash:
|
|
318
|
+
`;var l2=[1,2,3,4,5],Q1=({value:e,setValue:t,readOnly:r=!1,layer:n})=>{let[o,a]=(0,gp.useState)(0),[i,l]=(0,gp.useState)(null);return(0,hp.jsx)(G1,{children:l2.map(s=>(0,hp.jsx)(q1,{filled:i?i>=s:(e||o)>=s,layer:n,onClick:()=>{t&&t(s),a(s)},onMouseLeave:()=>{!r&&l(null)},onMouseOver:()=>{!r&&l(s)},readOnly:r},s))})};var hn=z(Ie(),1),bi=z(Y(),1);var ou=({label:e,fillWidth:t,layer:r=1,setRef:n,info:o,error:a,success:i,showCharsCount:l,value:s,max:u,onFocused:f,onBlur:d,onFocus:c,onChange:p,rows:y=5,resize:w="none",...E})=>{let[h,g]=(0,bi.useState)(!1),[m,L]=(0,bi.useState)("");(0,bi.useEffect)(()=>{f&&f(h)},[f,h]);let I=B1({error:a,info:o,success:i}),v=s||m;return(0,hn.jsxs)(ki.Root,{className:E.className,fillWidth:t,style:E.style,children:[(0,hn.jsx)(ki.Label,{children:e}),(0,hn.jsxs)(mp.Wrapper,{$disabled:E.disabled,$focused:h,$hasCharsCounter:l,$hasError:!!a,$hasSuccess:!!i,$layer:r,children:[(0,hn.jsx)(mp.TextArea,{as:"textarea",onBlur:C=>{g(!1),d&&d(C)},onChange:C=>{L(C.target.value),p&&p(C)},onFocus:C=>{g(!0),c&&c(C)},ref:n,rows:y,value:s,maxLength:u,$resize:w,...E}),l&&(0,hn.jsx)(ki.CharsLimit,{charsCount:v.length,limit:u})]}),(0,hn.jsx)(ki.Status,{...I})]})};var Ei=z(Ie(),1);var K1=$t({content:(0,Ei.jsx)(Ei.Fragment,{children:(0,Ei.jsx)("path",{d:"M413 251.562C405.14 259.812 394.578 264 384 264C374.093 264 364.187 260.344 356.453 253L264 165.18V440C264 462.094 246.093 480 224 480S184 462.094 184 440V165.18L91.547 253C75.562 268.188 50.234 267.531 35 251.562C19.781 235.531 20.437 210.219 36.453 195L196.453 43C211.89 28.312 236.109 28.312 251.547 43L411.547 195C427.562 210.219 428.218 235.531 413 251.562Z"})}),viewBox:"0 0 448 512"});var X1=z(Ie(),1);var xp=$t({content:(0,X1.jsx)("path",{d:"M436.908 339.657C429.049 347.875 418.533 352 408.002 352C398.048 352 388.095 348.313 380.345 340.907L224 191.354L67.655 340.907C51.702 356.156 26.342 355.625 11.092 339.657C-4.174 323.689 -3.611 298.378 12.342 283.098L196.344 107.109C211.812 92.297 236.188 92.297 251.656 107.109L435.658 283.098C451.611 298.378 452.174 323.689 436.908 339.657Z"}),viewBox:"0 0 448 612"});var Y1={light:m1,dark:p1};function Z1(e,t){let r=i=>i&&i.trim().length>0;if(!t||!Object.values(t).some(r))return e;let n=r(t.primaryColor)?t.primaryColor:e.colors.palette.primary.normal,o=r(t.headerBackground)?t.headerBackground:r(t.primaryColor)?t.primaryColor:e.colors.palette.primary.normal,a=r(t.userBalloonColor)?t.userBalloonColor:r(t.primaryColor)?t.primaryColor:e.colors.palette.primary.normal;return{...e,colors:{...e.colors,palette:{...e.colors.palette,primary:{...e.colors.palette.primary,normal:n}},custom:{headerBackground:o,userBalloonColor:a}}}}var s2=["localhost","127.0.0.1","null","https://admin-chatbot.ibti.tech","https://admin-chatbot.ibti.tech/","http://admin-chatbot.ibti.tech","http://admin-chatbot.ibti.tech/"];function u2(e){let t=e.toLowerCase().trim();return t.startsWith("localhost")||t.startsWith("127.0.0.1")?t.split(":")[0]??t:t}function f2(e){return e.toLowerCase().trim()}function J1(e){let t=e.toLowerCase().trim();if(t.startsWith("http://")||t.startsWith("https://"))try{return new URL(t).hostname}catch{return t.split(":")[0]??t}return t.split(":")[0]??t}function c2(e,t){let r=t??s2,n=e.toLowerCase().trim().replace(/\/+$/,""),o=J1(e);return r.some(a=>{let i=a.toLowerCase().trim().replace(/\/+$/,""),l=J1(i);return n===i||o===l?!0:o==="localhost"||o==="127.0.0.1"?l==="localhost"||l==="127.0.0.1":!1})}function eS(e,t,r){let n=e??"";if(!n||n==="null"||c2(n,r))return!0;let o=u2(n.startsWith("http")?new URL(n).host:n),a=f2(t);if(o===a)return!0;let i=o.split(":")[0]??o;return!!(i===a||i.endsWith("."+a))}var d2="ibtiChatbot@visitorId";function p2(e,t){let r=e.replace(/\/+$/,"");return`${d2}:${r}:${t}`}function au(e,t){if(typeof window>"u")return un();let r=p2(e,t),n=localStorage.getItem(r);if(n)return n;let o=un();return localStorage.setItem(r,o),o}var tS=({locale:e,children:t,apiURL:r,publicHash:n,theme:o,isOpen:a=!1,texts:i,allowedOriginsWithoutCheck:l,skipDomainCheck:s,colors:u,icon:f})=>{let[d,c]=(0,ze.useState)(n?"loading":"ready"),[p,y]=(0,ze.useState)(),[w,E]=(0,ze.useState)(!n),[h,g]=(0,ze.useState)(()=>{}),m=d==="ready"&&(w||!n);(0,ze.useEffect)(()=>{if(m&&s&&typeof window<"u"&&window.self!==window.top)try{window.parent.postMessage({type:"IBTI_CHATBOT_READY"},"*")}catch{}},[m,s]);let{makeQuestion:L,chatMessages:I,loading:v,writing:C,error:T,apiConnectionError:M,suggestedQuestions:O}=Ry({apiURL:r,locale:e,publicHash:n,visitorId:m?h:void 0}),[Q,N]=(0,ze.useState)(a),F=(0,ze.useRef)(null);(0,ze.useEffect)(()=>{N(a)},[a]),(0,ze.useEffect)(()=>{if(s&&typeof window<"u"&&window.self!==window.top)try{window.parent.postMessage({type:"IBTI_CHATBOT_OPEN_STATE",isOpen:Q},"*")}catch{}},[Q,s]);let $=()=>{N(U=>!U)},H=(0,ze.useMemo)(()=>C?"writing":M||T?"unavailable":v?"loading":"online",[C,v,T,M]);return(0,ze.useEffect)(()=>{if(!n){c("ready"),E(!0);return}let U=!1;return(async()=>{try{let me=await Ld(r,n);if(U)return;if(s){y(me),E(!0);let re=au(r,n);g(re),c("ready");return}let se=typeof window<"u"?window.location.origin:"";if(typeof window<"u"&&(se==="null"||se===""||se==null)){y(me),E(!0);let re=au(r,n);g(re),c("ready");return}let x=eS(se,me.domain.name,l);if(y(me),E(x),x){let re=au(r,n);g(re),c("ready")}else c("domain_not_allowed")}catch{if(U)return;c("error"),E(!1)}})(),()=>{U=!0}},[r,n,s,l]),ze.default.createElement(ks.Provider,{value:{chatMessages:I,makeQuestion:L,loading:v,writing:C,locale:e,scrollRef:F,opened:Q,openedToggle:$,status:H,apiConnectionError:M,suggestedQuestions:O,apiURL:r,texts:i,theme:o,icon:f,publicHash:n,visitorId:h,domainAllowed:w,initializationStatus:d,chatbot:p}},ze.default.createElement(M0,{theme:Z1(Y1[o],u)},t))};var ao=z(Y());var rS=D.div`
|
|
319
319
|
/* Base styles */
|
|
320
320
|
width: 100%;
|
|
321
321
|
background-color: ${e=>e.theme.colors.layers[1].background};
|
|
@@ -352,9 +352,14 @@ Error generating stack: `+a.message+`
|
|
|
352
352
|
|
|
353
353
|
/* Mobile styles */
|
|
354
354
|
@media screen and (max-width: ${Z.tablet}px) {
|
|
355
|
+
/* Top + opened: use svh so panel fits visible viewport (browser URL bar); padding keeps close button above home indicator */
|
|
355
356
|
${e=>e.$opened&&e.$verticalPosition==="top"&&b`
|
|
356
357
|
max-height: 100vh !important;
|
|
358
|
+
max-height: 100svh !important;
|
|
357
359
|
height: 100vh !important;
|
|
360
|
+
height: 100svh !important;
|
|
361
|
+
padding-bottom: env(safe-area-inset-bottom, 0px);
|
|
362
|
+
box-sizing: border-box;
|
|
358
363
|
`}
|
|
359
364
|
|
|
360
365
|
${e=>e.$opened&&e.$verticalPosition==="bottom"?b`
|
|
@@ -493,9 +498,14 @@ Error generating stack: `+a.message+`
|
|
|
493
498
|
|
|
494
499
|
@media screen and (max-width: ${Z.tablet}px) {
|
|
495
500
|
height: 100vh !important;
|
|
501
|
+
height: 100svh !important;
|
|
496
502
|
max-height: 100vh !important;
|
|
503
|
+
max-height: 100svh !important;
|
|
497
504
|
min-height: 100vh !important;
|
|
505
|
+
min-height: 100svh !important;
|
|
506
|
+
padding-bottom: env(safe-area-inset-bottom, 0px);
|
|
498
507
|
overflow: hidden !important;
|
|
508
|
+
box-sizing: border-box;
|
|
499
509
|
}
|
|
500
510
|
`}
|
|
501
511
|
`;var xn=z(Y());var nS=D.span`
|
|
@@ -1323,7 +1333,7 @@ Error generating stack: `+a.message+`
|
|
|
1323
1333
|
transform: scale(0.9);
|
|
1324
1334
|
}
|
|
1325
1335
|
`}
|
|
1326
|
-
`;var aC={name:"@ibti-tech/chatbot",version:"0.9.
|
|
1336
|
+
`;var aC={name:"@ibti-tech/chatbot",version:"0.9.5",description:"Chatbot system developed to be embedded in any website",packageManager:"yarn@3.6.4",main:"./dist/index.mjs",types:"./dist/index.d.ts",files:["dist/**/*"],publishConfig:{access:"public"},scripts:{dev:"node ./build.config.mjs --watch",build:"node ./build.config.mjs","build:embed":"node ./build-embed.config.mjs","build:all":"node ./build.config.mjs && node ./build-embed.config.mjs",test:"vitest"},repository:{type:"git",url:"git+https://github.com/ibti-solutions/ibti-chatbot.git"},keywords:["chatbot","openai","chat-gpt","ibti"],author:"IBTI Solu\xE7\xF5es em TI",license:"ISC",bugs:{url:"https://github.com/ibti-solutions/ibti-chatbot/issues"},homepage:"https://github.com/ibti-solutions/ibti-chatbot#readme",dependencies:{"@types/node":"^20.13.0","date-fns":"^3.6.0","lucide-react":"^0.263.1",polished:"^4.3.1","react-markdown":"^9.0.1",uuid:"^9.0.1"},devDependencies:{"@ibti-tech/prettier-config":"^0.1.6","@ibti-tech/tsconfig":"^0.0.3","@ibti-tech/ui":"^0.16.4","@testing-library/react":"^15.0.7","@types/react":"^18.3.2","@types/uuid":"^9.0.8",esbuild:"0.21.3","esbuild-node-externals":"^1.13.1","esbuild-plugin-clean":"^1.0.1","esbuild-plugin-external-global":"^1.0.1",jsdom:"^24.0.0",lodash:"^4.17.21",nookies:"^2.5.2","npm-dts":"^1.3.12",prettier:"3.2.5",react:"18.2.0","react-dom":"^18.2.0","styled-components":"^6.1.11","ts-node":"^10.9.2",typescript:"^5.4.5",vitest:"^1.6.0"},peerDependencies:{lodash:"^4.17.21",nookies:"^2.5.2",react:"18.2.0","react-dom":"^18.2.0"}};var Fm=aC.version??"";var iC=({chatFeedbackBox:e})=>{let t=De(),[r,n]=(0,it.useState)(5),[o,a]=(0,it.useState)(""),i=ot(),l=s=>{s.preventDefault(),e.sendUserRating({description:o,ratingScore:r})};return it.default.createElement(oC,{$opened:e.opened&&t.opened},it.default.createElement(Om,null,it.default.createElement(nC,null,i.CHAT_FEEDBACK.TITLE),it.default.createElement(rC,null,i.CHAT_FEEDBACK.DESCRIPTION),it.default.createElement(tC,{onSubmit:l},it.default.createElement(Q1,{value:r,setValue:n,layer:2}),it.default.createElement(ou,{layer:2,placeholder:i.CHAT_FEEDBACK.MESSAGE_FIELD,fillWidth:!0,value:o,onChange:s=>a(s.target.value),className:"feedbackTextarea"}),it.default.createElement(Zw,null,Fm?it.default.createElement(Jw,null,"v",Fm):null,it.default.createElement(eC,null,it.default.createElement(Xn,{onClick:e.close,label:i.CHAT_FEEDBACK.CLOSE_BUTTON,size:"small",variant:"layerBased"}),it.default.createElement(Xn,{type:"submit",label:i.CHAT_FEEDBACK.SUBMIT_BUTTON,size:"small",loading:e.loading}))))))};var Xu=z(Y());var lC=()=>{let{apiURL:e,locale:t,publicHash:r,visitorId:n}=De(),[o,a]=(0,Xu.useState)(!1),[i,l]=(0,Xu.useState)(!1),[s,u]=(0,Xu.useState)(!1);return{opened:i,open:()=>{l(!0)},close:()=>{l(!1),a(!0)},sendUserRating:async({ratingScore:p,description:y})=>{try{u(!0),await Ed({apiURL:e,publicHash:r,visitorId:n,locale:t,ratingScore:p,description:y})}finally{u(!1),a(!0),l(!1)}},loading:s}};var eP=32,tP=({verticalPosition:e="bottom",pushContentDown:t=!1,horizontalPosition:r,pushContentDownBarHeight:n=eP})=>{let{opened:o}=De(),a=lC(),i=n;return ao.default.createElement(rS,{$opened:o,$verticalPosition:e,$pushContentDown:t,$horizontalPosition:r,$pushContentDownBarHeight:i},ao.default.createElement(iC,{chatFeedbackBox:a}),ao.default.createElement(dS,{chatFeedbackBox:a}),ao.default.createElement(Ww,null),ao.default.createElement(Kw,null),ao.default.createElement(Yw,{verticalPosition:e,opened:o,pushContentDown:t,pushContentDownBarHeight:i}))},sC=tP;var uC=D($1)`
|
|
1327
1337
|
font-family: 'Montserrat', sans-serif !important;
|
|
1328
1338
|
font-weight: 600 !important;
|
|
1329
1339
|
|
|
@@ -1412,8 +1422,10 @@ Error generating stack: `+a.message+`
|
|
|
1412
1422
|
}
|
|
1413
1423
|
@media screen and (max-width: ${Z.tablet}px) {
|
|
1414
1424
|
padding-top: 0 !important;
|
|
1415
|
-
|
|
1425
|
+
/* Account for safe area (notch/status bar) and browser chrome on mobile */
|
|
1426
|
+
top: max(${r}, env(safe-area-inset-top, 0px)) !important;
|
|
1416
1427
|
height: 100vh;
|
|
1428
|
+
height: 100svh; /* small viewport: fits visible area with browser URL bar visible */
|
|
1417
1429
|
}
|
|
1418
1430
|
`:b`
|
|
1419
1431
|
position: fixed !important;
|
|
@@ -1438,7 +1450,8 @@ Error generating stack: `+a.message+`
|
|
|
1438
1450
|
@media screen and (max-width: ${Z.tablet}px) {
|
|
1439
1451
|
height: ${t}px !important;
|
|
1440
1452
|
min-height: ${t}px !important;
|
|
1441
|
-
|
|
1453
|
+
/* Keep bar/toggle visible below browser UI and safe area on mobile */
|
|
1454
|
+
top: ${e.$topOffset!==void 0?r:"max(0px, env(safe-area-inset-top, 0px))"} !important;
|
|
1442
1455
|
}
|
|
1443
1456
|
`:b`
|
|
1444
1457
|
position: fixed;
|
|
@@ -1453,9 +1466,14 @@ Error generating stack: `+a.message+`
|
|
|
1453
1466
|
@media screen and (max-width: ${Z.tablet}px) {
|
|
1454
1467
|
${e.$opened?b`
|
|
1455
1468
|
padding-top: 0 !important;
|
|
1456
|
-
|
|
1469
|
+
/* Safe area + browser chrome: keep close button visible on mobile */
|
|
1470
|
+
top: env(safe-area-inset-top, 0px) !important;
|
|
1457
1471
|
height: 100vh;
|
|
1458
|
-
|
|
1472
|
+
height: 100svh;
|
|
1473
|
+
`:b`
|
|
1474
|
+
/* Bar closed: ensure toggle visible below browser UI */
|
|
1475
|
+
top: env(safe-area-inset-top, 0px) !important;
|
|
1476
|
+
`}
|
|
1459
1477
|
}
|
|
1460
1478
|
`:b`
|
|
1461
1479
|
bottom: 0;
|