1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5588],{5588:(e,t,n)=>{n.r(t),n.d(t,{AdminPage:()=>nF,JudgeLoginState:()=>nL,default:()=>nR});var r,i,a,o,s,l,c,d,u,h,g,p,m,f=n(47091),x=n.n(f),b=n(77328),j=n.n(b),v=n(63857),w=n(60180),y=n.n(w),S=n(14232),C=n(76559),k=n(83469),O=n(69914),E=n(37876),P=(0,S.createContext)({user:null,loadingUser:!1}),A=function(e){var t=e.children,n=(0,S.useState)(null),r=n[0],i=n[1],a=(0,S.useState)(!0),o=a[0],s=a[1],l=(0,O.D)().firebase,c=l?(0,C.xI)(l):null;return(0,S.useEffect)(function(){if(l&&c){var e,t=(0,C.hg)(c,(e=(0,v.A)(y().mark(function e(t){return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!(t&&t.emailVerified)){e.next=8;break}return e.next=4,(0,k.u)(t);case 4:i(e.sent),e.next=9;break;case 8:i(null);case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(0),console.warn(e.t0);case 14:return e.prev=14,s(!1),e.finish(14);case 17:case"end":return e.stop()}},e,null,[[0,11,14,17]])})),function(t){return e.apply(this,arguments)}));return function(){return t()}}},[c,l]),(0,E.jsx)(P.Provider,{value:{user:r,loadingUser:o},children:t})},T=function(){return(0,S.useContext)(P)},D=n(43482),I=n(59586),W=(0,S.createContext)({themes:{},loadingTheme:!1});let N=function(e){var t=e.children,n=(0,O.D)().firebase,r=T().user,i=(0,S.useState)({}),a=i[0],o=i[1],s=(0,S.useState)(!0),l=s[0],c=s[1];return(0,S.useEffect)(function(){if(l&&n&&r){var e;(e=(0,v.A)(y().mark(function e(){var t,r;return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t=(0,I.aU)(n),r=(0,I.rJ)(t,D.Z.themes),(0,I.GG)(r).then(function(e){var t={};e.docs.forEach(function(e){t[e.id]=e.data()}),o(t),c(!1)});case 3:case"end":return e.stop()}},e)})),function(){return e.apply(this,arguments)})()}},[n,l,r]),(0,E.jsx)(W.Provider,{value:{themes:a,loadingTheme:l},children:t})};var B=n(42969),_=n(88992),U=n(7818),z=n(3110),H=n(11041),L=n(8614);n(31828);var F=n(35244),R=n(23405),M=n(58736),$=n(75561);function X(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var q=(r=(0,v.A)(y().mark(function e(){var t,n,r;return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,k.P)();case 2:if(t=e.sent,n=(0,C.xI)(t),r=new C.HF,!$.Cu){e.next=9;break}return e.next=8,(0,C.df)(n,r);case 8:case 11:return e.abrupt("return",e.sent);case 9:return e.next=11,(0,C.$2)(n,r);case 12:case"end":return e.stop()}},e)})),function(){return r.apply(this,arguments)}),G=(i=(0,v.A)(y().mark(function e(t){var n,r,i,a,o;return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.email,r=t.password,i="ja"===F.Ay.language,e.next=4,(0,k.P)();case 4:return a=e.sent,o=(0,C.xI)(a),e.next=8,(0,C.x9)(o,n,r).then(function(){var e=(0,v.A)(y().mark(function e(t){var n;return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return(n=t.user).emailVerified||(0,C.gA)(n).then(function(){alert((0,F.t)("auth.theEmailAddressHasNotBeenConfirmed"))}),e.next=4,(0,M.Sr)();case 4:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()).catch(function(e){alert(i&&R[e.code]||e.message)});case 8:return e.abrupt("return",e.sent);case 9:case"end":return e.stop()}},e)})),function(e){return i.apply(this,arguments)}),V=(a=(0,v.A)(y().mark(function e(t){var n,r,i,a,o,s;return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.oldEmail,r=t.password,i=t.newEmail,a="ja"===F.Ay.language,!(!n||!r||!i)){e.next=5;break}return alert((0,F.t)("auth.inputCorrectly")),e.abrupt("return");case 5:return e.next=7,(0,k.P)();case 7:return o=e.sent,s=(0,C.xI)(o),e.next=11,(0,C.x9)(s,n,r).then((0,v.A)(y().mark(function e(){return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:alert((0,F.t)("auth.iSentAnEmailFromThisServiceToConfirm")),er(i),K();case 3:case"end":return e.stop()}},e)}))).catch(function(e){alert(a&&R[e.code]||e.message)});case 11:return e.abrupt("return",e.sent);case 12:case"end":return e.stop()}},e)})),function(e){return a.apply(this,arguments)}),Y=(o=(0,v.A)(y().mark(function e(t){var n,r,i,a,o;return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.email,r=t.password,i="ja"===F.Ay.language,e.next=4,(0,k.P)();case 4:return a=e.sent,o=(0,C.xI)(a),e.next=8,(0,C.eJ)(o,n,r).then(function(e){var t=e.user;t.emailVerified||(0,C.gA)(t).then(function(){alert((0,F.t)("auth.iSentAnEmailFromThisServiceToConfirm"))}),K()}).catch(function(e){alert(i&&R[e.code]||e.message)});case 8:return e.abrupt("return",e.sent);case 9:case"end":return e.stop()}},e)})),function(e){return o.apply(this,arguments)}),K=(s=(0,v.A)(y().mark(function e(){var t,n;return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,k.P)();case 2:t=e.sent,n=(0,C.xI)(t),(0,C.CI)(n);case 5:case"end":return e.stop()}},e)})),function(){return s.apply(this,arguments)}),Z=(l=(0,v.A)(y().mark(function e(){var t,n,r,i,a,o,s,l,c;return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t="ja"===F.Ay.language,e.prev=1,e.next=4,(0,k.P)();case 4:if(n=e.sent,r=(0,C.xI)(n).currentUser,i=!1,r.providerData.forEach(function(e){"password"!==e.providerId&&(i=!0)}),i){e.next=14;break}return a=window.prompt((0,F.t)("auth.enterTheRegisteredPasswordToConfirmTheUser")),o=C.IX.credential(r.email,a),e.next=14,(0,C.kZ)(r,o);case 14:return s=(0,I.aU)(n),l=(0,I.H9)((0,I.rJ)(s,D.Z.users),r.uid),e.next=18,(0,I.mZ)(l,{isUnsubscribe:!0,unsubscribeAt:(0,I.O5)()});case 18:return e.next=20,(0,M.Dy)(function(e){var t,n=function(e){var t="u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e){if(e){if("string"==typeof e)return X(e,void 0);var t=({}).toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?X(e,void 0):void 0}}(e))){t&&(e=t);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==t.return||t.return()}finally{if(o)throw i}}}}(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;(0,M.x2)(r.id),(0,M.AW)(r.id),(0,M.ez)([r.id])}}catch(e){n.e(e)}finally{n.f()}});case 20:return e.next=22,(0,C.hG)(r).finally(function(){location.href="https://".concat($.Yi,"/unsub
1scribed")});case 22:e.next=28;break;case 24:e.prev=24,e.t0=e.catch(1),c=t&&R[e.t0.code]||e.t0.message,alert((0,F.t)("auth.verySorry")+c);case 28:case"end":return e.stop()}},e,null,[[1,24]])})),function(){return l.apply(this,arguments)}),J=(c=(0,v.A)(y().mark(function e(t){var n,r,i;return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n="ja"===F.Ay.language,e.next=3,(0,k.P)();case 3:return r=e.sent,i=(0,C.xI)(r),e.next=7,(0,C.J1)(i,t).then(function(){alert((0,F.t)("auth.weHaveSentAPasswordChangeEmailToTheEnteredAddress"))}).catch(function(e){alert(n&&R[e.code]||e.message)});case 7:return e.abrupt("return",e.sent);case 8:case"end":return e.stop()}},e)})),function(e){return c.apply(this,arguments)}),Q=(d=(0,v.A)(y().mark(function e(){var t,n,r;return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,k.P)();case 2:return t=e.sent,n=(0,C.xI)(t).currentUser,r=!1,n.providerData.map(function(e){"google.com"===e.providerId&&(r=!0)}),e.abrupt("return",r);case 8:case"end":return e.stop()}},e)})),function(){return d.apply(this,arguments)}),ee=(u=(0,v.A)(y().mark(function e(){var t,n,r;return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,k.P)();case 2:return t=e.sent,n=(0,C.xI)(t).currentUser,r=!1,n.providerData.map(function(e){"password"===e.providerId&&(r=!0)}),e.abrupt("return",r);case 8:case"end":return e.stop()}},e)})),function(){return u.apply(this,arguments)}),et=(h=(0,v.A)(y().mark(function e(){var t,n,r;return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,k.P)();case 2:t=e.sent,r=(n=(0,C.xI)(t)).currentUser,(0,C.J1)(n,r.email).catch(console.warn);case 6:case"end":return e.stop()}},e)})),function(){return h.apply(this,arguments)}),en=(g=(0,v.A)(y().mark(function e(){var t,n;return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,k.P)();case 2:t=e.sent,n=(0,C.xI)(t).currentUser,(0,C.y1)(n,"password").catch(console.warn);case 6:case"end":return e.stop()}},e)})),function(){return g.apply(this,arguments)}),er=(p=(0,v.A)(y().mark(function e(t){var n,r,i;return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n="ja"===F.Ay.language,e.next=3,(0,k.P)();case 3:r=e.sent,i=(0,C.xI)(r).currentUser,(0,C.Ww)(i,t).then(function(){(0,C.gA)(i).then(function(){alert((0,F.t)("auth.iSentAnEmailFromThisServiceToConfirmTheNewEmailAddress")),K()})}).catch(function(e){alert(n&&R[e.code]||e.message)});case 7:case"end":return e.stop()}},e)})),function(e){return p.apply(this,arguments)}),ei=n(39822),ea=n(20529),eo=n(30488),es=n(6709),el=n(72953),ec=n(7357);function ed(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}var eu=function(e){return(0,E.jsx)("img",{style:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ed(Object(n),!0).forEach(function(t){(0,B.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ed(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},e.style),alt:"Wraptas",src:"https://firebasestorage.googleapis.com/v0/b/notionstyles.appspot.com/o/users%2FYc1cvzjy9nQqoiJ7bxHXShfHQ3c2%2Fde8a259d-4d93-4126-bd86-5e2317a3fca7.png?alt=media&token=a0c819f9-3c51-498f-a1b4-1582960b0e8c"})};function eh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}var eg=function(e){return(0,E.jsx)(ei.a,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eh(Object(n),!0).forEach(function(t){(0,B.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eh(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({bg:"white",py:"8",px:{base:"4",md:"10"},shadow:"base",rounded:{sm:"lg"}},e))}
1,ep=n(59860),em=n(43123),ef=n(8091),ex=["children"];function eb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ej(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eb(Object(n),!0).forEach(function(t){(0,B.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eb(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var ev=function(e){var t=e.children,n=(0,ep.A)(e,ex);return(0,E.jsxs)(em.s,ej(ej({alignItems:"center",color:"gray.300"},n),{},{children:[(0,E.jsx)(ei.a,{flex:"1",children:(0,E.jsx)(ef.w,{borderColor:"currentColor"})}),(0,E.jsx)(eo.E,{as:"span",px:"3",color:"gray.600",fontWeight:"medium",children:t}),(0,E.jsx)(ei.a,{flex:"1",children:(0,E.jsx)(ef.w,{borderColor:"currentColor"})})]}))},ew=n(16388);function ey(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function eS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ey(Object(n),!0).forEach(function(t){(0,B.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ey(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var eC=function(e){var t=(0,U.B)().t;return(0,E.jsxs)(el.$,eS(eS({fontSize:"sm",fontWeight:"bold",size:"lg",color:"white",bg:"red.500",width:"full"},e),{},{children:[(0,E.jsx)(ew.DSS,{fontSize:"18px"}),t(e.isSignUp?"login.signUpWithGoogleAccount":"login.signInWithGoogleAccount")]}))},ek=n(27925),eO=["label","children","helperText","errorText","optionalText","required","invalid","id","className"];function eE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function eP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eE(Object(n),!0).forEach(function(t){(0,B.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eE(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var eA=S.forwardRef(function(e,t){var n=e.label,r=e.children,i=e.helperText,a=e.errorText,o=e.optionalText,s=e.required,l=e.invalid,c=e.id,d=e.className,u=(0,ep.A)(e,eO);return(0,E.jsxs)("div",eP(eP({ref:t,className:"tw-flex tw-flex-col tw-gap-2 ".concat(void 0===d?"":d)},u),{},{children:[n&&(0,E.jsxs)("label",{htmlFor:c,className:"tw-text-sm tw-font-medium tw-text-gray-700",children:[n,s&&(0,E.jsx)("span",{className:"tw-text-red-500 tw-ml-1",children:"*"}),!s&&o&&(0,E.jsx)("span",{className:"tw-text-gray-500 tw-ml-1 tw-text-xs",children:o})]}),(0,E.jsx)("div",{className:"tw-relative",children:r}),i&&!l&&(0,E.jsx)("div",{className:"tw-text-sm tw-text-gray-600",children:i}),a&&l&&(0,E.jsxs)("div",{className:"tw-text-sm tw-text-red-600 tw-flex tw-items-center tw-gap-1",children:[(0,E.jsx)("svg",{className:"tw-w-4 tw-h-4 tw-text-red-500",fill:"currentColor",viewBox:"0 0 20 20",children:(0,E.jsx)("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z",clipRule:"evenodd"})}),a]})]}))}),eT=["id","name","placeholder","required","autoComplete","invalid","errorText","className"];function eD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}var eI=S.forwardRef(function(e,t){var n=e.id,r=void 0===n?"password":n,i=e.name,a=e.placeholder,o=e.required,s=void 0===o||o,l=e.autoComplete,c=e.invalid,d=e.errorText,u=e.className,h=(0,ep.A)(e,eT),g=S.useState(!1),p=(0,ek.A)(g,2),m=p[0],f=p[1],x=S.useRef(null);S.useImperativeHandle(t,function(){return x.current});var b=[].concat(["tw-w-full","tw-px-3","tw-py-2","tw-pr-10","tw-border","t
1w-rounded-md","tw-shadow-sm","tw-text-sm","tw-transition-colors","tw-duration-200","focus:tw-outline-none","focus:tw-ring-2","focus:tw-ring-offset-0","disabled:tw-opacity-50","disabled:tw-cursor-not-allowed"],c?["tw-border-red-300","tw-text-red-900","tw-placeholder-red-300","focus:tw-ring-red-500","focus:tw-border-red-500"]:["tw-border-gray-300","tw-text-gray-900","tw-placeholder-gray-400","focus:tw-ring-blue-500","focus:tw-border-blue-500","hover:tw-border-gray-400"],[void 0===u?"":u]).join(" ");return(0,E.jsx)(eA,{label:"Password",id:r,invalid:c,errorText:d,required:s,children:(0,E.jsxs)("div",{className:"tw-relative",children:[(0,E.jsx)("input",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eD(Object(n),!0).forEach(function(t){(0,B.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eD(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({ref:x,id:r,name:void 0===i?"password":i,type:m?"text":"password",autoComplete:void 0===l?"current-password":l,required:s,placeholder:void 0===a?"*********":a,className:b},h)),(0,E.jsx)("button",{type:"button",className:"tw-absolute tw-inset-y-0 tw-right-0 tw-pr-3 tw-flex tw-items-center tw-text-gray-400 hover:tw-text-gray-600 tw-transition-colors tw-duration-200",onClick:function(){if(f(!m),x.current){x.current.focus();var e=x.current.value.length;setTimeout(function(){x.current&&x.current.setSelectionRange(e,e)},0)}},tabIndex:-1,"aria-label":m?"ãã¹ã¯ã¼ããé ã":"ãã¹ã¯ã¼ãã表示",children:m?(0,E.jsx)("svg",{className:"tw-w-5 tw-h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,E.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.878 9.878L3 3m6.878 6.878L21 21"})}):(0,E.jsxs)("svg",{className:"tw-w-5 tw-h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[(0,E.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),(0,E.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]})})]})})}),eW=["id","name","placeholder","required","autoComplete","invalid","errorText","className"];function eN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}var eB=S.forwardRef(function(e,t){var n=e.id,r=void 0===n?"email":n,i=e.name,a=e.placeholder,o=e.required,s=void 0===o||o,l=e.autoComplete,c=e.invalid,d=e.errorText,u=e.className,h=(0,ep.A)(e,eW),g=[].concat(["tw-w-full","tw-px-3","tw-py-2","tw-border","tw-rounded-md","tw-shadow-sm","tw-text-sm","tw-transition-colors","tw-duration-200","focus:tw-outline-none","focus:tw-ring-2","focus:tw-ring-offset-0","disabled:tw-opacity-50","disabled:tw-cursor-not-allowed"],c?["tw-border-red-300","tw-text-red-900","tw-placeholder-red-300","focus:tw-ring-red-500","focus:tw-border-red-500"]:["tw-border-gray-300","tw-text-gray-900","tw-placeholder-gray-400","focus:tw-ring-blue-500","focus:tw-border-blue-500","hover:tw-border-gray-400"],[void 0===u?"":u]).join(" ");return(0,E.jsx)(eA,{label:"Email address",id:r,invalid:c,errorText:d,required:s,children:(0,E.jsx)("input",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eN(Object(n),!0).forEach(function(t){(0,B.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eN(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({ref:t,id:r,name:void 0===i?"email":i,type:"email",autoComplete:void 0===l?"email":l,required:s,placeholder:void 0===a?"[email protected]":a,className:g},h))})}),e_=n(23487),eU=n(89099),ez=n(18930),eH=function(){var e,t,n=(0,U.B)().i18n,r=T(),i=r.user,a=r.loadingUser,o=(0,eU.useRouter)(),s=(0,e_.A)("lang",(null==(t=o.query.lang)?void 0:t.toString())==="en"?"en":"ja"),l=(0,ek.A)(s,2),c=l[0],d=l[1],u="ja"===n.language,h=(0,S.useCallback)((e=(0,v.A)(y().mark(function e(t){return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n.changeLanguage(t),d(t),!i){e.next=5;break}return e.next=5,(0,M.xC)(t);case 5:case"end":return e.stop()}},e)})),function(t){return e.apply(this,arguments)}),[n,d,i]);return(0,S.useEffect)(function(){i&&a?(0,M.Z0)().then(function(e){h(e||c)}):h(c)},[i,a,h,c]),(0,E.jsx)(E.Fragment,{children:(0,E.jsxs)(em.s,{m:"4",justify:"center",gap:"2",children:[(0,E.jsx)(el.$,{variant:"plain",fontWeight:"bold",color:u?ez.I.brand[400]:"gray",onClick:(0,v.A)(y().mark(function e(){return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h("ja");case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e)})),pointerEvents:u?"none":"auto",_hover:{textDecoration:"underline"},children:"æ¥æ¬èª"}),(0,E.jsx)(el.$,{variant:"plain",fontWeight:"bold",color:u?"gray":ez.I.brand[400],onClick:(0,v.A)(y().mark(function e(){return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h("en");case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e)})),pointerEvents:u?"auto":"none",_hover:{textDecoration:"underline"},children:"English"})]})})};function eL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function eF(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?eL(Object(n),!0).forEach(function(t){(0,B.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eL(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}z.Yv.add(L.FjH,H.y_8);var eR=function(){var e,t,n,r,i=(0,U.B)(),a=i.t,o="ja"===i.i18n.language,s=(0,S.useState)("SIGN_IN"),l=s[0],c=s[1],d=(0,_.mN)(),u=d.handleSubmit,h=d.register,g=d.formState.isSubmitting,p=(e=(0,v.A)(y().mark(function e(t){var n,r;return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.email,r=t.password,e.next=3,G({email:n,password:r});case 3:case"end":return e.stop()}},e)})),function(t){return e.apply(this,arguments)}),m=(t=(0,v.A)(y().mark(function e(t){var n,r;return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.email,r=t.password,e.next=3,Y({email:n,password:r});case 3:c("SIGN_IN");case 4:case"end":return e.stop()}},e)})),function(e){return t.apply(this,arguments)}),f=(n=(0,v.A)(y().mark(function e(t){var n;return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.email,e.prev=1,e.next=4,J(n);case 4:e.next=9;break;case 6:e.prev=6,e.t0=e.catch(1),alert(e.t0);case 9:case"end":return e.stop()}},e,null,[[1,6]])})),function(e){return n.apply(this,arguments)}),x=(r=(0,v.A)(y().mark(function e(t){var n,r,i;return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.email,r=t.password,i=t.oldEmail,e.prev=1,e.next=4,V({oldEmail:i,password:r,newEmail:n});case 4:e.next=9;break;case 6:e.prev=6,e.t0=e.catch(1),alert(e.t0);case 9:case"end":return e.stop()}},e,null,[[1,6]])})),function(e){return r.apply(this,arguments)});return(0,S.useEffect)(function(){var e,t;null!=(e=window)&&null!=(e=e.location)&&null!=(e=e.search)&&e.includes("signup")&&c("SIGN_UP"),null!=(t=window)&&null!=(t=t.location)&&null!=(t=t.search)&&t.includes("change-email")&&c("CHANGE_EMAIL")},[]),(0,E.jsxs)(ei.a,{bg:"gray.50",minH:"100vh",py:"12",px:{base:"4",lg:"8"},color:"black",children:[(0,E.jsxs)(ei.a,{maxW:"md",mx:"auto",children:[(0,E.jsx)(eu,{style:{maxWidth:"180px",margin:"auto",marginBottom:"10px"}}),"SIGN_IN"===l&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(ea.D,{textAlign:"center",fontSize:"4xl",fontWeight:"extrabold",mb:"4",lineHeight:"1.2",children:a("login.signInToDashboard")}),(0,E.jsxs)(eo.E,{mt:"4",mb:"8",maxW:"md",fontWeight:"medium",textAlign:"center",children:[(0,E.jsx)(eo.E,{as:"span",children:o?"ã¢ã«ã¦ã³ãããªãå ´å":"If you do not have an account, please register as a "}),(0,E.jsx)(eo.E,{as:"span",mx:"1",color:ez.I.brand[400],cursor:"pointer",onClick:function(){return c("SIGN_UP")},children:o?"æ°è¦ç»é²":"new registration"}),(0,E.jsx)(eo.E,{as:"span",children:o?"ããé¡ããã¾ãã":"."})]}),(0,E.jsxs)(eg,{children:[(0,E.jsx)(eC,{onClick:q}),(0,E.jsx)(ev,{mt:"6",mb:"6",children:a("login.orLogInWithYourEmailAddress")}),(0,E.jsx)("form",{onSubmit:u(p),children:(0,E.jsxs)(es.B,{gap:"6",width:"100%",children:[(0,E.jsx)(eB,eF({},h("email",{required:"This is required"}))),(0,E.jsx)(eI,eF({},h("password",{required:"This is required"}))),(0,E.jsx)(ei.a,{color:ez.I.brand[600],fontWeight:"semibold",fontSize:"sm",cursor:"pointer",_hover:{textDecoration:"underline"},onClick:function(){return c("PASSWORD")},children:a("login.didYouForgetYourPassword?")}),(0,E.jsx)(el.$,{type:"submit",bg:ez.I.brand[400],fontWeight:"bold",color:"white",fontSize:"md",disabled:g,children:a("login.signInWithEmailAddress")})]})})]})]}),"SIGN_UP"===l&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(ea.D,{textAlign:"center",size:"4xl",fontWeight:"extrabold",children:a("login.signUp")}),(0,E.jsxs)(eo.E,{as:"p",mt:"4",mb:"8",fontWeight:"medium",textAlign:"center",children:[o?"ç»é²æã«ã¯":"By registering, you agree to ",(0,E.jsx)(ec.N,{href:"https://wraptas.com/terms",color:ez.I.brand[400],target:"_blank",children:o?"å©ç¨è¦ç´":"the Terms of Use"}),o?"ã»":" and ",(0,E.jsx)(ec.N,{href:"https://wraptas.com/policy",color:ez.I.brand[400],target:"_blank",children:o?"ãã©ã¤ãã·ã¼ããªã·ã¼":"Privacy Policy"}),o?"ã«åæãããã®ã¨ãã¾ãã":"."]}),(0,E.jsxs)(eg,{children:[(0,E.jsx)(eC,{id:"sign-in_google",onClick:q,isSignUp:!0}
1),(0,E.jsx)(ev,{mt:"6",mb:"6",children:a("login.orSignUpWithEmailAddress")}),(0,E.jsx)("form",{onSubmit:u(m),children:(0,E.jsxs)(es.B,{gap:"6",width:"100%",children:[(0,E.jsx)(eB,eF({},h("email",{required:"This is required"}))),(0,E.jsx)(eI,eF({},h("password",{required:"This is required"}))),(0,E.jsx)(eo.E,{as:"p",fontWeight:"medium",children:a("login.aConfirmationEmailWillSend")}),(0,E.jsx)(el.$,{id:"sign-in_mail",type:"submit",bg:ez.I.brand[400],fontWeight:"bold",color:"white",fontSize:"md",disabled:g,children:a("login.signUpWithEmailAddress")})]})})]}),(0,E.jsx)(eo.E,{mt:"4",textAlign:"center",fontWeight:"medium",children:(0,E.jsx)(eo.E,{as:"span",mx:"1",color:ez.I.brand[400],cursor:"pointer",onClick:function(){return c("SIGN_IN")},children:a("login.signIn")})})]}),"PASSWORD"===l&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(ea.D,{textAlign:"center",size:"4xl",fontWeight:"extrabold",children:a("login.resetPassword")}),(0,E.jsx)(eo.E,{mt:"4",mb:"8",maxW:"md",fontWeight:"medium",textAlign:"center",children:a("login.ifYouHaveForgottenYourPasswordPleaseResetItHere")}),(0,E.jsx)(eg,{children:(0,E.jsx)("form",{onSubmit:u(f),children:(0,E.jsxs)(es.B,{gap:"6",width:"100%",children:[(0,E.jsx)(eB,eF({},h("email",{required:"This is required"}))),(0,E.jsx)(el.$,{type:"submit",bg:ez.I.brand[400],fontWeight:"bold",color:"white",fontSize:"md",disabled:g,children:a("login.passwordChangeEmailTransmission")})]})})}),(0,E.jsx)(eo.E,{mt:"8",textAlign:"center",color:ez.I.brand[400],cursor:"pointer",onClick:function(){return c("SIGN_IN")},children:a("login.signIn")})]}),"CHANGE_EMAIL"===l&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(ea.D,{textAlign:"center",size:"4xl",fontWeight:"extrabold",children:a("login.emailAddressReset")}),(0,E.jsx)(eo.E,{mt:"4",mb:"8",maxW:"md",fontWeight:"medium",textAlign:"center",children:a("login.ifYouWantToChangeYourAddressWithoutSignInPleaseResetHere")}),(0,E.jsx)(eg,{children:(0,E.jsx)("form",{onSubmit:u(x),children:(0,E.jsxs)(es.B,{gap:"6",width:"100%",children:[(0,E.jsx)(eo.E,{mt:"4",maxW:"md",fontWeight:"bold",textAlign:"center",children:a("login.emailAddressAndPasswordBeforeTheChange")}),(0,E.jsx)(eB,eF({},h("oldEmail",{required:"This is required"}))),(0,E.jsx)(eI,eF({},h("password",{required:"This is required"}))),(0,E.jsx)(eo.E,{mt:"4",maxW:"md",fontWeight:"bold",textAlign:"center",children:a("login.emailAddressAfterChange")}),(0,E.jsx)(eB,eF({},h("email",{required:"This is required"}))),(0,E.jsx)(el.$,{type:"submit",bg:ez.I.brand[400],fontWeight:"bold",color:"white",fontSize:"md",disabled:g,children:a("login.confirmationEmailTransmission")})]})})}),(0,E.jsx)(eo.E,{mt:"4",textAlign:"center",color:ez.I.brand[400],cursor:"pointer",onClick:function(){return c("SIGN_IN")},children:a("login.signIn")})]})]}),(0,E.jsx)(ei.a,{maxW:"md",mx:"auto",children:(0,E.jsx)(eH,{})})]})},eM=n(26144),e$=n(9675),eX=n.n(e$),eq=function(e){var t=(0,S.useRef)(null);return(0,S.useEffect)(function(){t.current=e},[e]),t.current};function eG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function eV(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eG(Object(n),!0).forEach(function(t){(0,B.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eG(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var eY=function(e){var t=(0,U.B)().t,n=e.children,r=e.isOpen,i=e.onClose,a=e.onSave,o=e.onSaveClose,s=e.isDisableSaveBtn,l=e.closeBtnText,c=void 0===l?t("modal.close"):l,d=e.saveBtnText,u=void 0===d?t("modal.save"):d,h=e.saveCloseBtnText,g=void 0===h?t("modal.save")+" & "+t("modal.close"):h,p=e.contentHeight,m=e.contentWidth,f=void 0===m?"90%":m,x=e.rootStyle,b=e.contentStyle,j=e.footerStyle,v=e.isWindowChangeConfirm,w=void 0!==v&&v,y=e.customButtons;(0,eM.A)({base:!0,lg:!1});var C=eq(r),k=(0,S.useRef)(null);return(k.current=null!=i?i:function(){},(0,S.useEffect)(function(){!C&&r&&(eX().bind("esc",function(){return k.current()}),w&&(window.onbeforeunload=function(){return t("modal.doYouLeaveThisPage")})),C&&!r&&(eX().unbind("esc"),w&&(window.onbeforeunload=null))},[t,w,C,r]),r)?(0,E.jsxs)("div",{style:eV({position:"fixed",top:0,left:0,backgroundColor:"rgba(0,0,0,0.2)",width:"100%",height:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",padding:"10px 0",margin:"0",zIndex:10},void 0===x?null:x),children:[(0,E.jsx)("div",{style:eV({position:"relative",backgroundColor:"#fff",height:void 0===p?"calc(100% - 75px)":p,maxWidth:"64rem",margin:"0 auto",borderRadius:"0.25rem 0.25rem 0 0",overflow:"auto",width:f,padding:"1rem 1rem 0"},void 0===b?null:b),onClick:function(e){e.stopPropagation()},children:n}),(0,E.jsx)("div",{style:eV({top:"calc((100vh - 75px))",left:0,boxSizing:"border-box",backgroundColor:"#fff",borderTop:"solid 1px #000000B3",borderRadius:"0 0 0.25rem 0.25rem",zIndex:5,maxWidth:"64rem",padding:"12px 12px 0",width:f},void 0===j?null:j),onClick:function(e){e.stopPropagation()},children:(0,E.jsxs)(em.s,{flexWrap:"nowrap",children:[i&&(0,E.jsx)(el.$,{mr:"4",mb:"4",fontWeight:"normal",color:"black",bg:"gray.200",_hover:{bg:"gray.300"},onClick:i,children:c}),a&&(0,E.jsx)(el.$,{mr:"4",mb:"4",fontWeight:"normal",bg:ez.I.brand[500],_hover:{bg:ez.I.brand[400]},color:"white",onClick:a,disabled:s,minWidth:"auto",children:u}),o&&(0,E.jsx)(el.$,{mr:"4",mb:"4",fontWeight:"normal",bg:ez.I.brand[500],_hover:{bg:ez.I.brand[400]},color:"white",onClick:o,disabled:s,minWidth:"auto",children:g}),y]})})]}):null},eK=function(e){var t,n=e.isOpen,r=e.onClickClose,i=e.onClickDelete,a=e.selectSiteId,o=(0,U.B)().t,s=(0,S.useState)(!1),l=s[0],c=s[1],d=(t=(0,v.A)(y().mark(function e(){return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!l){e.next=2;break}return e.abrupt("return");case 2:return c(!0),e.prev=3,e.next=6,(0,M.x2)(a);case 6:return e.next=8,(0,M.AW)(a);case 8:return e.next=10,(0,M.ez)([a]);case 10:alert(o("siteEditAlert.theSiteHasBeenDeleted")),i(),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(3),alert(o("siteEditAlert.siteDeletionFailedPleaseContactTheSupport"));case 17:return e.prev=17,c(!1),e.finish(17);case 20:case"end":return e.stop()}},e,null,[[3,14,17,20]])})),function(){return t.apply(this,arguments)});return""===a?null:(0,E.jsxs)(eY,{contentHeight:"150px",contentWidth:"50%",isOpen:n,isWindowChangeConfirm:!0,onSave:function(){return d()},saveBtnText:l?o("siteEdit.deleting"):o("siteDelete.delete&Return"),isDisableSaveBtn:l,onClose:function(){r()},children:[(0,E.jsx)(ea.D,{as:"h2",size:"md",mb:"4",children:o("siteDelete.siteDelete")}),(0,E.jsx)(ei.a,{mb:"6",children:(0,E.jsx)(eo.E,{children:o("siteDelete.ifYouDeleteASiteYouCannotReacquireItWithTheSameId")})})]})}
1,eZ=n(57944),eJ=function(){return(0,E.jsxs)(eo.E,{color:"red",children:['â»Notionã§ã®ã¡ãã¥ã¼å³ä¸ã®Shareãããªã³ã¯ãã³ãã¼ã§ããã"',$.rp,'" ã "https://workspace-id',$.tM,'" ããå§ã¾ãã·ã§ã¢ç¨URLãå
¥åãã¦ãã ããã']})},eQ=n(18847),e0=n.n(eQ)()(function(){return n.e(6258).then(n.bind(n,96258))},{ssr:!1,loadableGenerated:{webpack:function(){return[96258]}}}),e1=function(e){var t=e.mode,r=e.value,i=e.placeholder,a=e.onChange;return(0,S.useEffect)(function(){if(window)switch(window.ace=n(82224),n(29220),n(8292),t){case"css":n(18872),n(12377);break;case"html":n(20184),n(12377),n(76841)}},[t]),(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(e0,{style:{width:"100%",height:"400px",resize:"vertical"},mode:t,fontSize:15,onChange:a,onLoad:function(e){return document.addEventListener("mouseup",function(){return e.resize()})},value:r,theme:"monokai",placeholder:i,wrapEnabled:!0,highlightActiveLine:!0,enableSnippets:!0,enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,setOptions:{useWorker:!1},commands:[{name:"command+s",bindKey:{win:"Ctrl-s",mac:"Cmd-s"},exec:function(){}}]}),(0,E.jsx)(x(),{id:"1727696652",children:[".ace_editor{position:relative;}",'.ace_editor::after{content:"â";position:absolute;bottom:0;right:0;width:20px;height:20px;padding-bottom:4px;background:#ddd;color:#333;font-size:30px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;pointer-events:none;}']})]})},e2=n(26851),e4=n(38331),e5=n(84262),e3=function(e){var t="permalink,notionPageUrl,title,description,ogImage,isNoindex,canonical\n";Object.keys(e).sort().map(function(n){var r=e[n],i=r.notionPageUrl,a=r.title,o=r.description,s=r.ogImage,l=r.isNoIndex,c=r.canonicalUrl;t+="".concat(n,",").concat(void 0===i?"":i,",").concat(void 0===a?"":a,",").concat(void 0===o?"":o,",").concat(void 0===s?"":s,",").concat(void 0!==l&&l,",").concat(void 0===c?"":c,"\n")});var n=new Blob([new Uint8Array([239,187,191]),t],{type:"text/csv"}),r=(window.URL||window.webkitURL).createObjectURL(n),i=document.createElement("a");i.href=r,i.download="wraptasPermalinks.csv",i.click(),(window.URL||window.webkitURL).revokeObjectURL(r)},e6=n(31703),e8=n(92146),e9=n(41235),e7=n(44478),te={FROM_PATH_REQUIRED:"siteEdit.redirectValidationFromRequired",FROM_PATH_INVALID_FORMAT:"siteEdit.redirectValidationFromInvalid",TO_URL_REQUIRED:"siteEdit.redirectValidationToRequired",TO_URL_INVALID_FORMAT:"siteEdit.redirectValidationToInvalid",DUPLICATE_FROM_PATH:"siteEdit.redirectValidationDuplicate",SAME_FROM_TO:"siteEdit.redirectValidationSameFromTo"},tt=function(e){var t=e.redirects,n=e.onChange,r=(0,U.B)().t,i=(0,S.useState)(""),a=i[0],o=i[1],s=(0,S.useState)(""),l=s[0],c=s[1],d=(0,S.useState)(""),u=d[0],h=d[1],g=function(e){n(t.filter(function(t,n){return n!==e}))};return(0,E.jsx)(ei.a,{mt:"4",mb:"6",children:(0,E.jsxs)("details",{children:[(0,E.jsx)("summary",{style:{cursor:"pointer"},children:(0,E.jsx)(eo.E,{fontWeight:"bold",display:"inline",children:r("siteEdit.redirectSettings")})}),(0,E.jsxs)(ei.a,{mt:"4",children:[(0,E.jsx)(eo.E,{fontSize:"sm",color:"gray.500",mb:"4",children:r("siteEdit.redirectDescription")}),0===t.length?(0,E.jsx)(eo.E,{fontSize:"sm",color:"gray.400",mb:"4",children:r("siteEdit.noRedirectRules")}):(0,E.jsx)(ei.a,{mb:"4",borderWidth:"1px",borderColor:"gray.200",borderRadius:"md",overflow:"hidden",children:(0,E.jsxs)(e6.jq,{size:"sm",children:[(0,E.jsx)(e6.A0,{children:(0,E.jsxs)(e6.Hj,{bg:"gray.50",children:[(0,E.jsx)(e6.ug,{borderBottomWidth:"1px",borderColor:"gray.200",children:r("siteEdit.redirectFrom")}),(0,E.jsx)(e6.ug,{borderBottomWidth:"1px",borderColor:"gray.200",children:r("siteEdit.redirectTo")}),(0,E.jsx)(e6.ug,{borderBottomWidth:"1px",borderColor:"gray.200",width:"80px"})]})}),(0,E.jsx)(e6.BF,{children:t.map(function(e,t){return(0,E.jsxs)(e6.Hj,{children:[(0,E.jsx)(e6.nA,{wordBreak:"break-all",borderBottomWidth:"1px",borderColor:"gray.100",children:e.from}),(0,E.jsx)(e6.nA,{wordBreak:"break-all",borderBottomWidth:"1px",borderColor:"gray.100",children:e.to}),(0,E.jsx)(e6.nA,{borderBottomWidth:"1px",borderColor:"gray.100",children:(0,E.jsx)(el.$,{size:"xs",bg
1:"orange.200",_hover:{bg:"orange.300"},color:"black",fontWeight:"normal",onClick:function(){return g(t)},children:r("siteEdit.deleteRedirect")})})]},t)})})]})}),(0,E.jsxs)(e8.z,{gap:"2",alignItems:"flex-end",children:[(0,E.jsxs)(ei.a,{flex:"1",children:[(0,E.jsx)(eo.E,{fontSize:"xs",mb:"1",children:r("siteEdit.redirectFrom")}),(0,E.jsx)(e9.p,{size:"sm",placeholder:r("siteEdit.redirectFromPlaceholder"),value:a,onChange:function(e){return o(e.target.value)}})]}),(0,E.jsxs)(ei.a,{flex:"2",children:[(0,E.jsx)(eo.E,{fontSize:"xs",mb:"1",children:r("siteEdit.redirectTo")}),(0,E.jsx)(e9.p,{size:"sm",placeholder:r("siteEdit.redirectToPlaceholder"),value:l,onChange:function(e){return c(e.target.value)}})]}),(0,E.jsx)(el.$,{size:"sm",bg:ez.I.brand[500],_hover:{bg:ez.I.brand[400]},color:"white",fontWeight:"normal",onClick:function(){var e,i,s,d,u=function(e){var t=e.trim();if("/"===t)return"/";var n=t;return n.startsWith("/")||(n="/"+n),n.length>1&&n.endsWith("/")&&(n=n.slice(0,-1)),n}(a),g=(e=l.trim(),i=u.trim(),s=e.trim(),i?!i.startsWith("/")||i.includes("*")?"FROM_PATH_INVALID_FORMAT":s?s.startsWith("https://")||s.startsWith("http://")||s.startsWith("/")?t.some(function(e){return e.from===i})?"DUPLICATE_FROM_PATH":i===s?"SAME_FROM_TO":null:"TO_URL_INVALID_FORMAT":"TO_URL_REQUIRED":"FROM_PATH_REQUIRED");g?h(r(te[g])):(n((d=l.trim(),[].concat((0,e7.A)(t),[{from:u,to:d}]))),o(""),c(""),h(""))},children:r("siteEdit.addRedirect")})]}),u&&(0,E.jsx)(eo.E,{fontSize:"sm",color:"red.500",mt:"2",children:u})]})]})})},tn=["checked","children","id","onChange","name"];function tr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ti(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tr(Object(n),!0).forEach(function(t){(0,B.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var ta=S.forwardRef(function(e,t){var n=e.checked,r=e.children,i=e.id,a=e.onChange,o=e.name,s=(0,ep.A)(e,tn);return(0,E.jsxs)("div",ti(ti({ref:t},s),{},{style:{display:"flex",alignItems:"center"},children:[(0,E.jsx)("input",{type:"checkbox",ref:t,checked:n,id:i,onChange:a,name:o,style:{marginRight:"4px",width:"16px",height:"16px"}}),null!=r&&(0,E.jsx)("label",{htmlFor:i,children:r})]}))}),to=n(82851);function ts(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function tl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ts(Object(n),!0).forEach(function(t){(0,B.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ts(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var tc=n(51357),td="https://www.notion.so/nabettu/c852ff3442c44ce18bc9a6bee3b5e85a",tu=function(e){var t,n,r,i,a,o,s=e.isOpen,l=e.siteData,c=e.onClose,d=e.setEditSiteData,u=(0,U.B)(),h=u.t,g="ja"===u.i18n.language,p=!l,m=(0,S.useState)(null),f=m[0],x=m[1],b=(0,S.useState)(!1),j=b[0],w=b[1],C=(0,S.useState)(!1),k=C[0],O=C[1],P=(0,S.useState)(!1),A=P[0],T=P[1],D=(0,S.useState)(!1),I=D[0],W=D[1],N=(0,S.useState)(!1),_=N[0],z=N[1],H=(0,S.useState)(!1),L=H[0],F=H[1],R=(0,S.useState)(""),X=R[0],q=R[1],G=!!p&&(!_||!(null!=f&&f.id)||!(null!=f&&f.topPageUrl)),V=(t=(0,v.A)(y().mark(function e(){var t,n,r,i,a;return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(w(!0),e.prev=1,t=f.topPageUrl,n=f.id,(null==l?void 0:l.versions)===2){e.next=10;break}return e.next=6,e5.A.get("/api/checkAndSaveSpaceId?url=".concat(t,"&siteId=").concat(n));case 6:if(r=(i=e.sent).data,200===i.status){e.next=10;break}throw Error();case 10:if(!p){e.next=24;break}return e.prev=11,e.next=14,(0,M.Ae)(tl(tl({},f),{},{topPageSpaceId:r}));case 14:alert(h("siteEditAlert.theSiteHasBeenCreated")),Y(),e.next=22;break;case 18:e.prev=18,e.t0=e.catch(11),console.warn(e.t0),alert(h("siteEditAlert.registrationFailed"));case 22:case 39:e.next=45;break;case 24:if(e.prev=24,a=!1,2!==l.versions){e.next=31;break}return e.next=29,(0,M.hj)(f);case 29:e.next=34;break;case 31:return a=l.topPageUrl!==f.topPageUrl,e.next=34,(0,M.hj)(tl(tl({},f),{},{topPageSpaceId:r}));case 34:if(alert(h("siteEditAlert.saveIsCompleted")),Y(),!a){e.next=39;break}return e.next=39,(0,M.x2)(l.id);case 41:e.prev=41,e.t1=e.catch(24),console.warn(e.t1),alert(h("siteEditAlert.saveFailed"));case 45:e.next=50;break;case 47:e.prev=47,e.t2=e.catch(1),alert(h("siteEditAlert.theUrlSetOnTheTopPageMayBePrivate"));case 50:w(!1);case 51:case"end":return e.stop()}},e,null,[[1,47],[11,18],[24,41]])})),function(){return t.apply(this,arguments)}),Y=function(){O(!1),z(!1),W(!1),x(null),c()},K=function(e){var t=e.target,n=t.name,r=t.value;x(tl(tl({},f),{},(0,B.A)({},n,r))),O(!0)},Z=function(e,t){x(tl(tl({},f),{},(0,B.A)({},e,t.target.checked)))},J=(n=(0,v.A)(y().mark(function e(){return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=f&&f.id){e.next=2;break}return e.abrupt("return");case 2:return T(!0),W(!0),e.next=6,(0,M.OJ)(f.id);case 6:z(e.sent),T(!1);case 9:case"end":return e.stop()}},e)})),function(){return n.apply(this,arguments)}),Q=function(e){var t,n=e.target,r=n.value,i=n.name;if(""!==r){if(Object.keys(null!=(t=null==f?void 0:f.slugsWithMeta)?t:{}).some(function(e){return(null==f?void 0:f.slugsWithMeta[e].notionPageUrl)===r}))return void alert(h("siteEditAlert.theSamePageIsSetForPermalink"));(r.startsWith($.rp)||r.includes($.tM))&&32===(0,e4.$)(r).length?q(""):q(i)}};return(0,S.useEffect)(function(){s&&(O(!1),x(l))},[l,s]),(0,E.jsxs)(eY,{isOpen:s,isWindowChangeConfirm:!0,onClose:function(){k?confirm(p?h("siteEditAlert.theContentYouEnteredWillDisappearIsThatOk"):h("siteEditAlert.the
1EditedContentWillDisappearIsThatOk"))&&Y():Y()},onSave:V,isDisableSaveBtn:!!(G||X&&"footerPageUrl"!==X||j),saveBtnText:j?h("siteEdit.registering"):p?h("siteEdit.signUp"):h("siteEdit.save&Return"),children:[(0,E.jsx)(ea.D,{as:"h2",size:"md",mb:"4",children:p?h("siteEdit.siteRegistration"):h("siteEdit.siteDataEditing")}),p&&g&&(0,E.jsxs)(eo.E,{children:["ãµã¤ãç»é²å
¨ä½ã®æµãã¯",(0,E.jsx)(ec.N,{fontWeight:"bold",href:"https://wraptas.com/manual",color:"blue.600",children:"ãã¡ãã«ããã¥ã¢ã«"}),"ãç¨æãã¦ããã¾ãã®ã§ãNotionã®ãã¼ã¸URLã®å徿¹æ³ãªã©ã§å°ã£ãéã«ã¯ãå©ç¨ãã ããã"]}),(0,E.jsxs)(ei.a,{mb:"6",children:[(0,E.jsxs)(em.s,{mb:"2",gap:"2",alignItems:"center",children:[(0,E.jsx)(eo.E,{fontWeight:"bold",mb:"2",children:p?h("siteEdit.siteIdRequired"):h("siteEdit.siteId")}),(0,E.jsxs)(eo.E,{fontSize:"sm",children:["*",h("siteEdit.itCannotBeChangedLater")]})]}),(0,E.jsxs)(e8.z,{wrap:"wrap",children:[(0,E.jsxs)(em.s,{maxWidth:"max-content",gap:"2",alignItems:"center",children:[(0,E.jsx)(e9.p,{name:"id",placeholder:"myname",maxLength:32,value:(null==f?void 0:f.id)||"",readOnly:!p,onChange:function(e){K(e),z(!1),W(!1)}}),(0,E.jsxs)("span",{color:"gray",children:[".",$.UA]})]}),p&&(I?(0,E.jsx)(eo.E,{as:"span",children:A?null:_?h("siteEdit.ok")+"\uD83D\uDE46ââï¸":h("siteEdit.checkNg")+"\uD83D\uDE45ââï¸"}):(0,E.jsx)(el.$,{bg:ez.I.brand[500],fontWeight:"normal",color:"white",onClick:J,disabled:!(null!=f&&f.id)||f.id.length<3,children:A?h("siteEdit.checking"):h("siteEdit.checkIdAvailable")}))]})]}),(0,E.jsxs)(ei.a,{mb:"6",children:[(0,E.jsx)(eo.E,{fontWeight:"bold",mb:"2",children:h("siteEdit.siteName")}),(0,E.jsx)(e9.p,{name:"siteName",placeholder:h("siteEdit.portfolioOf"),value:(null==f?void 0:f.siteName)||"",onChange:K})]}),(0,E.jsxs)(ei.a,{mb:"6",children:[(0,E.jsx)(eo.E,{fontWeight:"bold",mb:"2",children:h("siteEdit.notionPageUrlToDisplayOnTheTopPage*Required")}),(0,E.jsxs)(eo.E,{fontSize:"sm",color:"gray.500",mb:"2",children:["â»",h("siteEdit.enterTheUrlThatCanBeCopiedFrom")]}),g&&(0,E.jsxs)(eo.E,{fontSize:"sm",color:"gray.500",mb:"2",lineHeight:"1.5",children:["Notionãã¼ã¸ãã¾ã æºåã§ãã¦ããªãæ¹ã¯ãã¡ãã®",(0,E.jsxs)(ec.N,{fontWeight:"bold",href:"https://wraptas.com/templates",color:"blue.600",children:["ãã³ãã¬ã¼ã",(0,E.jsx)(eZ.A,{className:"mx-2"})]}),"ããã³ãã¼ãã¦ä½ã£ã¦ã¿ã¾ãããããã¼ãã¯ä½æå¾ã«å¥éãã¶ã¤ã³ç·¨éããé©ç¨ãã¦ãã ããã"]}),(0,E.jsxs)(eA,{invalid:"topPageUrl"===X,children:[(0,E.jsx)(e9.p,{name:"topPageUrl",placeholder:td,value:null!=(r=null==f?void 0:f.topPageUrl)?r:"",onChange:K,onBlur:Q}),"topPageUrl"===X&&(0,E.jsx)(eJ,{})]})]}),(0,E.jsxs)(eo.E,{mb:"4",children:["â»",h("siteEdit.articlesWithDifferentWorkspaces")]}),!p&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(ei.a,{mt:"4",mb:"4",display:"flex",flexDirection:"column",gap:"4",children:[(0,E.jsx)(ta,{id:"addSiteNameAfterTitle",onChange:function(e){return Z("addSiteNameAfterTitle",e)},checked:null!=(i=null==f?void 0:f.addSiteNameAfterTitle)&&i,children:h("siteEdit.addSiteNameAfterTheTitleOfAllPageMetaInformation")}),(0,E.jsx)(ta,{id:"shouldDisplayOnlyChildrenPages",onChange:function(e){return Z("shouldDisplayOnlyChildrenPages",e)},checked:null==f?void 0:f.shouldDisplayOnlyChildrenPages,children:h("pageSetting.notDisplayNotChildrenPages")}),(0,E.jsx)(ta,{id:"twitterCardSummary",onChange:function(e){return Z("twitterCardSummary",e)},checked:null==f?void 0:f.twitterCardSummary,children:h("pageSetting.twitterCardSummary")})]}),(0,E.jsx)(ef.w,{borderColor:"gray.200"}),(0,E.jsxs)(ei.a,{mt:"4",mb:"4",children:[(0,E.jsx)(eo.E,{fontWeight:"bold",fontSize:"xl",mb:"2",children:h("siteEdit.footerSettings")}),(0,E.jsx)(eo.E,{mb:"2",children:h("siteEdit.theNotionPageUrlOfTheContentDisplayedOnTheFooter")}),(0,E.jsx)(eA,{invalid:(null==f?void 0:f.footerPageUrl)&&"footerPageUrl"===X,children:(0,E.jsx)(e9.p,{name:"footerPageUrl",placeholder:td,value:null!=(a=null==f?void 0:f.footerPageUrl)?a:"",onChange:K,onBlur:function(e){e.target.value===(null==f?void 0:f.topPageUrl)?alert(h("siteEditAlert.theSamePageIsSetOnTopPage")):Q(e)}})}),(null==f?void 0:f.footerPageUrl)&&"footerPageUrl"===X&&(0,E.jsx)(eJ,{})]}),(0,E.jsx)(ef.w,{borderColor:"gray.200"}),(0,E.jsxs)(ei.a,{mt:"4",mb:"4",children:[(0,E.jsx)(eo.E,{fontWeight:"bold",fontSize:"xl",mb:"2",children:h("siteEdit.errorPageHtml")}),(0,E.jsxs)(ei.a,{mb:"4",children:[(0,E.jsxs)(eo.E,{mb:"2",children:[h("siteEdit.theSettingsOfExistingSitesSuchAsCss"),"ï¼",h("siteEdit.surroundedInThisClass")," ",'<div class="notfound"></div>',"ï¼"]}),(0,E.jsx)(e2.i,{children:(0,E.jsx)(e1,{mode:"html",placeholder:"<p>".concat(h("siteEdit.couldn'TFindThePage"),"</p>"),onChange:function(e){return K({target:{name:"notFoundHtml",value:e}})},value:(null==f?void 0:f.notFoundHtml)||""})})]})]}),(0,E.jsx)(ef.w,{borderColor:"gray.200"}),(0,E.jsx)(ei.a,{mt:"4",children:(0,E.jsxs)("details",{children:[(0,E.jsx)("summary",{children:(0,E.jsx)(eo.E,{fontWeight:"bold",fontSize:"xl",mb:"2",display:"inline",children:h("siteEdit.advancedSettings")})}),(0,E.jsx)(ei.a,{mt:"4",mb:"4",children:(0,E.jsx)(ta,{id:"isNoIndex",onChange:function(e){return Z("isNoIndex",e)},checked:(null==f?void 0:f.isNoIndex)||!1,children:h("siteEdit.notToBeDisplayedOnSearchEnginesSuchAsGoogle")})}),(0,E.jsxs)(eo.E,{color:"orange.400",children:["â»",h("siteEdit.ifYouChangeFromOnToOff")]}),(0,E.jsx)(ei.a,{mt:"4",mb:"4",children:(0,E.jsx)(ta,{id:"rejectAI",onChange:function(e){return Z("rejectAI",e)},checked:(null==f?void 0:f.rejectAI)||!1,children:h("siteEdit.rejectAI")})}),(0,E.jsx)(ei.a,{mt:"4",mb:"4",children:(0,E.jsx)(ta,{id:"isNoPublishDate",onCh
1ange:function(e){return Z("isNoPublishDate",e)},checked:(null==f?void 0:f.isNoPublishDate)||!1,children:h("siteEdit.doesNotIncludeTheHtmlTagOnTheReleaseDateOnThePage")})}),(0,E.jsx)(ei.a,{mt:"4",mb:"4",children:(0,E.jsx)(ta,{id:"isNoEditDate",onChange:function(e){return Z("isNoEditDate",e)},checked:(null==f?void 0:f.isNoEditDate)||!1,children:h("siteEdit.doesNotIncludeTheHtmlTagOnTheEditingDateOnThePage")})}),(null==f?void 0:f.domain)&&(0,E.jsx)(ei.a,{mt:"4",mb:"4",children:(0,E.jsx)(ta,{id:"redirectOwnDomain",onChange:function(e){return Z("redirectOwnDomain",e)},checked:(null==f?void 0:f.redirectOwnDomain)||!1,children:h("siteEdit.redirectFromWraptasSiteToItsOwnDomain")})}),(0,E.jsxs)(ei.a,{mt:"4",mb:"6",children:[(0,E.jsx)(eo.E,{fontWeight:"bold",mb:"2",children:h("siteEdit.siteLanguage(InsertedIntoLangOfHtmlTag)")}),(0,E.jsx)("select",{value:(null==f?void 0:f.lang)||"ja",name:"lang",onChange:K,style:{maxWidth:"max-content",backgroundColor:"white",border:"1px solid gray",borderRadius:"4px",padding:8},children:tc.map(function(e){var t=(0,ek.A)(e,2),n=t[0],r=t[1];return(0,E.jsx)("option",{value:r,children:n},n+r)})})]}),(0,E.jsx)(ei.a,{mt:"4",mb:"6",children:(0,E.jsx)(ta,{id:"isNoFeedAndSitemap",onChange:function(e){return Z("isNoFeedAndSitemap",e)},checked:(null==f?void 0:f.isNoFeedAndSitemap)||!1,children:h("siteEdit.hideFeedAndSitemap")})}),!(null!=f&&f.isNoFeedAndSitemap)&&(0,E.jsxs)(ei.a,{mt:"4",mb:"6",children:[(0,E.jsx)(eo.E,{fontWeight:"bold",mb:"2",children:h("siteEdit.feedSetting")}),(0,E.jsxs)("select",{value:(null==f?void 0:f.pageLevelToIncludeInFeed)||"all",name:"pageLevelToIncludeInFeed",onChange:K,style:{maxWidth:"max-content",backgroundColor:"white",border:"1px solid gray",borderRadius:"4px",padding:8},children:[(0,E.jsx)("option",{value:"1",children:h("siteEdit.includingTheTopChildPage")}),(0,E.jsx)("option",{value:"2",children:h("siteEdit.includingUpToTheGrandsonPageOfTop")}),(0,E.jsx)("option",{value:"all",children:h("siteEdit.includeAllPages")})]})]}),(0,E.jsx)(tt,{redirects:Array.isArray(null==f?void 0:f.redirects)?f.redirects:null!=f&&f.redirects?Object.entries(f.redirects).map(function(e){var t=(0,ek.A)(e,2);return{from:t[0],to:t[1]}}):[],onChange:function(e){x(function(t){return tl(tl({},t),{},{redirects:e})}),O(!0)}}),(0,E.jsx)(ei.a,{mt:"4",mb:"6",children:(0,E.jsx)(el.$,{mb:"4",fontWeight:"normal",onClick:function(){e3(f.slugsWithMeta||{})},bg:"gray.200",_hover:{bg:"gray.300"},color:"black",children:h("siteEdit.permalinkListCsvDownload")})}),(0,E.jsxs)(ei.a,{mt:"4",mb:"6",children:[(0,E.jsx)(eo.E,{fontWeight:"bold",mb:"2",children:h("siteEdit.siteCacheDeletion")}),(0,E.jsx)(el.$,{mb:"4",fontWeight:"normal",onClick:function(){var e=null==l?void 0:l.id;if((0,to.isString)(e)){if(k)return void alert(h("siteEditAlert.pleaseExecuteWithoutEditing"));w(!0),(0,M.x2)(null==l?void 0:l.id).then(function(){alert(h("siteEdit.theSiteCacheHasBeenDeleted"))}).catch(function(){alert(h("siteEdit.deletedSiteCacheFailed"))}).finally(function(){w(!1),d(null),c()})}},bg:"gray.200",_hover:{bg:"gray.300"},color:"black",children:h("siteEdit.deleteSiteCache")})]}),(0,E.jsxs)(ei.a,{mt:"4",mb:"6",children:[(0,E.jsx)(eo.E,{fontWeight:"bold",mb:"2",children:h("siteEdit.siteDelete")}),(0,E.jsx)(el.$,{mb:"4",fontWeight:"normal",onClick:function(){F(!0)},bg:"orange.200",_hover:{bg:"orange.300"},color:"black",children:h("siteEdit.deleteThisSite")})]})]})})]}),(0,E.jsx)(eK,{isOpen:L,onClickClose:function(){F(!1)},onClickDelete:function(){F(!1),d(null),c()},selectSiteId:null!=(o=null==l?void 0:l.id)?o:""})]})},th=n(38005),tg=n(9463),tp=n(89915),tm=n(48161);function tf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function tx(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tf(Object(n),!0).forEach(function(t){(0,B.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tf(Object(n)).forEac
1h(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var tb=[{name:"Mobile",icon:(0,E.jsx)(ew.q5F,{}),width:"375px"},{name:"Tablet",icon:(0,E.jsx)(ew.sXb,{}),width:"820px"},{name:"Desktop",icon:(0,E.jsx)(ew.Wqt,{}),width:"100%"}],tj=function(e){var t,n=e.url,r=void 0===n?"":n,i=e.timeStamp,a=e.password,o=e.rootStyle,s=(0,S.useState)(i),l=s[0],c=s[1],d=(0,S.useState)("Desktop"),u=d[0],h=d[1],g=(0,eM.A)({base:!0,lg:!1}),p=null==(t=r.split(/\?/))?void 0:t[0];return(0,S.useEffect)(function(){c(i)},[i]),(0,E.jsx)(em.s,tx(tx({flex:"1",bg:"gray.100",maxHeight:"100vh",overflowX:"scroll",style:void 0===o?null:o},g?{}:{p:"8"}),{},{children:(0,E.jsxs)(em.s,{flex:"1",border:"1px solid black",direction:"column",rounded:"4",children:[(0,E.jsxs)(em.s,{justify:"space-between",align:"center",bg:"white",padding:1,borderBottom:"1px solid black",roundedTop:4,position:"relative",children:[(0,E.jsx)(tg.K,{size:"sm",variant:"ghost","aria-label":"Update preview",onClick:function(){return c(Date.now())},_hover:{bg:"gray.200"},children:(0,E.jsx)(tm.A,{color:"black"})}),(0,E.jsx)(ec.N,{href:r,position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",maxW:"calc(100% - ".concat(g?32:96,"px * 2 - 8px)"),color:"black",children:p}),!g&&(0,E.jsx)(tp.Y,{children:tb.map(function(e){var t=e.name,n=e.icon;return(0,E.jsx)(tg.K,{size:"sm",variant:"solid",color:"black",bg:u!==t?"gray.200":"blue.200","aria-label":"Change preview as "+t,onClick:function(){return h(t)},_hover:{bg:u!==t?"gray.300":"blue.300"},children:n},t)})})]}),(0,E.jsx)(em.s,{flex:1,justify:"center",children:(0,E.jsx)("iframe",{style:{borderRadius:4},src:"".concat(r).concat(r.includes("?")?"&":"?","updated=").concat(l,"&pass=").concat(a),height:"100%",width:tb.find(function(e){return e.name==u}).width})})]})}))},tv="SITE_DATA",tw="SITE_DESIGN",ty="CREATE_SITE",tS="SUBMIT_DOMAIN",tC="DELETE_DOMAIN",tk="SUBMIT_REDIRECT_DOMAIN",tO="SELECT_DELETE_SITE",tE="PAGE_SETTING",tP="SITE_PASSWORD",tA={"&::-webkit-scrollbar":{width:"2px"},"&::-webkit-scrollbar-thumb":{backgroundColor:"#ccc",borderRadius:"8px"}},tT=n(11923),tD=function(e){var t=e.size,n=e.onClick,r=e.style;return(0,E.jsx)("button",{onClick:n,style:Object.assign(r,{display:"flex",width:t,height:t,borderRadius:t/2,padding:0,alignItems:"center",justifyContent:"center",backgroundColor:"var(--chakra-colors-gray-100)"}),children:(0,E.jsx)("span",{style:{fontSize:.8*t},children:"\xd7"})})},tI=n(22128),tW=n(78220),tN=$.vK.storageBucket,tB=function(e){if(!e.includes("?"))throw Error("not firebase storage URL");var t=e.split(tN+"/o/"),n=(0,ek.A)(t,2),r=decodeURIComponent((n[0],n[1]).split("?")[0]);return"https://storage.googleapis.com/".concat(tN,"/").concat(r)},t_=(m=(0,v.A)(y().mark(function e(t,n){var r,i;return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,k.P)();case 2:return r=e.sent,i=(0,C.xI)(r),e.abrupt("return",new Promise(function(e,r){var a=i.currentUser;if(!a)return r("ãã°ã¤ã³ãå¿
è¦ã§ãã");var o=a.uid,s=t.name.split(/(?=\.[^.]+$)/)[1],l=(0,tW.A)()+s,c=(0,tI.KR)((0,tI.c7)(),"users/".concat(o,"/").concat(l));(n.match(/image/g)||r("ç»å以å¤ã®ãã¡ã¤ã«ã§ã"),"image"===n)?(0,tI.D)(c,t).then((0,v.A)(y().mark(function t(){return y().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,tI.qk)(c);case 2:e(tB(t.sent));case 5:case"end":return t.stop()}},t)}))).catch(function(e){return r(String(JSON.stringify(e)))}):r("ç»åãã¡ã¤ã«ãæå®ãã¦ãã ãã")}));case 5:case"end":return e.stop()}},e)})),function(e,t){return m.apply(this,arguments)}),tU=n(9485),tz=n(98991);function tH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function tL(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tH(Object(n),!0).forEach(function(t){(0,B.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tH(Object(n)).forEac
1h(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var tF=function(e){var t,n,r,i=e.isOpen,a=e.editingSlug,o=e.slugPageType,s=e.slugData,l=e.siteData,c=e.onSave,d=e.onClose,u=e.onDelete,h=(0,U.B)(),g=h.t,p="ja"===h.i18n.language,m=(0,S.useState)(!1),f=m[0],x=m[1],b=(0,S.useState)({notionPageUrl:""}),j=b[0],w=b[1],O=a===ez.v,P=function(e){var t=e.target,n=t.name,r=t.value;w(tL(tL({},j),{},(0,B.A)({},n,r)))},A=function(e,t){w(tL(tL({},j),{},(0,B.A)({},e,t.target.checked)))},T=(t=(0,v.A)(y().mark(function e(t){var n,r,i;return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(!t||!t.target||!t.target.files)){e.next=2;break}return e.abrupt("return");case 2:if(r=(n=t.target.files[0]).type.split("/")[0],x(!0),!n){e.next=16;break}return e.prev=6,e.next=9,t_(n,r);case 9:i=e.sent,w(tL(tL({},j),{},{ogImage:i})),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(6),alert(e.t0);case 16:x(!1);case 17:case"end":return e.stop()}},e,null,[[6,13]])})),function(e){return t.apply(this,arguments)}),D=function(e){w(tL(tL({},j),{},(0,B.A)({},e,null)))};if((0,S.useEffect)(function(){w(tL({},s))},[s,i]),""===o)return null;if(O&&"slugUserPermanentLinkPage"!==o)throw Error("SlugEditModal isTopPage slugPageType: ".concat(o));var I=O?g("pageSetting.topPage"):a,W=(n=(0,v.A)(y().mark(function e(){var t,n,r,i;return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!f){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.next=5,(0,k.P)();case 5:return n=e.sent,r=(0,C.xI)(n),e.next=9,null==(t=r.currentUser)?void 0:t.getIdToken();case 9:return i=e.sent,x(!0),e.next=13,fetch("/api/clear-cache",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(i)},body:JSON.stringify({path:"/".concat("$top"==a?"":a),siteId:l.id})});case 13:if(e.sent.ok){e.next=16;break}throw Error("Failed to clear cache");case 16:alert(g("pageSetting.cacheCleared")),e.next=22;break;case 19:e.prev=19,e.t0=e.catch(2),alert(g("pageSetting.cacheClearFailed"));case 22:x(!1);case 23:case"end":return e.stop()}},e,null,[[2,19]])})),function(){return n.apply(this,arguments)}),N=function(e){return(0,E.jsx)(el.$,{mr:"4",mb:"4",ml:"auto",fontWeight:"normal",bg:"orange.200",_hover:{bg:"orange.300"},color:"black",onClick:u,minWidth:"auto",children:e})};if("slugUserPermanentLinkPage"===o)r=O?null:l.slugsWithMeta[a]?N(g("pageSetting.deletePageData")):null;else if("slugSiteContentPage"===o)r=l.slugsWithMeta[a]?N(g("pageSetting.deletePageData")):null;else if("onlySiteContentPage"===o)r=N(g("pageSetting.deletePageCache"));else throw Error("SlugEditModal slugPageType:".concat(o));return console.log(j.isNoIndex),(0,E.jsxs)(eY,{isOpen:i,onClose:d,onSave:function(){c(j)},customButtons:r,children:[(0,E.jsxs)(ea.D,{as:"h2",size:"md",mb:"4",children:["".concat(g("slugEdit.individualPageSetting"),": "),I]}),(0,E.jsxs)(ei.a,{children:[O?null:"slugUserPermanentLinkPage"===o?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(eo.E,{mb:"2",children:g("slugEdit.notionPageUrl")}),(0,E.jsx)(e9.p,{name:"notionPageUrl",value:(null==j?void 0:j.notionPageUrl)||"",onChange:P})]}):(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(eo.E,{mb:"2",children:g("slugEdit.notionPageUrl")}),(0,E.jsx)(e9.p,{name:"notionPageUrl",value:"".concat($.rp).concat(a),disabled:!0})]}),(0,E.jsx)(eo.E,{mt:"4",mb:"2",children:O?g("siteEdit.topPageTitle"):g("slugEdit.pageTitle")}),(0,E.jsx)(tU.T,{width:"100%",name:"title",value:(null==j?void 0:j.title)||"",onChange:P}),(0,E.jsx)(eo.E,{mt:"4",mb:"2",children:O?g("siteEdit.topPageExplanation"):g("slugEdit.pageDescription")}),(0,E.jsx)(tU.T,{width:"100%",height:"6em",name:"description",value:(null==j?void 0:j.description)||"",onChange:P}),!O&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(eo.E,{mt:"4",mb:"2",children:g("slugEdit.canonicalUrl")}),(0,E.jsx)(e9.p,{name:"canonicalUrl",value:(null==j?void 0:j.canonicalUrl)||"",onChange:P})]}),(0,E.jsxs)(ei.a,{mt:"6",mb:"6",children:[(0,E.jsxs)(ei.a,{children:[(0,E.jsx)(eo.E,{mt:"2",mb:"4",children:O?g("siteEdit.snsShareImage(RecommendedSize600Px*315Px)")+" "+g("siteEdit.ifThereIsNoCoverImageOnEachPageThisImageWillBeSet"):g("slugEdit.snsShareImageUpload")}),(0,E.jsxs)(ei.a,{position:"relative",display:"inline-block",children:[(0,E.jsx)(tz._,{width:"200px",src:(null==j?void 0:j.ogImage)||"/placeholder.png",alt:"og image"}),(null==j?void 0:j.ogImage)&&(0,E.jsx)(tD,{size:24,style:{position:"absolute",top:"-12px",right:"-12px"},onClick:function(){return D("ogImage")}})]})]}),f?(0,E.jsx)(tT.A,{}):(0,E.jsxs)(el.$,{as:"label",fontWeight:"normal",cursor:"pointer",color:"black",bg:"gray.300",_hover:{bg:"gray.200"},children:[(0,E.jsx)(eo.E,{as:"span",children:g("slugEdit.fileSelection")}),(0,E.jsx)(e9.p,{display:"none",type:"file",accept:"image/*",name:"ogImage",onCh
1ange:T})]})]}),(0,E.jsx)(ei.a,{mt:"4",mb:"4",children:!O&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(ta,{id:"meta_isNoIndex",onChange:function(e){return A("isNoIndex",e)},checked:(null==j?void 0:j.isNoIndex)||!1,children:g("slugEdit.notToBeDisplayedOnSearchEnginesSuchAsGoogle")}),(0,E.jsx)(eo.E,{color:"orange.400",children:g("slugEdit.ifYouChangeFromOnToOffPleaseRegister")})]})}),(0,E.jsx)(ef.w,{}),(0,E.jsxs)(ei.a,{mt:"4",mb:"4",children:[(0,E.jsx)(ea.D,{as:"h3",size:"md",mt:"4",mb:"4",children:g("designEdit.pageAdditionalCss")}),(0,E.jsx)(eo.E,{color:"orange.400",mb:"2",fontSize:"sm",children:g("designEdit.pageAdditionalCssNote")}),(0,E.jsxs)(ei.a,{children:[(0,E.jsxs)(eo.E,{mb:"2",children:[g("designEdit.editDirectlyAndApply"),"(",(0,E.jsx)(ec.N,{color:"blue.400",href:"https://wraptas.com/css_sample",target:"_blank",rel:"noreferrer",children:g("designEdit.hereIsTheCssSampleCollectionThatCanBeUsedInCopyAndPaste")}),")"]}),(0,E.jsx)(e2.i,{children:(0,E.jsx)(e1,{mode:"css",placeholder:"a { font-size: 1.3em }",onChange:function(e){return P({target:{name:"cssWriting",value:e}})},value:(null==j?void 0:j.cssWriting)||""})})]})]}),(0,E.jsx)(ef.w,{}),(0,E.jsxs)(ei.a,{mb:"4",children:[(0,E.jsx)(ea.D,{as:"h3",size:"md",mt:"4",mb:"4",children:g("designEdit.htmlDirectPostscript(HeadTag)")}),(0,E.jsxs)(ei.a,{children:[(0,E.jsx)(eo.E,{mb:"2",children:g("designEdit.writeHtmlDirectlyAtTheBeginningOfHead")}),(0,E.jsx)(e2.i,{children:(0,E.jsx)(e1,{mode:"html",placeholder:'<script src="https://www.googletagmanager.com/gtag/js?id=UA-XXXXXXXXXXX-1" async><\/script>',onChange:function(e){return P({target:{name:"injectHtml",value:e}})},value:(null==j?void 0:j.injectHtml)||""})})]}),(0,E.jsx)(ea.D,{as:"h3",size:"md",mt:"4",mb:"4",children:g("designEdit.htmlDirectPostscript(BodyTag)")}),(0,E.jsxs)(ei.a,{children:[(0,E.jsxs)(eo.E,{mb:"2",children:[g("designEdit.writeHtmlDirectlyAtTheEndOfTheBody"),"ï¼",'<div class="injectHtml injectHtml_body"></div>',"ï¼"]}),(0,E.jsx)(e2.i,{children:(0,E.jsx)(e1,{mode:"html",placeholder:p?'\x3c!-- ããããHubSpotåãè¾¼ã¿ã³ã¼ã --\x3e<script type="text/javascript" id="hs-script-loader" async defer src="//js.hs-scripts.com/{hubId}.js"><\/script>\x3c!-- ããã¾ã§HubSpotåãè¾¼ã¿ã³ã¼ã --\x3e':'<script type="text/javascript" id="hs-script-loader" async defer src="//js.hs-scripts.com/{hubId}.js"><\/script>',onChange:function(e){return P({target:{name:"injectHtml__body",value:e}})},value:(null==j?void 0:j.injectHtml__body)||""})})]})]}),(0,E.jsxs)(ei.a,{children:[(0,E.jsx)(ea.D,{as:"h3",size:"md",mt:"4",mb:"4",children:g("pageSetting.serverCacheClear")}),(0,E.jsx)(eo.E,{children:g("pageSetting.serverCacheClearDescription")}),(0,E.jsx)(el.$,{mt:"4",mb:"4",fontWeight:"normal",bg:"orange.200",_hover:{bg:"orange.300"},color:"black",onClick:W,minWidth:"auto",children:f?(0,E.jsx)(tT.A,{size:16,color:"white"}):g("pageSetting.clearCache")})]})]})]})},tR=n(8684),tM=n(32485),t$=function(e){var t=e.isOpen,n=e.onSave,r=e.onClose,i=(0,U.B)().t,a=(0,S.useState)(""),o=a[0],s=a[1],l=(0,S.useState)("notion"),c=l[0],d=l[1],u=(0,S.useState)(""),h=u[0],g=u[1],p=(0,S.useState)(""),m=p[0],f=p[1],x=(0,S.useState)("text/plain"),b=x[0],j=x[1];return(0,S.useEffect)(function(){t&&(s(""),g(""),d("notion"),f(""),j("text/plain"))},[t]),(0,E.jsxs)(eY,{isOpen:t,onClose:r,onSave:function(){n({slug:o,notionPageUrl:h,pageType:c,pageContent:m})},contentHeight:"500px",isDisableSaveBtn:""===o||"notion"==c&&""===h||"text"==c&&""===m,children:[(0,E.jsxs)(ei.a,{display:"flex",flexDirection:{base:"column",md:"row"},alignContent:"center",children:[(0,E.jsx)(ea.D,{as:"h2",size:"md",mb:"4",children:i("pageSetting.addedPermalink")}),(0,E.jsx)(tM.h,{}),(0,E.jsxs)("select",{style:{width:"180px",padding:"10px",backgroundColor:"white",border:"1px solid #ccc",borderRadius:"4px",marginBottom:"6px"},onChange:function(e){d(e.target.value)},children:[(0,E.jsx)("option",{value:"notion",children:"Notionãã¼ã¸"}),(0,E.jsx)("option",{value:"text",children:"ãã¬ã¼ã³ããã¹ã"})]})]}),(0,E.jsxs)(ei.a,{mb:"6",children:[(0,E.jsx)(eo.E,{fontWeight:"bold",mb:"2",children:i("siteEdit.permalinkSlugMaxLengthCharacters",{SLUG_MAX_LENGTH:99})}),(0,E.jsxs)(em.s,{alignItems:"center",children:[(0,E.jsx)(eo.E,{children:"/"}),(0,E.jsx)(e9.p,{placeholder:"about",maxLength:99,value:o,onChange:function(e){return s(e.target.value)}})]})]}),"notion"===c&&(0,E.jsxs)(ei.a,{mb:"6",children:[(0,E.jsx)(eo.E,{fontWeight:"bold",mb:"2",children:"Notion URL"}),(0,E.jsx)(e9.p,{placeholder:"https://www.notion.so/nabettu/c852ff3442c44ce18bc9a6bee3b5e85a",value:h,onChange:function(e){return g(e.target.value)},minWidth:200})]}),"text"===c&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(ei.a,{mb:"6",children:[(0,E.jsx)(eo.E,{fontWeight:"bold",mb:"2",children:"表示ã³ã³ãã³ã"}),(0,E.jsx)(tU.T,{placeholder:"google.com, pub-XXXXXXXXX, DIRECT, XXXXXXX",value:m,onChange:function(e){return f(e.target.value)},minWidth:200})]}),(0,E.jsxs)(ei.a,{mb:"6",children:[(0,E.jsx)(eo.E,{fontWeight:"bold",mb:"2",children:"Content-Type"}),(0,E.jsx)("select",{value:b,onChange:function(e){return j(e.target.value)},style:{width:"100%",padding:"10px",backgroundColor:"white",border:"1px solid #ccc",borderRadius:"4px"},children:$._u.map(function(e){return(0,E.jsx)("option",{value:e,children:e},e)})})]})]})]})},tX=n(58363),tq=function(e){var t=e.isOpen,n=e.initSlug,r=e.notionUrl,i=e.slugPageType,a=e.onSave,o=e.onClose,s=(0,U.B)().t,l=(0,S.useState)(n),c=l[0],d=l[1],u=(0,S.useState)(r),h=u[0],g=u[1];return(0,S.useEffect)(function(){t&&(d(n),g(r))},[t]),(0,E.jsxs)(eY,{isOpen:t,onClose:o,onSave:function(){a(i,c,h)},contentHeight:"300px",isDisableSaveBtn:""===c,children:[(0,E.jsx)(ea.D,{as:"h2",size:"md",mb:"4",children:s("pageSetting.permalinkSettings")}),(0,E.jsxs)(ei.a,{mb:"6",children:[(0,E.jsx)(eo.E,{fontWeight:"bold",mb:"2",children:s("siteEdit.permalinkSlugMaxLengthCharacters",{SLUG_MAX_LENGTH:99})}),(0,E.jsxs)(em.s,{alignItems:"center",children:[(0,E.jsx)(eo.E,{children:"/"}),(0,E.jsx)(e9.p,{placeholder:"about",maxLength:99,value:c,onChange:function(e){return d(e.target.value)}})]})]}),(0,E.jsxs)(ei.a,{mb:"6",children:[(0,E.jsx)(eo.E,{fontWeight:"bold",mb:"2",children:"Notion URL"}),(0,E.jsx)(e9.p,{placeholder:"https://www.notion.so/nabettu/c852ff3442c44ce18bc9a6bee3b5e85a",value:h,onChange:function(e){return g(e.target.value)},minWidth:200,disabled:!0,style:{opacity:"unset"}})]})]})},tG=function(e){var t=e.isOpen,n=e.onSave,r=e.onClose,i=e.onDelete,a=e.slug,o=e.textPageContent,s=e.textPageContentType,l=(0,U.B)().t,c=(0,S.useState)(""),d=c[0],u=c[1],h=(0,S.useState)("text/plain"),g=h[0],p=h[1];return(0,S.useEffect)(function(){t&&(u(o),p(s))},[t,o,s]),(0,E.jsxs)(eY,{isOpen:t,onClose:r,onSave:function(){n({textPageContent:d,textPageContentType:g})},customButtons:(0,E.jsx)(el.$,{mr:"4",mb:"4",ml:"auto",fontWeight:"normal",colorScheme:"orange",onClick:i,minWidth:"auto",children:"åé¤"}),contentHeight:"500px",children:[(0,E.jsx)(ea.D,{as:"h2",size:"md",mb:"4",children:l("pageSetting.permalink")}),(0,E.jsx)(ei.a,{mb:"6",children:(0,E.jsxs)(eo.E,{children:["/",a]})}),(0,E.jsxs)(ei.a,{mb:"6",children:[(0,E.jsx)(eo.E,{fontWeight:"bold",mb:"2",children:"表示ã³ã³ãã³ã"}),(0,E.jsx)(tU.T,{placeholder:"google.com, pub-XXXXXXXXX, DIRECT, XXXXXXX",value:d,onChange:function(e){return u(e.target.value)},minWidth:200})]}),(0,E.jsxs)(ei.a,{mb:"6",children:[(0,E.jsx)(eo.E,{fontWeight:"bold",mb:"2",children:"Content-Type"}),(0,E.jsx)("select",{style:{width:"100%",padding:"10px",backgroundColor:"white",border:"1px solid #ccc",borderRadius:"4px"},value:g,onChange:function(e){return p(e.target.value)},children:$._u.map(function(e){return(0,E.jsx)("option",{value:e,children:e},e)})})]})]})};function tV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function tY(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?tV(Object(n),!0).forEach(function(t){(0,B.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tV(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var tK=function(e){var t,n,r,i,a,o,s,l,c,d,u,h,g=e.isOpen,p=e.siteData,m=e.onClose,f=e.sitePassword,x=(0,U.B)().t,b=(0,O.D)().firebase,j=(0,eM.A)({base:!0,lg:!1}),w=eq(g),C=(0,S.useState)(!1),k=C[0],P=C[1],A=(0,S.useState)(null),T=A[0],W=A[1],N=(0,th.A)(T,200),_=(0,ek.A)(N,1)[0],z=(0,S.useState)(0),H=z[0],L=z[1],F=(0,S.useRef)(null),R=(0,S.useState)(""),X=R[0],q=R[1],G=(0,S.useState)(""),V=G[0],Y=G[1],K=(0,S.useState)(ez.v),Z=K[0],J=K[1],Q=(0,S.useState)({isOpen:!1,editingSlug:"",slugPageType:""}),ee=Q[0],et=Q[1],en=(0,S.useState)({isOpen:!1}),er=en[0],ec=en[1],ed=(0,S.useState)({isOpen:!1,slug:"",textPageContent:""}),eh=ed[0],eg=ed[1],ep=(0,S.useState)({isOpen:!1,initSlug:"",notionUrl:"",slugPageType:void 0}),ef=ep[0],ex=ep[1],eb=(0,S.useState)(null==T||null==(d=T.updatedAt)?void 0:d.toDate().getTime()),ej=eb[0],ev=eb[1],ey=(0,S.useState)([]),eS=ey[0],eC=ey[1],eO=(0,S.useState)(null),eE=eO[0],eP=eO[1],eA=(0,S.useCallback)((0,v.A)(y().mark(function e(){return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:q($.Cu?"http://localhost:3000?siteid=".concat(null==p?void 0:p.id,"&realtimePreview=").concat(F.current):null!=p&&p.domain?"https://".concat(null==p?void 0:p.domain,"/?realtimePreview=").concat(F.current):"https://".concat(null==p?void 0:p.id,".").concat($.UA,"/?realtimePreview=").concat(F.current)),ev(Date.now()),Y(ez.v),J(ez.v);case 5:case"end":return e.stop()}},e)})),[null==p?void 0:p.domain,null==p?void 0:p.id]),eT=(0,S.useCallback)((t=(0,v.A)(y().mark(function e(t){return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:q($.Cu?"http://localhost:3000/".concat(t,"?siteid=").concat(null==p?void 0:p.id,"&realtimePreview=").concat(F.current):null!=p&&p.domain?"https://".concat(null==p?void 0:p.domain,"/").concat(t,"/?realtimePreview=").concat(F.current):"https://".concat(null==p?void 0:p.id,".").concat($.UA,"/").concat(t,"/?realtimePreview=").concat(F.current)),ev(Date.now()),Y(t),J(t);case 5:case"end":return e.stop()}},e)})),function(e){return t.apply(this,arguments)}),[null==p?void 0:p.domain,null==p?void 0:p.id]),eD=(0,S.useCallback)((n=(0,v.A)(y().mark(function e(t){return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t!==ez.v){e.next=4;break}return e.abrupt("return",eA());case 4:return e.abrupt("return",eT(t));case 5:case"end":return e.stop()}},e)})),function(e){return n.apply(this,arguments)}),[eT,eA]),eI=(0,S.useCallback)(function(e){if(b){var t=(0,I.aU)(b),n=(0,I.H9)((0,I.rJ)(t,"".concat(D.Z.sites,"/").concat(p.id,"/").concat(D.Z.siteRealtimePreview)),F.current);(0,I.mZ)(n,e),eD(V)}},[eD,b,V,null==p?void 0:p.id]),eW=(0,S.useCallback)(function(){if((null==F||!F.current)&&b&&p){var e,t=(0,I.aU)(b),n=(0,I.rJ)(t,"".concat(D.Z.sites,"/").concat(p.id,"/").concat(D.Z.siteRealtimePreview));(0,I.GG)(n).then((e=(0,v.A)(y().mark(function e(t){return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t.docs.length?(F.current=t.docs[0].id,eI(p)):(0,I.gS)(n,p).then(function(e){F.current=e.id,eA()});case 1:case"end":return e.stop()}},e)})),function(t){return e.apply(this,arguments)}))}},[eI,eA,b,p]);(0,S.useEffect)(function(){_&&null!=F&&F.current&&eI(_)},[eI,_]);var eN=(0,S.useCallback)(function(e){var t=e.slug,n=e.siteData;if(!n)return"";var r=t===ez.v?n.topPageUrl:n.slugsWithMeta[t].notionPageUrl,i=(0,e4.$)(r);return(0,tX.gg)(i)},[]),eB=(0,S.useCallback)(function(e){var t=e.siteData,n=e.siteContentsIds;if(!t)return[];var r=Object.keys(Object.fromEntries(Object.entries(t.slugsWithMeta).filter(function(e){var t=(0,ek.A)(e,2),n=t[0],r=t[1];return n!==(0,e4.$)(r.notionPageUrl)})));r.sort();var i=r.map(function(e){return{type:"slugUserPermanentLinkPage",slug:e}}),a=(0,e7.A)(r.map(function(e){return eN({slug:e,siteData:t})})),o=Object.keys(Object.fromEntries(Object.entries(t.slugsWithMeta).filter(function(e){var t=(0,ek.A)(e,2),n=t[0],r=t[1];return n===(0,e4.$)(r.notionPageUrl)})));o.sort();var s=o.filter(function(e){return!a.includes(t.slugsWithMeta[e].pageId)}).map(function(e){return{type:"slugSiteContentPage",slug:e}}),l=[].concat((0,e7.A)(r.map(function(e){return eN({slug:e,siteData:t})})),(0,e7.A)(s.map(function(e){return eN({slug:e.slug,siteData:t})}))),c=t.footerPageUrl,d=void 0===c?"":c,u=n.filter(function(e){return!l.includes(e)}).filter(function(e){return!d.includes(e.replaceAll("-",""))}).map(function(e){return{type:"onlySiteContentPage",slug:e.replaceAll("-","")}}),h=[].concat((0,e7.A)(s),(0,e7.A)(u));return h.sort(function(e,t){return t.slug>e.slug?-1:t.slug<e.slug?1:void 0}),[].concat((0,e7.A)(i),(0,e7.A)(h))},[eN]),e_=(0,S.useCallback)((r=(0,v.A)(y().mark(function e(t){return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,(0,M.cL)(t.id);case 4:eC(eB({siteData:t,siteContentsIds:e.sent}));case 7:case"end":return e.stop()}},e)})),function(e){return r.apply(this,arguments)}),[eB]);(0,S.useEffect)(function(){if(!p||!g){W(null),F.current=null,Y(""),q("");return}if(eW(),!w&&g){var e,t=tY({},p);null!=t&&null!=(e=t.slugsWithMeta)&&e.topPageSlugKey||(t.slugsWithMeta=tY((0,B.A)({},ez.v,{notionPageUrl:""}),t.slugsWithMeta)),W(t),e_(t)}},[p,g,eW,w,eB,e_]);var eU=function(e,t){var n;return e.length>99?(alert(x("siteEditAlert.permalinkIsTooLong")),!1):e?e.match(/^[0-9a-zA-Z\_\/\-\.]+$/)?"-"===e[0]?(alert(x("siteEditAlert.hyphenCannotBeUsedAtTheTopOfThePermalink")),!1):"/"===e[e.length-1]||"/"===e[0]?(alert(x("siteEditAlert.slashCannotBeSetAtTheTopAndEndOfPermalink")),!1):!t.startsWith($.rp)&&!t.includes($.tM)||t.match(/\#/g)||32!==(0,e4.$)(t).length?(alert(x("siteEditAlert.enterTheNotionShareUrl")),!1):null!=(n=T.slugsWithMeta)&&n[e]?(alert(x("siteEditAlert.theSamePermalinkHasAlreadyBeenSet")),!1):(0,e4.$)(t)!==(0,e4.$)(T.topPageUrl)||(alert(x("siteEditAlert.theSamePageAsTheTopPageIsSet")),!1):(alert(x("siteEditAlert.thereAreCharactersThatCannotBeUsedForPermalinks")),!1):(alert(x("siteEditAlert.permalinkIsEmpty")),!1)},eH=function(e,t,n){return tY(tY({},e),{},{slugsWithMeta:tY(tY({},e.slugsWithMeta),{},(0,B.A)({},t,n))})},eL=(0,S.useCallback)(function(e,t,n,r,i,a){return eH(e,t,{notionPageUrl:n,pageType:r,textPageContent:i,textPageContentType:a})},[]),eF=(0,S.useCallback)(function(e,t,n,r){var i=tY({},e.slugsWithMeta[t]);delete i.pageId,i.notionPageUrl=r;var a=tY(tY({},e.slugsWithMeta),{},(0,B.A)({},n,i));return delete a[t],tY(tY({},e),{},{slugsWithMeta:a})},[]),eR=function(e,t){var n=tY({},e.slugsWithMeta);return delete n[t],tY(tY({},e),{},{slugsWithMeta:n})},e$=function(e){V!==e.slug&&eT(e.slug),et({isOpen:!0,editingSlug:e.slug,slugPageType:e.type})},eX=(i=(0,v.A)(y().mark(function e(t){var n,r;return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=ee.editingSlug,"onlySiteContentPage"===ee.slugPageType&&(t.notionPageUrl="".concat($.rp).concat(n)),W(r=eH(T,n,t)),e_(r),eV(),e.next=8,eG(r);case 8:eD(n);case 9:case"end":return e.stop()}},e)})),function(e){return i.apply(this,arguments)}),eG=(a=(0,v.A)(y().mark(function e(t){return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,M.hj)(t);case 3:alert(x("designEdit.saveIsCompleted")),e.next=10;break;case 6:e.prev=6,e.t0=e.catch(0),console.warn(e.t0),alert(x("designEdit.saveFailed"));case 10:case"end":return e.stop()}},e,null,[[0,6]])})),function(e){return a.apply(this,arguments)}),eV=function(){et({isOpen:!1,editingSlug:"",slugPageType:""})},eK=(o=(0,v.A)(y().mark(function e(t){return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(T){e.next=2;break}throw Error("_deleteSlugSiteCache");case 2:return e.next=4,(0,M.k2)(null==p?void 0:p.id,t).catch(function(){alert(x("siteEdit.deletedSiteCacheFailed"))});case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}},e)})),function(e){return o.apply(this,arguments)}),eZ=(0,S.useCallback)(function(){ec({isOpen:!0})},[]),eJ=(0,S.useCallback)(function(e){if("slugUserPermanentLinkPage"===e.type){var t=T.slugsWithMeta[e.slug].notionPageUrl;ex({isOpen:!0,initSlug:e.slug,notionUrl:t,slugPageType:e.type})}else ex({isOpen:!0,initSlug:"",notionUrl:"".concat($.rp).concat(e.slug),slugPageType:e.type})},[null==T?void 0:T.slugsWithMeta]),eQ=function(){ex({isOpen:!1,initSlug:"",notionUrl:"",slugPageType:void 0})},e0=function(e){eg({isOpen:!0,slug:e.slug,textPageContent:T.slugsWithMeta[e.slug].textPageContent})},e1=(s=(0,v.A)(y().mark(function e(t){var n,r,i,a,o;return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.textPageContent,r=t.textPageContentType,i=eh.slug,(a=tY({},T.slugsWithMeta[i])).textPageContent=n,a.textPageContentType=r,W(o=eH(T,i,a)),e_(o),e.next=10,eG(o);case 10:e5();case 11:case"end":return e.stop()}},e)})),function(e){return s.apply(this,arguments)}),e2=(l=(0,v.A)(y().mark(function e(){var t;return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!confirm(x("pageSetting.wantToDeleteThisTextPage"))){e.next=8;break}return W(t=eR(T,eh.slug)),e_(t),e.next=7,eG(t);case 7:e5();case 8:case"end":return e.stop()}},e)})),function(){return l.apply(this,arguments)}),e5=function(){eg({isOpen:!1,slug:"",textPageContent:""})};return((0,S.useEffect)(function(){P(!1)},[j]),(0,S.useEffect)(function(){g||P(!1),L(0)},[g]),(0,to.isNull)(p))?null:(0,E.jsxs)(E.Fragment,{children:[g&&j&&(0,E.jsx)(em.s,{flex:"1",backgroundColor:"gray.50",maxW:{base
1:"full",lg:"xs"},py:{base:"4",lg:"8"},px:{base:"4",lg:"4"},style:{width:"100%",maxWidth:"100%",zIndex:1,WebkitOverflowScrolling:"touch",maxHeight:"calc(40px + 2rem)"},children:(0,E.jsx)(es.B,{justify:"space-between",gap:"1",width:"full",children:(0,E.jsx)(es.B,{gap:"8",backgroundColor:"gray.50",children:(0,E.jsxs)(em.s,{justify:"space-between",children:[(0,E.jsx)(eu,{style:{maxWidth:"180px"}}),j&&(0,E.jsxs)(em.s,{justify:"space-between",children:[k&&(0,E.jsx)(el.$,{marginLeft:2,onClick:function(){P(!1)},children:(0,E.jsx)(tR.yGN,{})}),!k&&(0,E.jsx)(el.$,{marginLeft:2,onClick:function(){P(!0)},children:(0,E.jsx)(ew.q5F,{})})]})]})})})}),(0,E.jsxs)(eY,{isWindowChangeConfirm:!0,isOpen:g,onClose:function(){W(null),L(0),eC([]),m()},closeBtnText:x("modal.return"),rootStyle:tY({position:null,top:null,left:null,backgroundColor:null,display:null,flexDirection:null,justifyContent:null,alignItems:null,margin:null,zIndex:null,resize:"horizontal"},j?{padding:"0",display:k?"none":null}:{padding:"16px 0 0",width:"600px"}),contentStyle:j?{height:"calc(100vh - 75px - 40px - 2rem)",width:"100vw",padding:"1rem 16px 75px"}:{height:"calc(100vh - 16px - 75px)",width:"600px",maxWidth:"none",padding:"1rem 16px 15px"},footerStyle:{maxWidth:"auto",padding:"12px 16px 0",width:"100%"},children:[(0,E.jsx)(ea.D,{as:"h2",size:"md",children:x("pageSetting.pageSetting")}),(0,E.jsx)(ei.a,{mb:"6",children:(0,E.jsxs)(ei.a,{mt:"4",mb:"4",children:[(0,E.jsx)(eo.E,{fontWeight:"bold",fontSize:"xl",mb:"2",children:x("siteEdit.permalinkSettings")}),(0,E.jsx)(eo.E,{mb:"2",children:x("siteEdit.youCanSetThePageUrlToBeDisplayedWhenAccessingTheSetPermalink")}),(0,E.jsx)(eo.E,{mb:"2",children:x("siteEdit.xmlFeedAndSiteMapAreGeneratedFromThisPage")}),(0,E.jsx)(ei.a,{mt:"2",children:(0,E.jsx)(e6.jq,{children:(0,E.jsx)(e6.BF,{children:(0,E.jsx)(e6.Hj,{children:(0,E.jsxs)(e6.nA,{colSpan:3,paddingTop:"4",paddingBottom:"4",paddingLeft:"0",paddingRight:"0",display:"flex",bg:"gray.50",children:[(0,E.jsx)(el.$,{bg:ez.I.brand[500],color:"white",fontWeight:"normal",mr:"8",onClick:function(){eZ()},children:x("pageSetting.addAPermalink")}),(0,E.jsx)(e9.p,{width:"auto",placeholder:x("pageSetting.searchPermalink"),value:eE,onChange:function(e){eP(e.target.value)}})]})})})})}),eS.length>5&&!eE&&(c=Math.ceil(eS.length/5),(0,E.jsx)(em.s,{overflowX:"scroll",css:tA,mt:"4",children:(0,e7.A)(Array(c)).map(function(e,t){return(0,E.jsx)(el.$,{bg:H===t?"gray.200":ez.I.brand[500],color:H===t?"gray.800":"white",fontWeight:"normal",onClick:function(){return L(t)},marginRight:5,variant:H===t?"outline":null,children:t+1},t)})})),(0,E.jsx)(e6.jq,{borderTop:"1px solid",borderColor:"var(--chakra-colors-gray-200)",css:tA,children:(0,E.jsxs)(e6.BF,{children:[eE&&0===eS.filter(function(e){return e.slug.includes(eE)}).length&&(0,E.jsx)(e6.Hj,{children:(0,E.jsx)(e6.nA,{children:"ä¸è´ãããã¼ããªã³ã¯ãããã¾ãã"})}),(eE?eS.filter(function(e){return e.slug.includes(eE)}):eS.slice(5*H,5*(H+1))).map(function(e){var t,n=Z===e.slug,r=e.slug===ez.v;if(r&&"slugUserPermanentLinkPage"!==e.type)throw Error("rowInfo.type:".concat(e.type));return(0,E.jsxs)(e6.Hj,{bg:n?"blue.100":"gray.50",_hover:{backgroundColor:n?"blue.100":"gray.100"},cursor:"pointer",onClick:function(){eD(e.slug)},children:[(0,E.jsx)(e6.nA,{minWidth:"260px",maxWidth:"260px",pe:"0",children:"slugUserPermanentLinkPage"===e.type&&r?(0,E.jsx)(E.Fragment,{children:(0,E.jsx)("div",{children:x("pageSetting.topPage")})}):("slugUserPermanentLinkPage"===e.type||e.type,(0,E.jsx)(E.Fragment,{children:(0,E.jsx)("div",{style:{textOverflow:"ellipsis",contain:"content"},children:"/".concat(e.slug)})}))}),(0,E.jsx)(e6.nA,{textAlign:"left",ps:"0",pe:"0",children:(null==T||null==(t=T.slugsWithMeta)||null==(t=t[e.slug])?void 0:t.pageType)==="text"?(0,E.jsx)(el.$,{ml:"0",mr:"4",bg:ez.I.brand[500],color:"white",fontWeight:"normal",onClick:function(){e0(e)},children:x("siteEdit.edit")}):(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(el.$,{ml:"0",mr:"4",bg:ez.I.brand[500],color:"white",fontWeight:"normal",onClick:function(){e$(e)},children:x("siteEdit.edit")}),(0,E.jsx)(el.$,{ml:"0",mr:"4",bg:ez.I.brand[500],color:"white",fontWeight:"normal",onClick:function(){eJ(e)},visibility:"slugUserPermanentLinkPage"===e.type&&r?"hidden":"visible",children:x("pageSetting.permalink")})]})})]},e.slug)})]})})]})}),(0,E.jsx)(tF,{isOpen:ee.isOpen,editingSlug:ee.editingSlug,slugPageType:ee.slugPageType,slugData:null==T||null==(u=T.slugsWithMeta)?void 0:u[ee.editingSlug],siteData:p,onSave:eX,onClose:eV,onDelete:function(){var e=ee.editingSlug,t=ee.slugPageType;if("slugUserPermanentLinkPage"===t){if(confirm(x("siteEditAlert.okayToDeleteIt",{slug:e}))){var n=eN({slug:e,siteData:T}),r=eR(T,e);(0,v.A)(y().mark(function e(){return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,eK(n);case 2:return W(r),e_(r),eV(),e.next=7,eG(r);case 7:eA(),L(0);case 9:case"end":return e.stop()}},e)}))()}}else if("slugSiteContentPage"===t){if(confirm(x("siteEditAlert.okayToDeleteIt",{slug:"page_id=".concat(e)}))){var i=eN({slug:e,siteData:T}),a=eR(T,e);(0,v.A)(y().mark(function e(){return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,eK(i);case 2:return W(a),e_(a),eV(),e.next=7,eG(a);case 7:eA(),L(0);case 9:case"end":return e.stop()}},e)}))()}}else if("onlySiteContentPage"===t){if(confirm(x("pageSetting.thisPageIsAPageOnlyForSiteCacheIsItOkayToDeleteTheSiteCache"))){eV();var o=(0,tX.gg)(e);(0,v.A)(y().mark(function e(){return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,eK(o);case 2:e_(T),eA(),L(0);case 5:case"end":return e.stop()}},e)}))()}}else throw Error("PageSetting delete button")}}),(0,E.jsx)(t$,{isOpen:er.isOpen,onSave:function(e){var t=e.slug,n=e.notionPageUrl,r=void 0===n?"":n,i=e.pageType,a=void 0===i?"notion":i,o=e.pageContent,s=e.textPageContentType;if("notion"===a){if(!1===eU(t,r))return}else if(!1==(t.length>99?(alert(x("siteEditAlert.permalinkIsTooLong")),!1):t?t.match(/^[0-9a-zA-Z\_\/\-\.]+$/)?"-"===t[0]?(alert(x("siteEditAlert.hyphenCannotBeUsedAtTheTopOfThePermalink")),!1):"/"!==t[t.length-1]&&"/"!==t[0]||(alert(x("siteEditAlert.slashCannotBeSetAtTheTopAndEndOfPermalink")),!1):(alert(x("siteEditAlert.thereAreCharactersThatCannotBeUsedForPermalinks")),!1):(alert(x("siteEditAlert.permalinkIsEmpty")),!1)))return;var l=eL(T,t,r,a,void 0===o?"":o,void 0===s?"text/plain":s);W(l),e_(l),ec({isOpen:!1}),eG(l)},onClose:function(){ec({isOpen:!1})}}),(0,E.jsx)(tq,{isOpen:ef.isOpen,initSlug:ef.initSlug,notionUrl:ef.notionUrl,slugPageType:ef.slugPageType,onSave:function(e,t,n){var r,i=(r=(0,v.A)(y().mark(function e(t,n){return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return W(t),e_(t),eQ(),e.next=5,eG(t);case 5:eT(n);case 6:case"end":return e.stop()}},e)})),function(e,t){return r.apply(this,arguments)});if("slugUserPermanentLinkPage"===e){if(!1===eU(t,n))return;i(eF(T,ef.initSlug,t,n),t)}else if("slugSiteContentPage"===e){if(!1===eU(t,n))return;i(eF(T,(0,e4.$)(n),t,n),t)}else if("onlySiteContentPage"===e){if(!1===eU(t,n))return;i(eL(T,t,n,"notion","",""),t)}else throw Error("onSaveSlugAddSiteContentsModal")},onClose:eQ}),(0,E.jsx)(tG,{isOpen:eh.isOpen,slug:eh.slug,textPageContent:eh.textPageContent,textPageContentType:null==T||null==(h=T.slugsWithMeta)||null==(h=h[eh.slug])?void 0:h.textPageContentType,onSave:e1,onClose:e5,onDelete:e2})]}),g&&(0,E.jsx)(tj,{url:X,timeStamp:ej,password:f,rootStyle:{zIndex:1,display:j&&!k?"none":null}})]})},tZ=n(43617);function tJ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function tQ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?tJ(Object(n),!0).forEach(function(t){(0,B.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tJ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var t0=function(e){var t,n,r,i,a,o,s=e.isOpen,l=e.siteData,c=e.sitePassword,d=e.onClose,u=(0,U.B)(),h=u.t,g="ja"===u.i18n.language,p=(0,O.D)().firebase,m=(0,S.useContext)(W).themes,f=(0,eM.A)({base:!0,lg:!1}),x=(0,S.useState)(!1),b=x[0],j=x[1],w=(0,S.useState)(null),C=w[0],k=w[1],P=(0,th.A)(C,200),A=(0,ek.A)(P,1)[0],T=(0,S.useState)(!1),N=T[0],_=T[1],z=(0,S.useState)(""),H=z[0],L=z[1],F=(0,S.useState)("");F[0],F[1];var R=(0,S.useState)(""),X=R[0],q=R[1],G=(0,S.useState)(""),V=G[0],Y=G[1],K=(0,S.useRef)(null),Z=(0,S.useState)(""),J=Z[0],Q=Z[1],ee=(0,S.useState)(""),et=ee[0],en=ee[1],er=(0,S.useState)(null),ed=er[0],eh=er[1],eg=(t=(0,v.A)(y().mark(function e(t){return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(C){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.next=5,(0,M.hj)(C);case 5:alert(h("designEdit.saveIsCompleted")),t&&ep(!1),_(!1),e.next=14;break;case 10:e.prev=10,e.t0=e.catch(2),console.warn(e.t0),alert(h("designEdit.saveFailed"));case 14:case"end":return e.stop()}},e,null,[[2,10]])})),function(e){return t.apply(this,arguments)}),ep=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!N){_(!1),k(null),d();return}e&&confirm(h("designEdit.theEditedContentWillDisappearIsThatOk"))&&(_(!1),k(null),d()),e||d()},ex=function(e){var t=e.target,n=t.name,r=t.value;k(tQ(tQ({},C),{},(0,B.A)({},n,r))),_(!0)},eb=function(e,t){var n=e.target,r=n.name,i=n.value;k(tQ(tQ({},C),{},{themeCssVariables:tQ(tQ({},null==C?void 0:C.themeCssVariables),{},(0,B.A)({},r,i))})),_(!0)},ej=function(e){var t=(0,e7.A)(C.header__btns);t.splice(e,1),k(tQ(tQ({},C),{},{header__btns:t}))},ev=function(e,t){k(tQ(tQ({},C),{},(0,B.A)({},e,t.target.checked)))},ey=function(e){var t=C.header__btns[e],n=C.header__btns[e-1],r=C.header__btns;r[e-1]=t,r[e]=n,k(tQ(tQ({},C),{},{header__btns:r}))},eS=(n=(0,v.A)(y().mark(function e(t){var n,r,i,a;return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(!t||!t.target||!t.target.files)){e.next=2;break}return e.abrupt("return");case 2:if("siteLogo"!==(n=t.target.name)&&"siteIcon"!==n){e.next=19;break}if(i=(r=t.target.files[0]).type.split("/")[0],L(n),!r){e.next=18;break}return e.prev=8,e.next=11,t_(r,i);case 11:a=e.sent,k(tQ(tQ({},C),{},(0,B.A)({},n,a))),e.next=18;break;case 15:e.prev=15,e.t0=e.catch(8),alert(e.t0);case 18:L(null);case 19:case"end":return e.stop()}},e,null,[[8,15]])})),function(e){return n.apply(this,arguments)}),eC=function(e){k(tQ(tQ({},C),{},(0,B.A)({},e,null)))},eO=(0,S.useCallback)((0,v.A)(y().mark(function e(){var t;return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return Q(t=$.Cu?"http://localhost:3000?siteid=".concat(null==l?void 0:l.id,"&realtimePreview=").concat(K.current):null!=l&&l.domain?"https://".concat(null==l?void 0:l.domain,"/?realtimePreview=").concat(K.current):"https://".concat(null==l?void 0:l.id,".").concat($.UA,"/?realtimePreview=").concat(K.current)),e.t0=en,e.next=5,tZ.toDataURL(t);case 5:e.t1=e.sent,(0,e.t0)(e.t1);case 7:case"end":return e.stop()}},e)})),[null==l?void 0:l.domain,null==l?void 0:l.id]),eE=(0,S.useCallback)(function(e){if(p){var t=(0,I.aU)(p),n=(0,I.H9)((0,I.rJ)(t,"".concat(D.Z.sites,"/").concat(l.id,"/").concat(D.Z.siteRealtimePreview)),K.current);(0,I.mZ)(n,e),eO()}},[eO,p,null==l?void 0:l.id]),eP=function(){if((null==K||!K.current)&&p){var e,t=(0,I.aU)(p),n=(0,I.rJ)(t,"".concat(D.Z.sites,"/").concat(l.id,"/").concat(D.Z.siteRealtimePreview));(0,I.GG)(n).then((e=(0,v.A)(y().mark(function e(t){return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t.docs.length?(K.current=t.docs[0].id,eE(l)):(0,I.gS)(n,l).then(function(e){K.current=e.id,eO()});case 1:case"end":return e.stop()}},e)})),function(t){return e.apply(this,arguments)}))}},eA=function(e,t){k(tQ(tQ({},C),{},(0,B.A)({},e,t)))},eT=function(e){var t=null==C?void 0:C.header__btns[e];q(t.url),Y(t.text),eh(e)};return(0,S.useEffect)(function(){A&&null!=K&&K.current&&eE(A)},[eE,A]),(0,S.useEffect)(function(){k(l),l&&s&&eP(),s||(K.current=null,Q(""))},[l,s,p]),(0,S.useEffect)(function(){j(!1)},[f]),(0,S.useEffect)(function(){s||j(!1)},[s]),(0,E.jsxs)(E.Fragment,{children:[s&&f&&(0,E.jsx)(em.s,{flex:"1",backgroundColor:"gray.50",maxW:{base
1:"full",lg:"xs"},py:{base:"4",lg:"8"},px:{base:"4",lg:"4"},style:{width:"100%",maxWidth:"100%",zIndex:1,WebkitOverflowScrolling:"touch",maxHeight:"calc(40px + 2rem)"},children:(0,E.jsx)(es.B,{justify:"space-between",gap:"1",width:"full",children:(0,E.jsx)(es.B,{gap:"8",backgroundColor:"gray.50",children:(0,E.jsxs)(em.s,{justify:"space-between",children:[(0,E.jsx)(eu,{style:{maxWidth:"180px"}}),f&&(0,E.jsxs)(em.s,{justify:"space-between",children:[b&&(0,E.jsx)(el.$,{bg:"gray.200",marginLeft:2,onClick:function(){j(!1)},children:(0,E.jsx)(tR.yGN,{})}),!b&&(0,E.jsx)(el.$,{bg:"gray.200",marginLeft:2,onClick:function(){j(!0)},children:(0,E.jsx)(ew.q5F,{})})]})]})})})}),(0,E.jsxs)(eY,{isWindowChangeConfirm:!0,isOpen:s,onClose:function(){return ep(!0)},onSave:function(){return eg(!1)},onSaveClose:function(){return eg(!0)},closeBtnText:h("modal.return"),saveCloseBtnText:h("modal.save")+" & "+h("modal.return"),rootStyle:tQ({position:null,top:null,left:null,backgroundColor:null,display:null,flexDirection:null,justifyContent:null,alignItems:null,margin:null,zIndex:null,resize:"horizontal"},f?{padding:"0",display:b?"none":null}:{padding:"16px 0 0",width:"600px"}),contentStyle:f?{height:"calc(100vh - 75px - 40px - 2rem)",width:"100vw",padding:"1rem 16px 75px"}:{height:"calc(100vh - 16px - 75px)",width:"600px",maxWidth:"none",padding:"1rem 16px 15px"},footerStyle:{maxWidth:"auto",padding:"12px 16px 0",width:"100%"},children:[(0,E.jsxs)(ea.D,{as:"h2",size:"md",children:[h("designEdit.siteDesignEditing")," : ",null==C?void 0:C.id]}),(0,E.jsxs)(ei.a,{children:[l&&K&&(0,E.jsxs)(ei.a,{children:[(0,E.jsx)(ef.w,{borderColor:"gray.200",mt:"6",mb:"6"}),(0,E.jsx)(ea.D,{as:"h3",size:"md",mb:"4",children:h("designEdit.livePreview")}),(0,E.jsxs)(eo.E,{mb:"4",children:[h("designEdit.itWillBeAnIndividualUrl"),(0,E.jsx)("br",{}),h("designEdit.pressTheButtonToOpenASiteWithAParameter")]}),(0,E.jsx)(tz._,{src:et,height:"80px",alt:"QRcode"}),(0,E.jsxs)(em.s,{children:[(0,E.jsx)(e9.p,{mr:"4",maxWidth:"max-content",value:J,readOnly:!0,onFocus:function(e){return e.currentTarget.select()},minWidth:200}),(0,E.jsx)(ec.N,{href:J,target:"_blank",rel:"noreferrer",minWidth:"auto",bg:ez.I.brand[500],color:"white",px:"4",py:"2",borderRadius:"md",children:h("designEdit.openThePreviewSite")})]}),(0,E.jsx)(ef.w,{borderColor:"gray.200",mt:"6",mb:"6"})]}),(0,E.jsxs)(ei.a,{mb:"6",children:[(0,E.jsxs)(ei.a,{mb:"2",children:[(0,E.jsx)(eo.E,{as:"span",mr:"4",children:h("designEdit.iconImageUpload")}),(0,E.jsxs)(ei.a,{position:"relative",display:"inline-block",children:[(0,E.jsx)(tz._,{width:"50px",height:"50px",src:(null==C?void 0:C.siteIcon)||"/placeholder.png",alt:"site icon"}),(null==C?void 0:C.siteIcon)&&(0,E.jsx)(tD,{size:24,style:{position:"absolute",top:"-12px",right:"-12px"},onClick:function(){return eC("siteIcon")}})]})]}),"siteIcon"===H?(0,E.jsx)(tT.A,{}):(0,E.jsxs)(el.$,{as:"label",fontWeight:"normal",cursor:"pointer",children:[(0,E.jsx)(eo.E,{as:"span",children:h("designEdit.fileSelection")}),(0,E.jsx)(e9.p,{display:"none",type:"file",accept:"image/*",name:"siteIcon",onChange:eS})]})]}),(0,E.jsx)(ea.D,{as:"h3",size:"md",mb:"4",children:h("designEdit.header")}),(0,E.jsx)(ei.a,{mb:"4",children:(0,E.jsx)(ta,{id:"isHiddenHeaderBreadcrumb",onChange:function(e){return ev("isHiddenHeaderBreadcrumb",e)},checked:(null==C?void 0:C.isHiddenHeaderBreadcrumb)||!1,children:h("designEdit.displayTheLogoImage")})}),(null==C?void 0:C.isHiddenHeaderBreadcrumb)&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(ei.a,{mt:"4",mb:"6",children:[(0,E.jsxs)(ei.a,{mb:"2",children:[(0,E.jsx)(eo.E,{as:"span",mr:"4",children:h("designEdit.siteLogoImageUpload")}),(0,E.jsxs)(ei.a,{position:"relative",display:"inline-block",children:[(0,E.jsx)(tz._,{width:"auto",height:"20px",src:(null==C?void 0:C.siteLogo)||"/placeholder.png",alt:"site logo"}),(null==C?void 0:C.siteLogo)&&(0,E.jsx)(tD,{size:24,style:{position:"absolute",top:"-12px",right:"-12px"},onClick:function(){return eC("siteLogo")}})]})]}),"siteLogo"===H?(0,E.jsx)(tT.A,{}):(0,E.jsxs)(el.$,{as:"label",fontWeight:"normal",cursor:"pointer",children:[(0,E.jsx)(eo.E,{as:"span",children:h("designEdit.fileSelection")}),(0,E.jsx)(e9.p,{display:"none",type:"file",accept:"image/*",name:"siteLogo",onChange:eS})]})]}),(0,E.jsxs)(ei.a,{mb:"6",children:[(0,E.jsx)(eo.E,{mt:"4",mb:"2",children:h("designEdit.urlOfTheLogoSiteName")}
1),(0,E.jsx)(e9.p,{name:"headerLink",placeholder:"https://example.com",defaultValue:(null==C?void 0:C.headerLink)||"",onChange:ex})]})]}),(0,E.jsxs)(ei.a,{children:[(0,E.jsx)(ea.D,{as:"h3",size:"md",mb:"4",children:h("designEdit.addALinkToTheRightSideOfTheHeader")}),(0,E.jsx)(eo.E,{fontSize:"sm",color:"gray.500",mb:"2",children:h("designEdit.inTheCaseOfTheSiteTransition")}),(0,E.jsxs)(e6.jq,{mb:"6",css:tA,children:[(0,E.jsx)(e6.A0,{bgColor:"gray.200",children:(0,E.jsxs)(e6.Hj,{bg:"gray.100",children:[(0,E.jsx)(e6.nA,{children:(0,E.jsx)(eo.E,{textAlign:"center",children:h("designEdit.buttonUrlHash")})}),(0,E.jsx)(e6.nA,{children:(0,E.jsx)(eo.E,{textAlign:"center",children:h("designEdit.text(BlankSpace)")})}),(0,E.jsx)(e6.nA,{children:(0,E.jsx)(eo.E,{textAlign:"center",children:h("designEdit.operation")})})]})}),(0,E.jsxs)(e6.BF,{children:[((null==C?void 0:C.header__btns)||[]).map(function(e,t){var n=e.text,r=e.url;return(0,E.jsxs)(e6.Hj,{bg:ed===t?"blue.200":"gray.100",children:[(0,E.jsx)(e6.nA,{children:r}),(0,E.jsx)(e6.nA,{children:n}),(0,E.jsx)(e6.nA,{textAlign:"center",children:!ed&&(0,E.jsx)(E.Fragment,{children:(0,E.jsxs)(em.s,{gap:"2",children:[t>0&&(0,E.jsx)(el.$,{size:"sm",bg:"gray.200",color:"black",fontWeight:"normal",_hover:{bg:"gray.300"},onClick:function(){return ey(t)},children:"â"}),(0,E.jsx)(el.$,{size:"sm",bg:ez.I.brand[500],color:"white",fontWeight:"normal",_hover:{bg:ez.I.brand[400]},onClick:function(){return eT(t)},children:h("designEdit.edit")}),(0,E.jsx)(el.$,{size:"sm",bg:"orange.200",color:"black",fontWeight:"normal",_hover:{bg:"orange.300"},onClick:function(){return ej(t)},children:h("designEdit.delete")})]})})})]},t)}),(0,E.jsxs)(e6.Hj,{bgColor:"gray.100",children:[(0,E.jsx)(e6.nA,{children:(0,E.jsx)(e9.p,{bgColor:"white",borderColor:"gray.200",placeholder:"https://example.com/",value:X,onChange:function(e){q(e.target.value)},minWidth:200})}),(0,E.jsx)(e6.nA,{children:(0,E.jsx)(e9.p,{bgColor:"white",borderColor:"gray.200",placeholder:h("designEdit.pageTitle"),value:V,onChange:function(e){Y(e.target.value)},minWidth:200})}),(0,E.jsx)(e6.nA,{textAlign:"center",children:null!==ed?(0,E.jsxs)(em.s,{children:[(0,E.jsx)(el.$,{bg:ez.I.brand[500],color:"white",fontWeight:"normal",onClick:function(){if(null!==ed){var e=(0,e7.A)(C.header__btns);e[ed]={text:V,url:X},k(tQ(tQ({},C),{},{header__btns:e})),Y(""),q(""),eh(null),_(!0)}},children:h("designEdit.update")}),(0,E.jsx)(el.$,{ml:"2",bg:"gray.200",color:"black",fontWeight:"normal",_hover:{bg:"gray.300"},onClick:function(){Y(""),q(""),eh(null)},children:h("designEdit.cancel")})]}):(0,E.jsx)(el.$,{bg:ez.I.brand[500],color:"white",fontWeight:"normal",_hover:{bg:ez.I.brand[400]},onClick:function(){var e,t=X;t?((t.startsWith($.rp)||t.includes($.tM))&&confirm(h("designEdit.theUrlOfTheNotionPageIsEntered"))&&(t="/"+(0,e4.$)(t)+(null!=(e=t.split("#"))&&e[1]?"#"+t.split("#")[1]:"")),k(tQ(tQ({},C),{},{header__btns:[].concat((0,e7.A)(C.header__btns||[]),[{text:V,url:t}])})),Y(""),q("")):alert(h("designEdit.theUrlIsEmpty"))},children:h("designEdit.toAdd")})})]})]})]})]}),(0,E.jsx)(ef.w,{}),(0,E.jsx)(ea.D,{as:"h3",size:"md",mt:"4",mb:"4",children:h("designEdit.searchFunction")}),(0,E.jsx)(ei.a,{mb:"4",children:(0,E.jsx)(ta,{id:"isSearchOn",onChange:function(e){return ev("isSearchOn",e)},checked:(null==C?void 0:C.isSearchOn)||!1,children:h("designEdit.addASearchButtonToTheHeader")})}),(0,E.jsx)(ei.a,{mb:"4",children:(0,E.jsx)(ta,{id:"hiddenSearchBreadCrumb",onChange:function(e){return ev("hiddenSearchBreadCrumb",e)},checked:(null==C?void 0:C.hiddenSearchBreadCrumb)||!1,children:h("designEdit.hiddenSearchBreadCrumb")})}),(0,E.jsxs)(ei.a,{mb:"4",children:[(0,E.jsx)(ta,{id:"addSearchBlock",onChange:function(e){return ev("addSearchBlock",e)},checked:(null==C?void 0:C.addSearchBlock)||!1,children:h("designEdit.addASearchFormBelowTheTitleOfAllPages")}),(0,E.jsxs)(eo.E,{mt:"2",mb:"6",children:["â»",h("designEdit.ifYouWantToSwitchTheDisplayHidden"),(0,E.jsx)(ec.N,{color:"blue.400",href:"https://wraptas.com/css_sample#block-26ce681aadf14d75b5601398c3b623a0",target:"_blank",rel:"noreferrer",children:h("designEdit.clickHereForTheSample")})]})]})]}),(0,E.jsx)(ef.w,{}),(0,E.jsx)(ea.D,{as:"h3",size:"md",mt:"4",mb:"4",children:h("designEdit.settingsForBreadrumb")}),(0,E.jsx)(ei.a,{mb:"4",children:(0,E.jsx)(ta,{id:"isShowBreadcrumb",onChange:function(e){return ev("isShowBreadcrumb",e)},checked:(null==C?void 0:C.isShowBreadcrumb)||!1,children:h("designEdit.displayABreadrumbAtTheTopOfTheTitle")})}),(0,E.jsx)(ei.a,{mb:"4",children:(0,E.jsx)(ta,{id:"isShowBreadcrumbFooter",onChange:function(e){return ev("isShowBreadcrumbFooter",e)},checked:(null==C?void 0:C.isShowBreadcrumbFooter)||!1,children:h("designEdit.displayABreadrumbAtTheBottomOfTheContent")})}),(0,E.jsx)(ei.a,{mb:"4",children:(0,E.jsx)(ta,{id:"excludeCollectionViewInBreadcrumb",onChange:function(e){return ev("excludeCollectionViewInBreadcrumb",e)},checked:(null==C?void 0:C.excludeCollectionViewInBreadcrumb)||!1,children:h("designEdit.inTheBreadrumbSkipTheCollectionItself")})}),(0,E.jsx)(ei.a,{mb:"4",children:(0,E.jsx)(ta,{id:"excludePageItselfInBreadcrumb",onChange:function(e){return ev("excludePageItselfInBreadcrumb",e)},checked:(null==C?void 0:C.excludePageItselfInBreadcrumb)||!1,children:h("designEdit.hideThePageItselfInTheBreadrumb")})}),(0,E.jsxs)(ei.a,{mb:"6",children:[(0,E.jsx)(eo.E,{mb:"2",children:h("designEdit.textWhenChangingTheTopTitleOfTheBreadrumb")}),(0,E.jsx)(e9.p,{name:"breadcrumb__topText",placeholder:h("designEdit.top"),defaultValue:(null==C?void 0:C.breadcrumb__topText)||"",onChange:ex})]}),(0,E.jsx)(ef.w,{}),(0,E.jsx)(ea.D,{as:"h3",size:"md",mt:"4",mb:"4",children:h("designEdit.contentArea")}),(0,E.jsxs)(ei.a,{mb:"4",children:[(0,E.jsxs)(eo.E,{mr:"4",children:[h("designEdit.specifyABlockThatSeparatesTheSection"),"ï¼",(0,E.jsxs)(ec.N,{color:"blue.400",href:"https://demo.wraptas.site/section_color",target:"_blank",rel:"noreferrer",children:["â»",h("designEdit.clickHereForDetailsOfHowToUse")]}),"ï¼"]}),(0,E.jsxs)(eo.E,{mr:"4",children:["â»",h("designEdit.inTheCaseOfASeparatedLine")]}),(0,E.jsxs)("select",{style:{maxWidth:"max-content",padding:"10px",backgroundColor:"white",border:"1px solid #ccc",borderRadius:"4px",marginBottom:"6px"},id:"sectionSeparateHeadingNumber",name:"sectionSeparateHeadingNumber",defaultValue:(null==C?void 0:C.sectionSeparateHeadingNumber)||"ja",onChange:ex,children:[(0,E.jsx)("option",{value:"",children:h("designEdit.notUse")}
1),(0,E.jsx)("option",{value:"1",children:"h1 (Heading 1)"}),(0,E.jsx)("option",{value:"2",children:"h2 (Heading 2)"}),(0,E.jsx)("option",{value:"3",children:"h3 (Heading 3)"}),(0,E.jsxs)("option",{value:"4",children:["divider (",h("designEdit.breakingLine"),")"]})]})]}),(0,E.jsx)(ei.a,{mb:"4",children:(0,E.jsxs)(ta,{id:"isShowShareBtns",onChange:function(e){return ev("isShowShareBtns",e)},checked:(null==C?void 0:C.isShowShareBtns)||!1,children:[h("designEdit.displayTheSnsShareButtonUnderTheContent"),"â»",h("designEdit.currentlyOnlyTheTwitterButton")]})}),(null==C?void 0:C.isShowShareBtns)&&(0,E.jsxs)(ei.a,{mb:"4",children:[(0,E.jsx)(eo.E,{mb:"2",children:h("designEdit.textToAddToTheEndOfTheShareTextOnTwitter")}),(0,E.jsx)(e9.p,{name:"twitterFooterText",placeholder:"@wraptas",defaultValue:(null==C?void 0:C.twitterFooterText)||"",onChange:ex})]}),(0,E.jsx)(ei.a,{mb:"4",children:(0,E.jsxs)(ta,{id:"isCaptionLink",name:"isCaptionLink",onChange:function(e){return ev("isCaptionLink",e)},checked:(null==C?void 0:C.isCaptionLink)||!1,children:[h("designEdit.ifTheCaptionOfTheImageIsAUrlTheImageIsLinkedToTheImage"),"â»",h("designEdit.itWillBeALinkInTheSiteAtTheBeginningOfSlash")]})}),(0,E.jsx)(ei.a,{mb:"4",children:(0,E.jsx)(ta,{id:"isDisableImageZoom",name:"isDisableImageZoom",onChange:function(e){return ev("isDisableImageZoom",e)},checked:(null==C?void 0:C.isDisableImageZoom)||!1,children:h("designEdit.tapTheFunctionToEnlargeTheImageWhenTapped")})}),(0,E.jsx)(ei.a,{mb:"4",children:(0,E.jsxs)(ta,{id:"injectHtmlCodeBlock",name:"injectHtmlCodeBlock",onChange:function(e){return ev("injectHtmlCodeBlock",e)},checked:(null==C?void 0:C.injectHtmlCodeBlock)||!1,children:[h("designEdit.turnOnTheHtmlInsertionFunctionUsingCodeBlocks")," ï¼",(0,E.jsxs)(ec.N,{color:"blue.400",href:"https://demo.wraptas.site/code_block_inject",target:"_blank",rel:"noreferrer",children:["â»",h("designEdit.clickHereForDetailsOfHowToUse")]}),"ï¼"]})}),(0,E.jsx)(ei.a,{mb:"4",children:(0,E.jsxs)(ta,{id:"enableLinkButton",name:"enableLinkButton",onChange:function(e){return ev("enableLinkButton",e)},checked:(null==C?void 0:C.enableLinkButton)||!1,children:[h("designEdit.turnOnTheLinkButtonFunction"),"ï¼",(0,E.jsxs)(ec.N,{color:"blue.400",href:"https://demo.wraptas.site/button_link",target:"_blank",rel:"noreferrer",children:["â»",h("designEdit.clickHereForDetailsOfHowToUse")]}),"ï¼"]})}),(0,E.jsx)(ei.a,{mb:"4",children:(0,E.jsx)(ta,{id:"toggleOpen",name:"toggleOpen",onChange:function(e){return ev("toggleOpen",e)},checked:(null==C?void 0:C.toggleOpen)||!1,children:h("designEdit.toguruTheHeadlineIsOpenFromTheBeginning")})}),(0,E.jsx)(ef.w,{}),(0,E.jsx)(ea.D,{as:"h3",size:"md",mt:"4",mb:"4",children:h("designEdit.settingsForDatabases")}),(0,E.jsx)(ei.a,{mb:"4",children:(0,E.jsx)(ta,{id:"databaseContentsDisplayAll",name:"databaseContentsDisplayAll",onChange:function(e){return ev("databaseContentsDisplayAll",e)},checked:null!=(r=null==C?void 0:C.databaseContentsDisplayAll)&&r,children:h("designEdit.displayAllCasesByDefault")})}),(0,E.jsx)(ei.a,{mb:"4",children:(0,E.jsx)(ta,{id:"isHiddenCollectionSearch",name:"isHiddenCollectionSearch",onChange:function(e){return ev("isHiddenCollectionSearch",e)},checked:(null==C?void 0:C.isHiddenCollectionSearch)||!1,children:h("designEdit.hideTheDatabaseSearchFunction")})}),(0,E.jsx)(ei.a,{mb:"4",children:(0,E.jsxs)(ta,{id:"enableUrlLink",name:"enableUrlLink",onChange:function(e){return ev("enableUrlLink",e)},checked:(null==C?void 0:C.enableUrlLink)||!1,children:[h("designEdit.turnOnTheFunctionToMakeTheDatabaseAUrlLink")," ",(0,E.jsxs)(ec.N,{color:"blue.400",href:"https://wraptas.com/news/database_link",target:"_blank",rel:"noreferrer",children:["\uD83D\uDC49 ",h("designEdit.howToUse")]})]})}),(null==C?void 0:C.enableUrlLink)&&(0,E.jsxs)(ei.a,{mb:"4",children:[(0,E.jsxs)(eo.E,{children:[h("designEdit.propertiesNameToUseUrl"),"â»",h("designEdit.capitalLettersAndLowercaseLetters")]}),(0,E.jsx)(e9.p,{name:"urlLinkPropertyName",placeholder:"URL",defaultValue:(null==C?void 0:C.urlLinkPropertyName)||"",onChange:ex})]}),(0,E.jsx)(ei.a,{mb:"4",children:(0,E.jsx)(ta,{id:"displayCollectionViewDescription",name:"displayCollectionViewDescription",onChange:function(e){return ev("displayCollectionViewDescription",e)},checked:(null==C?void 0:C.displayCollectionViewDescription)||!1,children:h("designEdit.displayTheDescriptionOfTheDatabasePage")})}),(0,E.jsx)(ei.a,{mb:"4",children:(0,E.jsx)(ta,{id:"switchCollectionViewTabs",name:"switchCollectionViewTabs",onChange:function(e){return ev("switchCollectionViewTabs",e)},checked:(null==C?void 0:C.switchCollectionViewTabs)||!1,children:h("designEdit.switchCollectionViewTabs")})}),(0,E.jsx)(ef.w,{}),(0,E.jsx)(ea.D,{as:"h3",size:"md",mt:"4",mb:"4",children:h("designEdit.theme")}),(0,E.jsx)(ei.a,{mb:"4",children:(0,E.jsx)(ta,{id:"isDarkMode",name:"isDarkMode",onChange:function(e){return ev("isDarkMode",e)},checked:(null==C?void 0:C.isDarkMode)||!1,children:h("designEdit.applyTheDarkTheme")})}),(0,E.jsxs)(ei.a,{mb:"4",children:[(0,E.jsx)(ea.D,{as:"h3",size:"md",mb:"4",children:h("designEdit.themeCssSettings")}),(0,E.jsxs)(ec.N,{color:"blue.400",href:"https://wraptas.com/templates",target:"_blank",rel:"noreferrer",children:["\uD83D\uDC49 ",h("designEdit.howToUse")]}),(0,E.jsx)(em.s,{mt:"3",children:(0,E.jsxs)(em.s,{wrap:"wrap",gap:"3",children:[(0,E.jsxs)("label",{htmlFor:"theme_none",children:[(0,E.jsx)("input",{type:"radio",id:"theme_none",value:"",checked:(null==C?void 0:C.themeCssId)==="",onCh
1ange:function(e){return eA("themeCssId",e.target.value)}}),h("designEdit.notUse")]}),Object.keys(m).map(function(e){var t=m[e],n=t.name,r=t.isPublic,i=t.name_en;if(r||(null==C?void 0:C.themeCssId)===e)return(0,E.jsxs)("label",{htmlFor:"theme_"+e,children:[(0,E.jsx)("input",{type:"radio",id:"theme_"+e,value:e,checked:(null==C?void 0:C.themeCssId)===e,onChange:function(e){return eA("themeCssId",e.target.value)}}),g?n:i]},e)})]})}),(null==C?void 0:C.themeCssId)&&(0,E.jsxs)(ei.a,{mt:"4",children:[(0,E.jsx)(eo.E,{children:null==(i=m[null==C?void 0:C.themeCssId])?void 0:i[g?"description":"description_en"]}),(0,E.jsxs)(ei.a,{mt:"4",children:[(0,E.jsxs)(e6.jq,{children:[(0,E.jsx)(e6.A0,{children:(0,E.jsxs)(e6.Hj,{bgColor:"gray.100",children:[(0,E.jsx)(e6.nA,{textAlign:"center",children:h("designEdit.parametersForThemeCss")}),(0,E.jsxs)(e6.nA,{textAlign:"center",children:[h("designEdit.value"),"â»",h("designEdit.theDefaultValueWillBeHitIfYouDoNotEnter")]})]})}),(0,E.jsx)(e6.BF,{children:Object.keys(null==(a=m[null==C?void 0:C.themeCssId])?void 0:a.variables).sort().map(function(e){var t,n,r=m[null==C?void 0:C.themeCssId].variables[e],i=r.name,a=r.name_en,o=r.unit,s=r.type,l=r.defaultValue,c=r.darkModeDefaultValue,d=C.isDarkMode&&c?c:l;return(0,E.jsxs)(e6.Hj,{bgColor:"gray.100",children:[(0,E.jsx)(e6.nA,{children:g?i:a}),(0,E.jsx)(e6.nA,{children:(0,E.jsxs)(em.s,{alignItems:"center",children:[(0,E.jsx)(e9.p,{mr:"2",width:"max-content",type:"color"===s?"text":s,placeholder:d,name:e,onChange:function(e){return eb(e,s)},value:(null==C||null==(t=C.themeCssVariables)?void 0:t[e])||("color"==s?d:"")}),(0,E.jsx)(eo.E,{as:"span",children:o}),"color"===s&&(0,E.jsx)(e9.p,{w:"50px",p:"0",type:"color",placeholder:d,name:e,onChange:function(e){return eb(e,s)},value:(null==C||null==(n=C.themeCssVariables)?void 0:n[e])||d})]})})]},e)})})]}),(0,E.jsx)(el.$,{bg:"orange.500",color:"white",fontWeight:"normal",mt:"4",onClick:function(){k(tQ(tQ({},C),{},{themeCssVariables:{}}))},children:h("designEdit.resetThemeVariables")})]})]})]}),(0,E.jsx)(ef.w,{}),(0,E.jsx)(ea.D,{as:"h3",size:"md",mt:"4",mb:"4",children:h("designEdit.additionalCss")}),(0,E.jsxs)(ei.a,{children:[(0,E.jsxs)(eo.E,{mb:"2",children:[h("designEdit.editDirectlyAndApply"),"(",(0,E.jsx)(ec.N,{color:"blue.400",href:"https://wraptas.com/css_sample",target:"_blank",rel:"noreferrer",children:h("designEdit.hereIsTheCssSampleCollectionThatCanBeUsedInCopyAndPaste")}),")"]}),(0,E.jsx)(e2.i,{children:(0,E.jsx)(e1,{mode:"css",placeholder:"a { font-size: 1.3em }",onChange:function(e){return ex({target:{name:"cssWriting",value:e}})},value:(null==C?void 0:C.cssWriting)||""})})]}),(0,E.jsx)(ef.w,{}),(0,E.jsxs)(ei.a,{mb:"4",children:[(0,E.jsx)(ea.D,{as:"h3",size:"md",mt:"4",mb:"4",children:h("designEdit.htmlDirectPostscript(HeadTag)")}),(0,E.jsxs)(ei.a,{children:[(0,E.jsx)(eo.E,{mb:"2",children:h("designEdit.writeHtmlDirectlyAtTheBeginningOfHead")}),(0,E.jsx)(e2.i,{children:(0,E.jsx)(e1,{mode:"html",placeholder:'<script src="https://www.googletagmanager.com/gtag/js?id=UA-XXXXXXXXXXX-1" async><\/script>',onChange:function(e){return ex({target:{name:"injectHtml",value:e}})},value:(null==C?void 0:C.injectHtml)||""})})]}),(0,E.jsx)(ea.D,{as:"h3",size:"md",mt:"4",mb:"4",children:h("designEdit.htmlDirectPostscript(BodyTag)")}),(0,E.jsxs)(ei.a,{children:[(0,E.jsxs)(eo.E,{mb:"2",children:[h("designEdit.writeHtmlDirectlyAtTheEndOfTheBody"),"ï¼",'<div class="injectHtml injectHtml_body"></div>',"ï¼"]}),(0,E.jsx)(e2.i,{children:(0,E.jsx)(e1,{mode:"html",placeholder:g?'\x3c!-- ããããHubSpotåãè¾¼ã¿ã³ã¼ã --\x3e<script type="text/javascript" id="hs-script-loader" async defer src="//js.hs-scripts.com/{hubId}.js"><\/script>\x3c!-- ããã¾ã§HubSpotåãè¾¼ã¿ã³ã¼ã --\x3e':'<script type="text/javascript" id="hs-script-loader" async defer src="//js.hs-scripts.com/{hubId}.js"><\/script>',onChange:function(e){return ex({target:{name:"injectHtml__body",value:e}})},value:(null==C?void 0:C.injectHtml__body)||""})})]})]})]}),s&&(0,E.jsx)(tj,{url:J,timeStamp:null==C||null==(o=C.updatedAt)?void 0:o.toDate().getTime(),password:c,rootStyle:{zIndex:1,display:f&&!b?"none":null}})]})},t1=n(95563),t2=function(e){var t=(0,U.B)().t;return(0,E.jsxs)(e6.jq,{style:{minWidth:"700px"},children:[(0,E.jsx)(e6.A0,{children:(0,E.jsxs)(e6.Hj,{bgColor:"gray.100",children:[(0,E.jsx)(e6.ug,{children:"name"}),(0,E.jsx)(e6.ug,{children:"type"}),(0,E.jsx)(e6.ug,{children:"value"})]})}),(0,E.jsx)(e6.BF,{children:(0,E.jsxs)(e6.Hj,{bgColor:"gray.100",children:[(0,E.jsx)(e6.nA,{children:e.redirectDomain?e.redirectDomain:t("domainSetting.domainAndSubdomainYouWantToUse")}),(0,E.jsx)(e6.nA,{children:"A"}),(0,E.jsx)(e6.nA,{children:e.isDev?"75.2.8.57":"3.33.128.231"})]})})]})},t4=n(31019),t5=function(e){return e.startsWith("www.")?e.slice(4):"www."+e},t3=/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/i,t6=/^(?:[a-z]{2,}|xn--[a-z0-9-]+)$/i,t8=function(e){if(!e)return!1;try{t=e.split(".").map(function(e){return t4.Ay.toASCII(e)}).join(".")}catch(e){return!1}if(t.length>253)return!1;var t,n=t.split(".");return!(n.length<2)&&!!n.every(function(e){return t3.test(e)})&&t6.test(n[n.length-1])},t9=["Aã¬ã³ã¼ããè¨å®ããã¦ãã¾ãã","誤ã£ãIPã¢ãã¬ã¹ãè¨å®ããã¦ãã¾ã","AAAAã¬ã³ã¼ããè¨å®ããã¦ãã¾ã"],t7=["è¨å®ã®è¿½å ããé¡ããã¾ãã","æ
1å®ã®å¤ä»¥å¤ã«ç»é²ããã¦ãããã®ãããå ´åã¯åé¤ãã¦ãã ããã","Aã¬ã³ã¼ãã¸ä¸è¨IPã¢ãã¬ã¹ãç»é²ãã¦ãã ããã"],ne=["Please add your settings.","Please delete any registrations other than the specified value.","Please register the above IP address to the A record."],nt=function(e){var t,n,r,i,a,o,s,l=e.isOpen,c=e.siteData,d=e.onClose,u=e.initialRedirectStep,h=void 0!==u&&u,g=(0,U.B)(),p=g.t,m="ja"===g.i18n.language,f=(0,S.useState)(""),x=f[0],b=f[1],j=(0,S.useState)(!1),w=j[0],C=j[1],k=(0,S.useState)(!1),O=k[0],P=k[1],A=(0,S.useState)(!1),T=A[0],D=A[1],I=(0,S.useState)(""),W=I[0],N=I[1],B=(0,S.useState)(""),_=B[0],z=B[1],H=(0,S.useState)(),L=H[0],F=H[1],R=(0,S.useState)(!1),$=R[0],X=R[1],q=(0,S.useState)(""),G=q[0],V=q[1],Y=(0,S.useState)(!1),K=Y[0],Z=Y[1],J=(0,S.useState)(""),Q=J[0],ee=J[1],et=(0,S.useState)(!1),en=et[0],er=et[1],es=(t=(0,v.A)(y().mark(function e(){return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(P(!0),e.prev=1,!x.includes("/")){e.next=5;break}return alert(p("domainSetting.pleaseEnterOnlyTheDomain")),e.abrupt("return");case 5:if(t8(x)){e.next=8;break}return alert(p("domainSetting.itIsAnIllegalDomain")),e.abrupt("return");case 8:return e.next=10,(0,M.RC)({siteId:c.id,domain:x});case 10:D(!0),N(x),e.next=20;break;case 14:e.prev=14,e.t0=e.catch(1),alert(p("domainSetting.anErrorHasOccurredPleaseContactTheSupport")),D(!1),N(""),clearInterval(L);case 20:return e.prev=20,P(!1),e.finish(20);case 23:case"end":return e.stop()}},e,null,[[1,14,20,23]])})),function(){return t.apply(this,arguments)}),ed=(n=(0,v.A)(y().mark(function e(){return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!O){e.next=2;break}return e.abrupt("return");case 2:return P(!0),e.next=5,(0,M.Kr)({siteId:c.id,isPeraichiGateway:T,isCancel:!0});case 5:alert(p("domainSetting.deletedDomainApplication")),clearInterval(L),P(!1),D(!1),N("");case 10:case"end":return e.stop()}},e)})),function(){return n.apply(this,arguments)}),eu=(r=(0,v.A)(y().mark(function e(){var t;return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(P(!0),!(!W||!(null!=c&&c.id))){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,(0,M.RC)({siteId:c.id,domain:W,isShow:!0});case 5:"ok"===(t=e.sent).domain_status?(z(""),clearInterval(L),V(t5(W)),X(!0),N(""),D(!1)):(z(null==t?void 0:t.domain_status_message),F(setTimeout(eu,5e3))),P(!1);case 8:case"end":return e.stop()}},e)})),function(){return r.apply(this,arguments)}),eh=(i=(0,v.A)(y().mark(function e(){return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return P(!0),e.prev=1,e.next=4,(0,M.RC)({siteId:c.id,domain:G,isRedirectDomain:!0});case 4:Z(!0),eg(),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(1),alert(p("domainSetting.anErrorHasOccurredPleaseContactTheSupport")),Z(!1);case 12:return e.prev=12,P(!1),e.finish(12);case 15:case"end":return e.stop()}},e,null,[[1,8,12,15]])})),function(){return i.apply(this,arguments)}),eg=(a=(0,v.A)(y().mark(function e(){var t;return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(P(!0),!(!G||!(null!=c&&c.id))){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,(0,M.RC)({siteId:c.id,domain:G,isShow:!0,isRedirectDomain:!0});case 5:"ok"===(t=e.sent).domain_status?(ee(""),clearInterval(L),alert(p("domainSetting.redirectDomainRegistrationCompleted")),d()):(ee(null==t?void 0:t.domain_status_message),F(setTimeout(eg,5e3))),P(!1);case 8:case"end":return e.stop()}},e)})),function(){return a.apply(this,arguments)});return((0,S.useEffect)(function(){var e,t=(e=(0,v.A)(y().mark(function e(){var t,n,r;return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=c&&c.id){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,(0,M.Qd)(c.id);case 4:n=(t=e.sent).domain,r=t.env,n&&(N(n),"pg"===r&&D(!0));case 8:case"end":return e.stop()}},e)})),function(){return e.apply(this,arguments)});b(""),N(""),z(""),C(!1),D(!1),P(!1),Z(!1),ee(""),er(!1),l?h&&null!=c&&c.domain&&!(null!=c&&c.redirectDomain)?(X(!0),V(t5(c.domain))):(X(!1),V(""),t()):(clearInterval(L),X(!1),V(""))},[l]),(0,S.useEffect)(function(){T&&W&&l&&eu()},[T,W,l]),$)?(0,E.jsxs)(eY,{isOpen:l,onClose:d,contentHeight:"600px",children:[(0,E.jsxs)(ea.D,{as:"h2",size:"md",children:[p("domainSetting.redirectDomainSetup"),"(",null==c?void 0:c.id,")"]}),(0,E.jsxs)(ei.a,{children:[(0,E.jsx)(eo.E,{mt:"4",mb:"2",children:p("domainSetting.mainDomainCompleted",{redirectDomain:G,mainDomain:t5(G)})}),(0,E.jsx)(eo.E,{mt:"2",mb:"4",fontSize:"sm",color:"gray.600",children:p("domainSetting.addDnsForRedirect")}),(0,E.jsx)(t2,{isDev:!1,redirectDomain:G}),K&&(0,E.jsx)(ei.a,{mt:"4",children:(0,E.jsxs)(eo.E,{fontWeight:"bold",color:"orange.400",children:[G," ",p("domainSetting.applyingPleaseWaitALittleConfirmedTheSettings")]})}),O?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(t1.y,{borderWidth:"4px",animationDuration:"0.65s",mt:"4",color:ez.I.brand[400],size:"xl"}),K&&(0,E.jsx)(eo.E,{mt:"4",fontWeight:"bold",children:p("domainSetting.checkingTheDnsSettings")})]}):(0,E.jsxs)(E.Fragment,{children:[K&&Q&&(0,E.jsxs)(eo.E,{mt:"4",color:"orange.400",children:[m?Q:"",p("domainSetting.itMayTakeAboutAnHourToReflectTheDnsSettings"),null==(s=m?t7:ne)?void 0:s[t9.indexOf(Q)]]}),!K&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(ei.a,{mb:"4",mt:"4",children:(0,E.jsx)(ta,{id:"submitRedirectDomainCheckbox",name:"submitRedirectDomainCheckbox",onChange:function(e){return er(e.target.checked)},checked:en,children:p("domainSetting.redirectDnsCompleted",{domain:G})})}),(0,E.jsxs)(em.s,{gap:"2",flexWrap:"wrap",children:[(0,E.jsx)(el.$,{bg:ez.I.brand[500],color:"white",fontWeight:"normal",_hover:{bg:ez.I.brand[400]},onClick:eh,disabled:!en,children:p("domainSetting.setupRedirectFor",{domain:G})}),(0,E.jsx)(el.$,{fontWeight:"normal",variant:"outline",borderColor:"gray.400",color:"gray.600",borderWidth:"1px",_hover:{bg:"gray.50"},onClick:function(){alert(p("domainSetting.mainDomainCompletedSkipped")),d()},children:p("domainSetting.skip")})]})]})]})]})]}):(0,E.jsxs)(eY,{isOpen:l,onClose:d,contentHeight:"600px",children:[(0,E.jsxs)(ea.D,{as:"h2",size:"md",children:[p("domainSetting.applyingForYourOwnDomain"),"(",null==c?void 0:c.id,")"]}),(0,E.jsxs)(ei.a,{children:[m?(0,E.jsxs)(eo.E,{mt:"4",mb:"2",children:["å©ç¨ããå ´åã«ã¯",(0,E.jsx)(eo.E,{as:"span",fontWeight:"bold",children:"次ã®è¨å®ãå©ç¨ããããã¡ã¤ã³ã®DNSã¸è¨å®å¾"}),"ã«ãã©ã¼ã ã§éä¿¡ãã¦ãã ãããWraptasã§ãã¡ã¤ã³ã®è³¼å
¥ã¯ã§ãã¾ããã®ã§ãèªèº«ã§",(0,E.jsx)(ec.N,{href:"https://muumuu-domain.com/",color:"blue.600",target:"_blank",children:"ã ã¼ã ã¼ãã¡ã¤ã³"}),"çã§ãã¡ã¤ã³ãåå¾ãã¦ãã ããã"]}):(0,E.jsx)(eo.E,{mt:"4",mb:"2",children:p("domainSetting.ifYouUseItSetItToTheDnsOfTheDomain")}),(0,E.jsx)(t2,{isDev:!1}),W&&(0,E.jsxs)(ei.a,{children:[(0,E.jsxs)(eo.E,{fontWeight:"bold",color:"orange.400",mt:"4",children:[W," ",p("domainSetting.applyingPleaseWaitALittleConfirmedTheSettings")]}),(0,E.jsx)(el.$,{mt:"2",fontWeight:"normal",variant:"outline",borderColor:"orange.400",color:"orange.400",borderWidth:"1px",_hover:{bg:"orange.50"},onClick:ed,disabled:O,children:p("domainSetting.cancelDomainRegistration")})]}),O?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(t1.y,{borderWidth:"4px",animationDuration:"0.65s",mt:"4",color:ez.I.brand[400],size:"xl"}),T&&(0,E.jsx)(eo.E,{mt:"4",fontWeight:"bold",children:p("domainSetting.checkingTheDnsSettings")})]}):(0,E.jsxs)(E.Fragment,{children:[W&&T&&_&&(0,E.jsxs)(eo.E,{mt:"4",color:"orange.400",children:[m?_:"",p("domainSetting.itMayTakeAboutAnHourToReflectTheDnsSettings"),null==(o=m?t7:ne)?void 0:o[t9.indexOf(_)]]}),!W&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(eo.E,{fontWeight:"bold",fontSize:"xl",mt:"4",mb:"4",children:p("domainSetting.applicationForm")}),(0,E.jsx)(ei.a,{mb:"4",children:(0,E.jsx)(ta,{id:"submitDomainCheckbox",name:"submitDomainCheckbox",onChange:function(e){return C(e.target.checked)},checked:w,children:p("domainSetting.theDnsSettingOfTheApplicationDomainHasBeenCompleted")})}),(0,E.jsxs)(em.s,{gap:"2",flexWrap:"wrap",children:[(0,E.jsxs)(em.s,{maxWidth:"max-content",alignItems:"center",children:[(0,E.jsx)(eo.E,{children:"https://"}),(0,E.jsx)(e9.p,{name:"domain",placeholder:"example.com",onChange:function(e){return b(e.target.value)},value:x})]}),(0,E.jsx)(el.$,{bg:ez.I.brand[500],color:"white",fontWeight:"normal",_hover:{bg:ez.I.brand[400]},onClick:es,disabled:!x||!w,children:p("domainSetting.applyForDomainRegistration")})]})]})]})]})]})},nn=function(e){var t,n,r=e.isOpen,i=e.siteData,a=e.onClose,o=(0,U.B)().t,s=(0,S.useState)(!1),l=s[0],c=s[1],d=(0,S.useState)(!1),u=d[0],h=d[1],g=!(i||{}).systemSiteId,p=(t=(0,v.A)(y().mark(function e(){return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return c(!0),e.prev=1,e.next=4,(0,M.Kr)({siteId:i.id,isPeraichiGateway:g});case 4:alert(o("domainDelete.theDeletionHasBeenCompletedYouCanRegisterAnotherDomainAgain")),a(),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),alert(o("domainDelete.anErrorHasOccurredSorryPleaseContactTheSupportWithTheSiteId"));case 11:c(!1);case 12:case"end":return e.stop()}},e,null,[[1,8]])})),function(){return t.apply(this,arguments)}),m=(n=(0,v.A)(y().mark(function e(){return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return c(!0),e.prev=1,e.next=4,(0,M.Kr)({siteId:i.id,isPeraichiGateway:!0,isRedirectDomain:!0});case 4:alert(o("domainDelete.redirectDomainDeleted")),a(),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),alert(o("domainDelete.anErrorHasOccurredSorryPleaseContactTheSupportWithTheSiteId"));case 11:c(!1);case 12:case"end":return e.stop()}},e,null,[[1,8]])})),function(){return n.apply(this,arguments)});return(0,E.jsxs)(eY,{isOpen:r,onClose:a,contentHeight:"500px",children:[(0,E.jsxs)(ea.D,{as:"h2",size:"md",mb:"4",children:[o("domainDelete.uniqueDomainCancellation"),"(",null==i?void 0:i.id,")"]}),(0,E.jsxs)(eo.E,{fontWeight:"bold",mb:"4",children:[(null==i?void 0:i.domain)&&t4.Ay.toUnicode(i.domain)," ",o("domainDelete.deleteThisDomainSetting")]}),(null==i?void 0:i.redirectDomain)&&(0,E.jsx)(eo.E,{fontSize:"sm",color:"gray.600",mb:"4",children:o("domainDelete.redirectDomainWillAlsoBeDeleted",{domain:t4.Ay.toUnicode(i.redirectDomain)})}),(0,E.jsx)(ei.a,{mt:"4",mb:"2",children:(0,E.jsx)(ta,{id:"deleteDomainCheckbox",name:"deleteDomainCheckbox",onChange:function(e){return h(e.target.checked)},checked:u,children:o("domainDelete.noteThatReRegistrationOfTheSameDomainMayTakeUpTo24Hours")})}),(0,E.jsxs)(ei.a,{children:[l?(0,E.jsx)(t1.y,{borderWidth:"4px",animationDuration:"0.65s",mt:"4",color:ez.I.brand[400],size:"xl"}):(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(el.$,{bg:"orange.200",_hover:{bg:"orange.300"},color:"black",fontWeight:"normal",disabled:!u,onClick:p,children:o("domainDelete.domainSettingCancellation")}),(null==i?void 0:i.redirectDomain)&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(ef.w,{borderColor:"gray.200",my:"4"}),(0,E.jsx)(eo.E,{fontSize:"sm",mb:"2",children:o("domainDelete.deleteOnlyRedirectDomain")}),(0,E.jsx)(el.$,{variant:"outline",borderColor:"orange.400",color:"orange.400",fontWeight:"normal",borderWidth:"1px",size:"sm",onClick:m,children:o("domainDelete.deleteRedirectFor",{domain:t4.Ay.toUnicode(i.redirectDomain)})})]})]}),(0,E.jsx)(eo.E,{my:"4",children:o("domainDelete.ifYouDeleteTheDomainSetting")}),(0,E.jsx)(t2,{isDev:!1})]})]})},nr=function(e){var t,n=e.isOpen,r=e.siteData,i=e.onClose,a=(0,U.B)().t,o=(0,S.useState)(""),s=o[0],l=o[1],c=(0,S.useState)(!1),d=c[0],u=c[1],h=(t=(0,v.A)(y().mark(function e(){return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(u(!0),e.prev=1,!s){e.next=8;break}return e.next=5,(0,M.W5)({siteId:r.id,password:s});case 5:alert(a("sitePassword.saveYourPassword")),e.next=11;break;case 8:return e.next=10,(0,M.uS)(r.id);case 10:alert(a("sitePassword.unlockedThePassword"));case 11:return e.prev=11,u(!1),e.finish(11);case 14:case"end":return e.stop()}},e,null,[[1,,11,14]])}
1)),function(){return t.apply(this,arguments)});return(0,S.useEffect)(function(){if(n){u(!0);var e,t=(e=(0,v.A)(y().mark(function e(){return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,M.lA)(r.id);case 2:l(e.sent),u(!1);case 5:case"end":return e.stop()}},e)})),function(){return e.apply(this,arguments)});null!=r&&r.hasSitePassword?t():(l(""),u(!1))}},[n,r]),(0,E.jsxs)(eY,{isOpen:n,onClose:i,contentHeight:"300px",children:[(0,E.jsxs)(ea.D,{as:"h2",size:"md",children:[a("sitePassword.sitePassword"),"(",null==r?void 0:r.id,")"]}),(0,E.jsxs)(ei.a,{children:[(0,E.jsx)(eo.E,{mt:"4",mb:"2",children:a("sitePassword.enterThePasswordYouWantToSetOnTheSite")}),(0,E.jsxs)(ei.a,{children:[(0,E.jsx)(e9.p,{type:"text",value:s,placeholder:"password",onChange:function(e){l(e.target.value)},display:"block",maxW:"400px"}),(0,E.jsx)(el.$,{mt:"2",fontWeight:"normal",bg:ez.I.brand[500],_hover:{bg:ez.I.brand[400]},color:"white",onClick:h,disabled:d,children:a("sitePassword.save")})]})]})]})},ni=function(e){var t=e.isOpen,n=e.plan,r=e.onClose,i=(0,U.B)().t,a=(0,S.useState)(!1),o=a[0],s=a[1];return(0,E.jsxs)(eY,{isOpen:t,onClose:r,contentHeight:"500px",children:[(0,E.jsx)(ea.D,{as:"h2",size:"md",mb:"4",color:"black",children:i("unsubscribe.unsubscribeTheService")}),(0,E.jsx)(eo.E,{fontWeight:"bold",color:"black",mb:"2",children:i("unsubscribe.importantPoint")}),"free"!==n&&(0,E.jsxs)(eo.E,{color:"black",mb:"2",children:["ã»",i("unsubscribe.youHaveAPaidPlanOrTrialPeriod")]}),(0,E.jsxs)(eo.E,{color:"black",mb:"2",children:["ã»",i("unsubscribe.theSameSiteIdCannotBeObtainedEvenIfYouRe-Contract")]}),(0,E.jsxs)(eo.E,{color:"black",mb:"2",children:["ã»",i("unsubscribe.pleaseCancelThePaymentByStripeBeforeCancelingTheService")]}),(0,E.jsxs)(eo.E,{color:"black",children:["ã»",i("unsubscribe.youNeedToLogInOnceForConfirmation")]}),(0,E.jsx)(ei.a,{mt:"4",mb:"2",children:(0,E.jsx)(ta,{id:"unsubscribeCheckbox",name:"unsubscribeCheckbox",onChange:function(e){return s(e.target.checked)},checked:o,children:(0,E.jsx)(eo.E,{color:"black",children:i("unsubscribe.iUnderstoodAndAcceptedTheAbovePrecautions")})})}),(0,E.jsx)(el.$,{bg:"orange.200",_hover:{bg:"orange.300"},color:"black",fontWeight:"normal",disabled:!o,onClick:function(){Z()},children:i("unsubscribe.deleteAccountAndStopTheSite")})]})},na=n(1924),no=function(){var e=(0,U.B)().t,t=T().user,n=(0,S.useState)(!1),r=n[0],i=n[1],a=(0,S.useState)(!1),o=a[0],s=a[1],l=(0,S.useState)(!1),c=l[0],d=l[1],u=(0,S.useState)(t.plan),h=u[0],g=u[1];return(0,S.useEffect)(function(){var e;return(0,v.A)(y().mark(function t(){return y().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,M.wM)(function(e){g(e)});case 2:return e=t.sent,t.next=5,Q();case 5:return i(t.sent),t.next=9,ee();case 9:s(t.sent);case 11:case"end":return t.stop()}},t)}))(),function(){e()}},[]),(0,E.jsxs)(na.T,{gap:"4",pb:"4",align:"start",children:[(0,E.jsx)(ea.D,{as:"h3",size:"sm",color:"black",children:e("account.emailAddress")}),(0,E.jsxs)(eo.E,{children:[(0,E.jsx)(eo.E,{as:"span",fontWeight:"bold",color:"black","data-uid":t.uid,onDoubleClick:function(){return navigator.clipboard.writeText(t.uid).then(function(){return alert("copied User ID")})},children:t.email})," ",e("account.youAreLoggingIn")]}),(0,E.jsx)(el.$,{color:"black",bg:"gray.300",_hover:{bg:"gray.200"},fontWeight:"400",onClick:function(){if(!o&&!t.googleAccoutMailChanged)return void alert(e("account.willNotBeAbleToUseGoogleLogin"));var n=prompt(e("account.enterTheEmailAddressYouWantToChange")+(r?e("account.googleLoginAfterChangeWillNotBeAvailable"):""));n?er(n):alert(e("account.canceledTheChange"))},children:e("account.changeYourEmailAddress")}),(0,E.jsx)(ea.D,{as:"h3",size:"sm",color:"black",children:e("account.password")}),(0,E.jsxs)(ei.a,{flexDirection:"row",children:[(0,E.jsx)(el.$,{mr:"4",mb:"4",color:"black",bg:"gray.300",_hover:{bg:"gray.200"},fontWeight:"400",onClick:function(){confirm(o?e("account.doYouWantToResetYourPassword"):e("account.doYouSetAPassword"))&&(et(),alert(e("account.iSentAPasswordSettingEmailToTheRegisteredEmailAddress")))},children:o?e("account.resetThePassword"):e("account.setThePassword")}),o&&r&&(0,E.jsx)(el.$,{mb:"4",color:"black",bg:"gray.300",_hover:{bg:"gray.200"},fontWeight:"400",onClick:function(){confirm(e("account.doDeletePassword"))&&(en(),alert(e("account.deletedPassword")),s(!1))},children:e("account.deleteThePassword")})]}),(0,E.jsx)(ea.D,{as:"h3",size:"sm",color:"black",children:e("account.signOut")}),(0,E.jsx)(el.$,{color:"black",bg:"gray.300",_hover:{bg:"gray.200"},fontWeight:"400",onClick:function(){confirm(e("account.doYouWantToSignOut"))&&K()},children:e("account.signOut")}),(0,E.jsx)(ei.a,{height:100}),(0,E.jsx)(ea.D,{as:"h3",size:"sm",color:"black",children:e("account.unsubscribing")}),(0,E.jsx)(el.$,{color:"black",bg:"orange.400",_hover:{bg:"orange.300"},fontWeight:"400",onClick:function(){d(!0)},children:e("account.unsubscribeTheService")}),(0,E.jsx)(ni,{isOpen:c,plan:h,onClose:function(){d(!1)}})]})},ns=function(){var e=(0,U.B)().t;return(0,E.jsxs)(na.T,{gap:"4",pb:"4",align:"start",color:"black",children:[(0,E.jsx)(ea.D,{as:"h3",size:"md",children:e("help.support")}),(0,E.jsxs)(eo.E,{children:[e("help.manual")," ",(0,E.jsx)(ec.N,{color:"blue.600",fontWeight:"bold",href:"https://"+$.Yi+"/manual",target:"_blank",children:e("help.here")}),e("help.qa")," ",(0,E.jsx)(ec.N,{color:"blue.600",fontWeight:"bold",href:"https://"+$.Yi+"/help",target:"_blank",children:e("help.here")}),e("help.support2")," ",(0,E.jsx)(ec.N,{color:"blue.600",fontWeight:"bold",href:"mailto:".concat($.Te),target:"_blank",children:e("help.email")}
1)," ",e("help.contactUs")]}),(0,E.jsx)(eo.E,{fontWeight:"bold",children:e("help.welcome")}),(0,E.jsx)(eo.E,{whiteSpace:"pre-wrap",children:e("help.inquiryText")}),(0,E.jsx)(eo.E,{whiteSpace:"pre-wrap",border:"1px solid gray",p:"2",rounded:"md",children:e("help.inquiryTemplate")})]})},nl=function(){var e=(0,U.B)().t;return(0,E.jsx)(na.T,{gap:"4",pb:"4",align:"start",children:(0,E.jsx)(eo.E,{whiteSpace:"pre-wrap",color:"black",children:e("dashboard.noSiteDescription",{NEW_SITE_BUTTON:e("nav.registerNewSite")})})})},nc=n(30718);z.Yv.add(H.AaJ);var nd=function(e){var t,n,r=e.plan,i=e.sites,a=e.canHaveSiteNum,o=e.hasPayed,s=(0,U.B)(),l=s.t,c="ja"===s.i18n.language,d=c?"".concat($.WC,"(").concat($.zW,")"):$.he,u=(0,M.QT)(),h=T().user,g=30-(0,nc.c)(new Date,h.createdAt),p=(0,S.useState)(!1),m=p[0],f=p[1],x=(0,S.useState)(""),b=x[0],j=x[1],w=(t=(0,v.A)(y().mark(function e(){var t,n;return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=c?$.gl:$.jr){e.next=4;break}return alert(l("billingScreen.theProductIsNotRead")),e.abrupt("return");case 4:return f(!0),e.prev=5,e.next=8,(0,M.Lx)({stripePriceId:t});case 8:n=e.sent,window.Stripe($.eQ).redirectToCheckout({sessionId:n}),e.next=17;break;case 13:e.prev=13,e.t0=e.catch(5),f(!1),alert(e.t0);case 17:case"end":return e.stop()}},e,null,[[5,13]])})),function(){return t.apply(this,arguments)}),C=(n=(0,v.A)(y().mark(function e(){return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return f(!0),e.next=3,(0,M.Zz)();case 3:j(e.sent),f(!1);case 6:case"end":return e.stop()}},e)})),function(){return n.apply(this,arguments)});return"relatives"===r?null:(0,E.jsxs)(na.T,{gap:"4",pb:"4",align:"start",color:"black",children:["basic"===r&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(ea.D,{as:"h2",size:"md",children:l("billingScreen.paymentInformationChange")}),!(null!=i&&i.length)&&(0,E.jsx)(eo.E,{children:l("billingScreen.thankYouForYourRegistration")}),(0,E.jsx)(eo.E,{children:l("billingScreen.clickHereToUpdateThePaymentInformation")}),(0,E.jsxs)(eo.E,{children:[l("billingScreen.currentSiteCreationNumber"),":",a," "]}),a>0&&(0,E.jsxs)(eo.E,{children:[l("billingScreen.ifYouWantToAddASite"),(0,E.jsxs)(eo.E,{as:"span",color:"orange.400",children:["â»",l("billingScreen.ifYouAddTheNumberOfSites")]})]}),(0,E.jsx)(el.$,{bg:ez.I.brand[400],_hover:{bg:ez.I.brand[600]},color:"white",fontWeight:"bold",disabled:m,onClick:C,children:l("billingScreen.confirm/EditPaymentInformation")}),m&&(0,E.jsx)(eo.E,{children:l("billingScreen.pleaseWaitALittleForTheTransition")}),b&&(0,E.jsx)(ec.N,{color:"blue.600",href:b,children:l("billingScreen.ifYouDoNotTransitionAutomaticallyClickHere")})]}),"basic"!==r&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(ea.D,{as:"h2",size:"md",children:l("billingScreen.paymentInformationRegistration")}),(0,E.jsxs)(eo.E,{children:[(0,E.jsxs)(eo.E,{as:"span",fontWeight:"bold",children:[l("billingScreen.monthlyPrice",{PRICE:d})," "]}),g<0?(0,E.jsx)(eo.E,{children:l("billingScreen.theTrialPeriodHasEnded")}):(0,E.jsx)(eo.E,{as:"span",children:l("billingScreen.theDailyTrialPeriodRemains",{trialDiffDays:g})})]}),(0,E.jsxs)(eo.E,{children:["â»",(0,E.jsxs)(ec.N,{href:"https://stripe.com/jp",fontWeight:"bold",color:"blue.600",ml:"1",mr:"1",target:"_blank",children:["Stripe",(0,E.jsx)(eZ.A,{size:16})]}),l("billingScreen.weUseExternalServicesForPaymentStripe")]}),null!=u&&u.length?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(el.$,{bg:ez.I.brand[400],_hover:{bg:ez.I.brand[600]},color:"white",disabled:m,onClick:w,children:(0,E.jsx)(eo.E,{as:"span",fontWeight:"bold",children:l("billingScreen.agreeWithVariousTermsAndTransitionToThePaymentScreen")})}),m&&(0,E.jsx)(eo.E,{children:l("billingScreen.pleaseWaitALittleToMoveToThePaymentScreen")}),o&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(ei.a,{height:4}),(0,E.jsx)(el.$,{bg:ez.I.brand[400],_hover:{bg:ez.I.brand[600]},color:"white",disabled:m,onClick:C,children:l("billingScreen.pastBillingDetails")})]})]}):(0,E.jsx)(eo.E,{as:"span",children:"products loading..."})]})]})},nu=n(93803),nh=["inputProps","children","rootRef","trackLabel","thumbLabel"];function ng(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function np(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?ng(Object(n),!0).forEach(function(t){(0,B.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ng(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var nm=S.forwardRef(function(e,t){var n,r=e.inputProps,i=e.children,a=e.rootRef,o=e.trackLabel,s=e.thumbLabel,l=(0,ep.A)(e,nh),c=ez.I.brand[400],d=null!=(n=e.checked)&&n;return(0,E.jsxs)(nu.lq,np(np({ref:a},l),{},{cursor:"pointer",children:[(0,E.jsx)(nu.tD,np({ref:t},r)),(0,E.jsxs)(nu.oO,{style:{border:"1px solid "+c,backgroundColor:d?c:"white"},children:[(0,E.jsx)(nu.pD,{style:{boxShadow:"none",top:"-1px",right:"1px",position:"relative",backgroundColor:d?"white":c},children:s&&(0,E.jsx)(nu.Ez,{fallback:null==s?void 0:s.off,children:null==s?void 0:s.on})}),o&&(0,E.jsx)(nu.I2,{fallback:o.off,children:o.on})]}),null!=i&&(0,E.jsx)(nu.$X,{children:i})]}))}),nf=n(25136);function nx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function nb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nx(Object(n),!0).forEach(function(t){(0,B.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nx(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var nj=function(e){var t=e.site,n=e.setOpenModalType,r=(0,U.B)().t,i=(0,eM.A)({base:!0,lg:!1}),a=T().user,o=null!=t&&t.domain?"https://"+t4.Ay.toUnicode(t.domain):"https://".concat(t.id,".").concat($.UA);return(0,E.jsx)(em.s,{flexDirection:"column",width:i?"100vw":"280px",maxWidth:"100%",color:"black",children:(0,E.jsxs)(es.B,{gap:"5",children:[(0,E.jsxs)(es.B,{gap:"1",children:[(0,E.jsxs)(eo.E,{fontSize:"xl",fontWeight:"bold",children:[r("siteSetting.siteName")," :"," ",t.siteName||r("siteSetting.none")]}),(0,E.jsx)(tM.h,{pt:"2"}),(0,E.jsxs)(eo.E,{fontSize:"lg",fontWeight:"medium",children:[r("siteSetting.siteId")," : ",t.id]}),(null==t?void 0:t.versions)===2&&(0,E.jsx)(eo.E,{fontSize:"lg",color:"green",children:"βæ©è½å©ç¨ä¸"}),(0,E.jsx)(tM.h,{pt:"2"}),(0,E.jsx)(ec.N,{href:o,target:"_blank",_hover:{textDecoration:"none"},children:(0,E.jsxs)(el.$,{w:"full",variant:"outline",color:"blue",borderColor:"blue",borderWidth:"1px",_hover:{bg:"blue.50"},children:[(0,E.jsx)(eo.E,{maxW:"100%",overflow:"hidden",textOverflow:"ellipsis",children:o}),(0,E.jsx)(nf.zaF,{})]})})]}),(0,E.jsx)(ef.w,{borderColor:"gray.200"}),(0,E.jsxs)(es.B,{gap:"2",fontSize:"md",children:[(0,E.jsx)(el.$,{onClick:function(){return n(tv)},bg:ez.I.brand[500],color:"white",fontWeight:"normal",_hover:{bg:ez.I.brand[400]},children:r("siteSetting.siteDataEditing")}),(0,E.jsx)(tM.h,{pt:"4"}),(0,E.jsx)(nm,{onChange:function(){return(0,M.hj)(nb(nb({},t),{},{getOnlyDb:!(null!=t&&t.getOnlyDb)}))},checked:!(null!=t&&t.getOnlyDb),children:null!=t&&t.getOnlyDb?r("siteSetting.notionDataAcquisitionIsStopped"):r("siteSetting.notionDataIsBeingAutomaticallyUpdated")})]}),(0,E.jsx)(ef.w,{borderColor:"gray.200"}),(0,E.jsx)(es.B,{gap:"2",fontSize:"md",children:(0,E.jsx)(el.$,{onClick:function(){return n(tE)},bg:ez.I.brand[500],color:"white",fontWeight:"normal",_hover:{bg:ez.I.brand[400]},children:r("siteSetting.pageSetting")})}),(0,E.jsx)(ef.w,{borderColor:"gray.200"}),(0,E.jsx)(es.B,{gap:"2",fontSize:"md",children:(0,E.jsx)(el.$,{onClick:function(){return n(tw)},bg:ez.I.brand[500],color:"white",fontWeight:"normal",_hover:{bg:ez.I.brand[400]},children:r("siteSetting.siteDesignEditing")})}),(0,E.jsx)(ef.w,{borderColor:"gray.200"}),(0,E.jsx)(es.B,{gap:"2",fontSize:"md",children:(0,E.jsx)(el.$,{onClick:function(){return n(tP)},bg:ez.I.brand[500],color:"white",fontWeight:"normal",_hover:{bg:ez.I.brand[400]},children:r("siteSetting.sitePasswordSetting")})}),(0,E.jsx)(ef.w,{borderColor:"gray.200"}),(0,E.jsx)(es.B,{gap:"2",fontSize:"md",children:t.domain?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(el.$,{onClick:function(){return n(tC)},variant:"outline",borderColor:"orange.600",color:"orange.600",fontWeight:"normal",borderWidth:"1px",_hover:{bg:"orange.50"},children:r("siteSetting.ownDomainCancellation")}),t.redirectDomain?(0,E.jsx)(eo.E,{fontSize:"sm",color:"gray.600",children:r("siteSetting.redirectDomainLabel",{defaultValue:"ãªãã¤ã¬ã¯ã: {{domain}}",domain:t4.Ay.toUnicode(t.redirectDomain)})}):(0,E.jsx)(el.$,{onClick:function(){return n(tk)},variant:"outline",borderColor:ez.I.brand[500],color:ez.I.brand[500],fontWeight:"normal",borderWidth:"1px",size:"sm",_hover:{bg:ez.I.brand[50]},children:r("siteSetting.setupRedirectDomain",{defaultValue:"ãªãã¤ã¬ã¯ããã¡ã¤ã³è¨å®"})})]}):(0,E.jsx)(el.$,{onClick:function(){"basic"===a.plan||"relatives"===a.plan?n(tS):alert(r("siteSetting.ableToUseYourOwnDomain"))},bg:ez.I.brand[500],color:"white",fontWeight:"normal",_hover:{bg:ez.I.brand[400]},children:r("siteSetting.ownDomainSetting")})})]})})},nv=n(59965),nw=n(84649),ny=n(10508),nS=n(29943),nC=["icon","logo","label","disable","isActive"];function nk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function nO(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?nk(Object(n),!0).forEach(function(t){(0,B.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nk(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var nE=function(e){var t=e.icon,n=e.logo,r=e.label,i=e.disable,a=e.isActive,o=(0,ep.A)(e,nC);return(0,E.jsx)(el.$,nO(nO({variant:"ghost",bg:a?"gray.200":"inherit",justifyContent:"start",style:i?{opacity:.5,pointerEvents:"none"}:null,_hover:{bg:"gray.200"}},o),{},{children:(0,E.jsxs)(e8.z,{gap:"3",overflow:"hidden",children:[n?(0,E.jsx)(ei.a,{boxSize:"6",children:(0,E.jsx)(tz._,{src:n,alt:r+"ãµã¤ããã´",rounded:"4"})}):t,(0,E.jsx)(eo.E,{maxW:"100%",textOverflow:"ellipsis",overflow:"hidden",children:r})]})}))};function nP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}var nA=function(e){var t=e.plan,n=e.sites,r=e.navType,i=e.selectedSiteId,a=e.setNabType,o=e.setEditSiteData,s=e.setOpenModalType,l=e.handleCreateSite,c=e.handleCreateSiteNotionOfficialAPI,d=e.handleClickHamburgerMenu,u=e.handleClickMobilePreview,h=e.handleClickMobilePreviewClose,g=e.isVisibleHamburgerMenuButton,p=e.isVisibleMobilePreviewButton,m=e.isVisibleMobilePreviewCloseButton,f=(0,U.B)().t,x=(0,eM.A)({base:!0,lg:!1}),b=(0,nv.j)(),j=b.open,v=b.onToggle,w=b.onClose;return(0,E.jsx)(em.s,{flex:"1",backgroundColor:"gray.50",maxW:{base:"full",lg:"xs"},minW:{base:"full",lg:"xs"},py:{base:"4",lg:"8"},px:{base:"4",lg:"4"},style:x?{position:"fixed",top:0,width:"100%",maxWidth:"100%",height:j?"100vh":null,zIndex:1,WebkitOverflowScrolling:"touch"}:{},children:(0,E.jsx)(es.B,{justify:"space-between",gap:"1",width:"full",children:(0,E.jsxs)(es.B,{gap:"8",backgroundColor:"gray.50",children:[(0,E.jsxs)(em.s,{justify:"space-between",children:[(0,E.jsx)(eu,{style:{maxWidth:"180px"}}),x&&(0,E.jsxs)(em.s,{justify:"space-between",children:[m&&(0,E.jsx)(el.$,{color:"black",bg:"gray.300",marginLeft:2,onClick:function(){h()},children:(0,E.jsx)(tR.yGN,{})}),p&&(0,E.jsx)(el.$,{color:"black",bg:"gray.300",marginLeft:2,onClick:function(){u(),w()},children:(0,E.jsx)(ew.q5F,{})}),g&&(0,E.jsx)(el.$,{color:"black",bg:"gray.300",marginLeft:2,onClick:function(){d(),v()},children:(0,E.jsx)(nS.Jtp,{})})]})]}),(!x||j)&&(0,E.jsxs)(es.B,{pb:12,style:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nP(Object(n),!0).forEach(function(t){(0,B.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nP(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},x?{overflowY:"scroll",height:"calc(100vh - 40px - 3rem)"}:{}),children:[(0,E.jsx)(eo.E,{fontSize:"sm",color:"gray.500",fontWeight:"bold",mt:"4",children:f("nav.editSite")}),(0,E.jsxs)(es.B,{gap:"1",style:"free"===t?{pointerEvents:"none"}:null,children:[null==n?void 0:n.map(function(e){return(0,E.jsx)(nE,{label:e.siteName||e.id,logo:e.siteIcon,icon:(0,E.jsx)(ny.i3G,{}),disable:e.isNotPublic,isActive:i===e.id&&"site"===r,onClick:function(){a("site"),o(e),s(null),w()}},e.id)}),"free"!==t&&(0,E.jsx)(el.$,{onClick:l,bg:ez.I.brand[400],color:"white",fontWeight:"bold",_hover:{bg:ez.I.brand[600]},children:f("nav.registerNewSite")}),"free"!==t&&c&&(0,E.jsx)(el.$,{onClick:c,bg:"green",fontWeight:"bold",color:"white",_hover:{bg:"green.600"},children:f("nav.newSiteRegistrationÎeta")})]}),(0,E.jsx)(eo.E,{fontSize:"sm",color:"gray.500",fontWeight:"bold",mt:"4",children:f("nav.account")}),(0,E.jsxs)(es.B,{gap:"1",children:["relatives"!==t&&(0,E.jsx)(nE,{label:f("nav.paymentInformation"),icon:(0,E.jsx)(tR.lZI,{}),isActive:"billing"===r,onClick:function(){a("billing"),w()}}),(0,E.jsx)(nE,{label:f("nav.userInformation"),icon:(0,E.jsx)(tR.JXP,{}),isActive:"account"===r,onClick:function(){a("account"),w()}})]}),(0,E.jsx)(eo.E,{fontSize:"sm",color:"gray.500",fontWeight:"bold",mt:"4",children:f("nav.help")}),(0,E.jsx)(es.B,{gap:"1",children:(0,E.jsx)(nE,{label:f("nav.whenYouAreInTrouble"),isActive:"help"===r,icon:(0,E.jsx)(nw.awm,{}),onClick:function(){a("help"),w()}})}),$.Cu&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(eo.E,{fontSize:"sm",color:"gray.500",fontWeight:"bold",mt:"4",children:"éçºè
åã"}),(0,E.jsx)(es.B,{gap:"1",children:(0,E.jsx)(nE,{label:"Tailwind CSS ãã¹ã",isActive:"tailwindTest"===r,icon:(0,E.jsx)(nf.UWw,{}),onClick:function(){a("tailwindTest"),w()}})})]}),(0,E.jsx)(eH,{})]})]})})})},nT=function(e){var t,n,r,i=e.isOpen,a=e.authCode,o=e.onClose,s=(0,U.B)().t,l=(0,S.useState)(null),c=l[0],d=l[1],u=(0,S.useState)(!1);u[0],u[1];var h=(0,S.useState)(""),g=h[0],p=h[1],m=(0,S.useState)(""),f=m[0],x=m[1],b=(0,S.useState)(!1),j=b[0],w=b[1],C=(0,S.useState)(!1),k=C[0],O=C[1],P=(0,S.useState)(!1),A=P[0],T=P[1],D=(0,S.useState)(""),I=D[0],W=D[1],N=c?2:1,B=(t=(0,v.A)(y().mark(function e(t){return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,M.oC)({code:t,redirect_uri:location.origin+location.pathname});case 2:d(e.sent);case 4:case"end":return e.stop()}},e)})),function(e){return t.apply(this,arguments)}),_=(n=(0,v.A)(y().mark(function e(){return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,M.rr)({token:null==c?void 0:c.access_token,topPageUrl:f,siteId:g,tokens:c});case 2:alert(s("siteCreate.theSiteHasBeenCreatedYouCanAlsoChangeTheDesign")),o();case 4:case"end":return e.stop()}},e)})),function(){return n.apply(this,arguments)}),z=(r=(0,v.A)(y().mark(function e(){return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(g){e.next=2;break}return e.abrupt("return");case 2:return w(!0),O(!0),e.next=6,(0,M.OJ)(g);case 6:T(e.sent),w(!1);case 9:case"end":return e.stop()}},e)})),function(){return r.apply(this,arguments)});return(0,S.useEffect)(function(){i&&a&&(console.log(a),B(a)),i||(d(null),p(""))},[i,a]),(0,E.jsxs)(eY,{isOpen:i,onClose:o,contentHeight:"auto",contentWidth:"600px",children:[(0,E.jsxs)(ea.D,{as:"h2",size:"md",mb:"4",children:[s("siteCreate.siteRegistration")," Step",N]}),1===N&&(0,E.jsxs)(ei.a,{pb:6,children:[(0,E.jsxs)(eo.E,{fontSize:"sm",color:"gray.500",mb:3,children:[s("siteCreate.pleaseLinkTheNotionPageYouWantToPublish"),(0,E.jsx)("br",{}),"â»",s("siteCreate.youNeedToLogInWithTheNotionAccountLinkedWithTheSameBrowser")]}),(0,E.jsx)(el.$,{onClick:function(){var e="https://api.notion.com/v1/oauth/authorize?"+new URLSearchParams({owner:"user",client_id:$.sM,redirect_uri:location.origin+location.pathname,response_type:"code"}).toString();location.href=e},colorScheme:"brand",children:s("siteCreate.transitionToTheNotionLinkingScreen")})]}),2===N&&(0,E.jsxs)(ei.a,{pb:6,children:[(0,E.jsx)(eo.E,{fontSize:"sm",color:"gray.500",mb:3,children:s("siteCreate.pleaseSpecifyTheSiteId")}),(0,E.jsx)(eo.E,{fontWeight:"bold",mb:"2",children:s("siteCreate.3To32CharactersPleaseEnterInLowercase")}),(0,E.jsxs)(em.s,{gap:"4",alignItems:"center",flexWrap:"wrap",children:[(0,E.jsxs)(em.s,{maxWidth:480,minW:320,textAlign:"center",children:[(0,E.jsx)(e9.p,{minW:32,name:"id",placeholder:"myname",maxLength:32,value:g,onChange:function(e){p(e.target.value),T(!1),O(!1)}}),(0,E.jsxs)(eo.E,{children:[".",$.UA]})]}),k?(0,E.jsx)(eo.E,{as:"span",whiteSpace:"nowrap",children:j?null:A?s("siteCreate.ok")+"\uD83D\uDE46ââï¸":s("siteCreate.checkNg")+"\uD83D\uDE45ââï¸"}):(0,E.jsx)(el.$,{bg:ez.I.brand[500],_hover:{bg:ez.I.brand[400]},fontWeight:"normal",onClick:z,color:"white",disabled:!g||g.length<3||j,children:(0,E.jsx)(eo.E,{color:"white",children:s("siteCreate.checkIdIsAvailable")})})]}),(0,E.jsx)(eo.E,{mt:3,mb:3,children:s("siteCreate.enterThePageUrlOfThePageToSetOnTheTopPage")}),(0,E.jsx)(ei.a,{mb:"4",children:(0,E.jsx)(eA,{invalid:"topPageUrl"===I,errorText:s("siteCreate.enterTheUrlOfTheNotionPage"),children:(0,E.jsx)(e9.p,{name:"topPageUrl",placeholder:"https://www.notion.so/nabettu/c852ff3442c44ce18bc9a6bee3b5e85a",value:f,onChange:function(e){return x(e.target.value)},onBlur:function(e){var t=e.target,n=t.value,r=t.name;(n.startsWith($.rp)||n.includes($.tM))&&32===(0,e4.$)(n).length?W(""):W(r)}})})}),(0,E.jsx)(el.$,{onClick:_,colorScheme:"brand",disabled:!A||!g||!c||!!I||!f,children:s("siteCreate.registerTheSite")})]})]})},nD=function(e){var t,n,r=e.isOpen,i=e.onClose,a=e.sites,o=e.canHaveSiteNum,s=(0,U.B)().t,l=(0,S.useState)(!1),c=l[0],d=l[1],u=(0,S.useState)(""),h=u[0],g=u[1],p=(0,S.useState)(!1),m=p[0],f=p[1],x=(0,S.useState)([]),b=x[0],j=x[1],w=(t=(0,v.A)(y().mark(function e(){return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!m){e.next=2;break}return e.abrupt("return");case 2:if(0!==b.length){e.next=4;break}throw Error();case 4:f(!0);try{(0,M.ez)(b),alert(s("siteEditAlert.theSiteHasBeenDeleted")),C()}catch(e){alert(s("siteEditAlert.siteDeletionFailedPleaseContactTheSupport"))}finally{f(!1)}case 6:case"end":return e.stop()}},e)})),function(){return t.apply(this,arguments)}),C=function(){j([]),i()};if(!a)return null;var k=(n=(0,v.A)(y().mark(function e(){return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return d(!0),e.next=3,(0,M.Zz)();case 3:g(e.sent),d(!1);case 6:case"end":return e.stop()}},e)})),function(){return n.apply(this,arguments)});return(0,E.jsxs)(eY,{contentHeight:"600px",isOpen:r,isWindowChangeConfirm:!1,onSave:function(){return w()},saveBtnText:m?s("siteEdit.registering"):s("siteEdit.save&Return"),isDisableSaveBtn:a.length-b.length!==o,children:[(0,E.jsx)(ea.D,{as:"h2",size:"md",mb:"4",children:s("siteDelete.deleteSiteSelection")}),(0,E.jsx)(ei.a,{mb:"6",children:(0,E.jsx)(eo.E,{children:s("siteDelete.theNumberOfSitesYouOwnIsGreaterThanTheNumberOfContractedSites",{SITE_COUNT:null==a?void 0:a.length,HAVE_SITE_COUNT:o})})}),(0,E.jsx)(ei.a,{mb:"6",children:(0,E.jsxs)(na.T,{gap:"4",pb:"4",align:"start",children:[(0,E.jsx)(el.$,{colorScheme:"blue",disabled:c,onClick:k,children:s("siteDelete.changeNumberOfContacts")}
1),c&&(0,E.jsx)(eo.E,{children:s("billingScreen.pleaseWaitALittleForTheTransition")}),h&&(0,E.jsx)(ec.N,{color:"blue.600",href:h,children:s("billingScreen.ifYouDoNotTransitionAutomaticallyClickHere")})]})}),(0,E.jsx)(ei.a,{mb:"6",children:(0,E.jsx)(eo.E,{fontWeight:"bold",mb:"2",mt:"2",children:s("siteDelete.pleaseSelectTheSiteToBeDeleted")})}),(0,E.jsx)(ei.a,{mb:"6",children:(0,E.jsx)(eo.E,{children:s("siteDelete.ifYouDeleteASiteYouCannotReacquireItWithTheSameId")})}),null==a?void 0:a.map(function(e){return(0,E.jsx)(ei.a,{mb:"6",children:(0,E.jsxs)(ta,{checked:b.includes(e.id),id:"deleteSiteCheckbox-".concat(e.id),name:"deleteSiteCheckbox-".concat(e.id),onChange:function(t){var n=(0,e7.A)(b);t.target.checked?n.push(e.id):n=b.filter(function(t){return t!==e.id}),j(n)},children:[e.siteName?e.siteName+":":""," (ID: ",e.id,")"]})},e.id)})]})},nI=function(){return(0,E.jsxs)("div",{className:"tw-p-4 tw-bg-blue-100 tw-border tw-rounded tw-text-center",children:[(0,E.jsx)("h2",{className:"tw-text-xl tw-font-bold tw-text-blue-800 tw-mb-2",children:"Tailwind CSS ãã¹ã"}),(0,E.jsx)("p",{className:"tw-text-blue-600",children:"ãã®ã³ã³ãã¼ãã³ããæ£ããã¹ã¿ã¤ãªã³ã°ããã¦ããã°ãTailwindCSSãæ£å¸¸ã«åä½ãã¦ãã¾ãã"}),(0,E.jsx)("button",{className:"tw-mt-4 tw-px-4 tw-py-2 tw-bg-blue-500 tw-text-white tw-rounded tw-hover:tw-bg-blue-600 tw-transition-colors",children:"ãã¹ããã¿ã³"})]})},nW=function(){var e=(0,S.useState)(""),t=e[0],n=e[1],r=(0,S.useState)(""),i=r[0],a=r[1],o=(0,S.useState)(""),s=o[0],l=o[1],c=(0,S.useState)(""),d=c[0],u=c[1],h=function(e){e?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)?l(""):l("æ£ããã¡ã¼ã«ã¢ãã¬ã¹å½¢å¼ã§å
¥åãã¦ãã ãã"):l("ã¡ã¼ã«ã¢ãã¬ã¹ã¯å¿
é ã§ã")},g=function(e){e?e.length<6?u("ãã¹ã¯ã¼ãã¯6æå以ä¸ã§å
¥åãã¦ãã ãã"):u(""):u("ãã¹ã¯ã¼ãã¯å¿
é ã§ã")};return(0,E.jsx)("div",{className:"tw-min-h-screen tw-bg-gray-50 tw-py-8",children:(0,E.jsxs)("div",{className:"tw-max-w-4xl tw-mx-auto tw-px-4",children:[(0,E.jsx)("h1",{className:"tw-text-3xl tw-font-bold tw-text-gray-900 tw-mb-8 tw-text-center",children:"Tailwind CSS ã³ã³ãã¼ãã³ããã¹ã"}),(0,E.jsxs)("div",{className:"tw-mb-8",children:[(0,E.jsx)("h2",{className:"tw-text-xl tw-font-semibold tw-text-gray-800 tw-mb-4",children:"åºæ¬çãªTailwindCSSãã¹ã"}),(0,E.jsx)(nI,{})]}),(0,E.jsxs)("div",{className:"tw-bg-white tw-rounded-lg tw-shadow-md tw-p-6",children:[(0,E.jsx)("h2",{className:"tw-text-xl tw-font-semibold tw-text-gray-800 tw-mb-6",children:"ãã©ã¼ã ã³ã³ãã¼ãã³ããã¹ã"}),(0,E.jsxs)("form",{onSubmit:function(e){e.preventDefault(),h(t),g(i),!s&&!d&&t&&i&&alert("ãã©ã¼ã éä¿¡æåï¼\nEmail: "+t+"\nPassword: "+i)},className:"tw-space-y-6",children:[(0,E.jsx)(eA,{label:"åºæ¬çãªããã¹ããã£ã¼ã«ã",helperText:"ããã¯åºæ¬çãªããã¹ãå
¥åãã£ã¼ã«ãã§ã",children:(0,E.jsx)("input",{type:"text",placeholder:"ããã¹ããå
¥åãã¦ãã ãã",className:"tw-w-full tw-px-3 tw-py-2 tw-border tw-border-gray-300 tw-rounded-md tw-shadow-sm tw-text-sm focus:tw-outline-none focus:tw-ring-2 focus:tw-ring-blue-500 focus:tw-border-blue-500"})}),(0,E.jsx)(eB,{value:t,onChange:function(e){n(e.target.value),s&&h(e.target.value)},onBlur:function(e){return h(e.target.value)},invalid:!!s,errorText:s}),(0,E.jsx)(eI,{value:i,onChange:function(e){a(e.target.value),d&&g(e.target.value)},onBlur:function(e){return g(e.target.value)},invalid:!!d,errorText:d}),(0,E.jsx)(eA,{label:"ãªãã·ã§ãã«ãã£ã¼ã«ã",optionalText:"(ãªãã·ã§ã³)",helperText:"ãã®ãã£ã¼ã«ãã¯å
¥åããªãã¦ãæ§ãã¾ãã",children:(0,E.jsx)("input",{type:"text",placeholder:"ãªãã·ã§ãã«ãªå
¥å",className:"tw-w-full tw-px-3 tw-py-2 tw-border tw-border-gray-300 tw-rounded-md tw-shadow-sm tw-text-sm focus:tw-outline-none focus:tw-ring-2 focus:tw-ring-blue-500 focus:tw-border-blue-500"})}),(0,E.jsx)(eA,{label:"ã¨ã©ã¼ç¶æ
ã®ãã£ã¼ã«ã",errorText:"ãã®ãã£ã¼ã«ãã«ã¨ã©ã¼ãããã¾ã",
1invalid:!0,required:!0,children:(0,E.jsx)("input",{type:"text",placeholder:"ã¨ã©ã¼ç¶æ
ã®ä¾",className:"tw-w-full tw-px-3 tw-py-2 tw-border tw-border-red-300 tw-rounded-md tw-shadow-sm tw-text-sm tw-text-red-900 tw-placeholder-red-300 focus:tw-outline-none focus:tw-ring-2 focus:tw-ring-red-500 focus:tw-border-red-500"})}),(0,E.jsxs)("div",{className:"tw-flex tw-gap-4 tw-pt-4",children:[(0,E.jsx)("button",{type:"submit",className:"tw-flex-1 tw-bg-blue-600 tw-text-white tw-py-2 tw-px-4 tw-rounded-md tw-text-sm tw-font-medium hover:tw-bg-blue-700 focus:tw-outline-none focus:tw-ring-2 focus:tw-ring-offset-2 focus:tw-ring-blue-500 tw-transition-colors tw-duration-200",children:"éä¿¡"}),(0,E.jsx)("button",{type:"button",onClick:function(){n(""),a(""),l(""),u("")},className:"tw-flex-1 tw-bg-gray-600 tw-text-white tw-py-2 tw-px-4 tw-rounded-md tw-text-sm tw-font-medium hover:tw-bg-gray-700 focus:tw-outline-none focus:tw-ring-2 focus:tw-ring-offset-2 focus:tw-ring-gray-500 tw-transition-colors tw-duration-200",children:"ãªã»ãã"})]})]})]}),(0,E.jsxs)("div",{className:"tw-mt-8 tw-bg-white tw-rounded-lg tw-shadow-md tw-p-6",children:[(0,E.jsx)("h2",{className:"tw-text-xl tw-font-semibold tw-text-gray-800 tw-mb-4",children:"Tailwindã¯ã©ã¹ã®ä½¿ç¨ä¾"}),(0,E.jsxs)("div",{className:"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 lg:tw-grid-cols-3 tw-gap-4",children:[(0,E.jsxs)("div",{className:"tw-p-4 tw-bg-blue-100 tw-border tw-border-blue-300 tw-rounded-lg",children:[(0,E.jsx)("h3",{className:"tw-font-semibold tw-text-blue-800",children:"æ
å ±"}),(0,E.jsx)("p",{className:"tw-text-blue-600 tw-text-sm",children:"ããã¯æ
å ±ã¡ãã»ã¼ã¸ã§ã"})]}),(0,E.jsxs)("div",{className:"tw-p-4 tw-bg-green-100 tw-border tw-border-green-300 tw-rounded-lg",children:[(0,E.jsx)("h3",{className:"tw-font-semibold tw-text-green-800",children:"æå"}),(0,E.jsx)("p",{className:"tw-text-green-600 tw-text-sm",children:"ããã¯æåã¡ãã»ã¼ã¸ã§ã"})]}),(0,E.jsxs)("div",{className:"tw-p-4 tw-bg-red-100 tw-border tw-border-red-300 tw-rounded-lg",children:[(0,E.jsx)("h3",{className:"tw-font-semibold tw-text-red-800",children:"ã¨ã©ã¼"}),(0,E.jsx)("p",{className:"tw-text-red-600 tw-text-sm",children:"ããã¯ã¨ã©ã¼ã¡ãã»ã¼ã¸ã§ã"})]})]})]})]})})};function nN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}var nB=function(){var e,t=(0,U.B)().t,n=T().user,r=(0,eM.A)({base:!0,lg:!1}),i=(0,S.useState)(!1),a=i[0],o=i[1],s=(0,S.useState)(null),l=s[0],c=s[1],d=(0,S.useState)(null),u=d[0],h=d[1],g=(0,S.useState)(null),p=g[0],m=g[1],f=(0,S.useState)(n.plan),x=f[0],b=f[1],j=(0,S.useState)(!1),w=j[0],C=j[1],k=(0,S.useState)(-1),O=k[0],P=k[1],A=(0,S.useState)(""),D=A[0],I=A[1],W=(0,S.useState)(null),N=W[0],_=W[1],z=S.useRef(null==N?void 0:N.id),H=(0,S.useState)(""),L=H[0],F=H[1],R=$.Cu?"http://localhost:3000?siteid=".concat(null==N?void 0:N.id,"&realtimePreview=").concat(new Date().getTime()):"https://".concat((null==N?void 0:N.domain)||(null==N?void 0:N.id)+"."+$.UA,"?realtimePreview=").concat(new Date().getTime()),X=function(){c(null),I("")},q=(0,S.useCallback)(function(){"free"!==x&&(p&&!(null!=p&&p.length)||O>(null==p?void 0:p.length)||(0,$.kL)(null==n?void 0:n.email))?(c(tv),_(null)):alert(t("dashboard.pleaseIncreaseTheNumberOfSites"))},[O,x,p,t,null==n?void 0:n.email]);(0,S.useCallback)(function(){"relatives"===x||null!=n&&n.isBetaUser||(0,$.kL)(null==n?void 0:n.email)?(c(ty),_(null)):alert(t("dashboard.pleaseIncreaseTheNumberOfSites"))},[x,t,null==n?void 0:n.email,n.isBetaUser]),(0,S.useEffect)(function(){z.current=null==N?void 0:N.id;var e,t=(e=(0,v.A)(y().mark(function e(){return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,M.lA)(null==N?void 0:N.id);case 2:F(e.sent);case 4:case"end":return e.stop()}},e)})),function(){return e.apply(this,arguments)});null!=N&&N.hasSitePassword?t():F("")},[null==N?void 0:N.hasSitePassword,null==N?void 0:N.id,l]),(0,S.useEffect)(function(){p&&new URLSearchParams(location.search).get("code")&&history.pushState({},"",location.origin+location.pathname)},[p]),(0,S.useEffect)(function(){var e,t;return(0,v.A)(y().mark(function n(){return y().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,M.Dy)(function(e){m(e||[]),u?z.current&&e.forEach(function(e){e.id===z.current&&_(e)}
1):null!=e&&e.length&&"free"!==x?(h("site"),_(e[0])):h("billing")});case 2:return e=n.sent,n.next=5,(0,M.wM)(function(){var e=(0,v.A)(y().mark(function e(t){return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:b(t),"basic"===t&&(0,M.vF)(function(e){var t=0;e.map(function(e){null!=e&&e.quantity&&(t+=e.quantity)}),P(t)}),"trial"===t&&P(1);case 3:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}());case 5:return t=n.sent,n.t0=C,n.next=9,(0,M.qi)();case 9:n.t1=n.sent,(0,n.t0)(n.t1);case 11:case"end":return n.stop()}},n)}))(),function(){e&&e(),t&&t()}},[u,x]),(0,S.useEffect)(function(){!p||0===p.length||-1===O||p.length<=O||!x||"free"===x||null!=n&&n.isBetaUser||(c(tO),z.current=null,_(null))},[O,x]),(0,S.useEffect)(function(){o(!1)},[r]);var G=[tw,tE].some(function(e){return e===l});return(0,E.jsxs)(em.s,{as:"section",minH:"100vh",bg:"white",style:{flexDirection:r?"column":null,color:"black"},children:[!G&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(nA,{plan:x,sites:p,navType:u,selectedSiteId:null==N?void 0:N.id,setNabType:h,setEditSiteData:_,setOpenModalType:c,handleCreateSite:q,handleCreateSiteNotionOfficialAPI:null,handleClickMobilePreviewClose:function(){o(!1)},handleClickMobilePreview:function(){o(!0)},handleClickHamburgerMenu:function(){o(!1)},isVisibleHamburgerMenuButton:!a,isVisibleMobilePreviewButton:"site"===u&&N&&!a,isVisibleMobilePreviewCloseButton:a}),(0,E.jsxs)(em.s,{width:"100%",style:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nN(Object(n),!0).forEach(function(t){(0,B.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nN(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({flexDirection:"row"},r?{position:"fixed",top:"calc(40px + 2rem)",height:"calc(100vh - 40px - 2rem)"}:{}),children:["site"===u&&N&&(0,E.jsxs)(E.Fragment,{children:[!a&&(0,E.jsx)(em.s,{maxW:"100%",p:"8",children:(0,E.jsx)(nj,{site:N,setOpenModalType:c})}),(0,E.jsx)(tj,{url:R,timeStamp:null==N||null==(e=N.updatedAt)?void 0:e.toDate().getTime(),password:L})]}),"billing"===u&&(0,E.jsx)(em.s,{maxW:"100%",p:"8",children:(0,E.jsx)(nd,{sites:p,plan:x,canHaveSiteNum:O,hasPayed:w})}),"account"===u&&(0,E.jsx)(em.s,{maxW:"100%",p:"8",children:(0,E.jsx)(no,{})}),"help"===u&&(0,E.jsx)(em.s,{maxW:"100%",p:"8",children:(0,E.jsx)(ns,{})}),"noSiteDescription"===u&&(0,E.jsx)(em.s,{maxW:"100%",p:"8",children:(0,E.jsx)(nl,{})}),"tailwindTest"===u&&$.Cu&&(0,E.jsx)(em.s,{maxW:"100%",width:"100%",children:(0,E.jsx)(nW,{})})]})]}),(0,E.jsx)(tu,{isOpen:l===tv,siteData:N,onClose:X,setEditSiteData:_}),(0,E.jsx)(nT,{isOpen:l===ty,authCode:D,onClose:X}),(0,E.jsx)(tK,{isOpen:l===tE,siteData:N,sitePassword:L,onClose:X}),(0,E.jsx)(t0,{isOpen:l===tw,siteData:N,sitePassword:L,onClose:X}),(0,E.jsx)(nt,{isOpen:l===tS,siteData:N,onClose:X}),(0,E.jsx)(nt,{isOpen:l===tk,siteData:N,onClose:X,initialRedirectStep:!0}),(0,E.jsx)(nn,{isOpen:l===tC,siteData:N,onClose:X}),(0,E.jsx)(nD,{isOpen:l===tO,onClose:X,sites:p,canHaveSiteNum:O}),(0,E.jsx)(nr,{isOpen:l===tP,onClose:X,siteData:N})]})},n_=n(59051);n(3014);var nU=n(35214),nz=n(99482),nH="/images/favicon.png",nL=function(){var e=T(),t=e.user,n=e.loadingUser,r=(0,nz.G6)().setColorMode;return((0,S.useEffect)(function(){r("light")},[]),n)?(0,E.jsx)(n_.o,{bg:"gray.50",h:"100vh",children:(0,E.jsx)(t1.y,{borderWidth:"4px",animationDuration:"0.65s",color:ez.I.brand[400],size:"xl"})}):t?(0,E.jsx)(nB,{}):(0,E.jsx)(eR,{})},nF=function(){var e=(0,U.B)().t;return(0,S.useEffect)(function(){window.dataLayer=window.dataLayer||[],e("js",new Date),e("config","G-GKN1VYWHE6");function e(){dataLayer.push(arguments)}},[]),(0,E.jsx)(A,{children:(0,E.jsx)(N,{children:(0,E.jsx)(nU.K,{children:(0,E.jsxs)(nz.an,{forcedTheme:"light",children:[(0,E.jsxs)(j(),{children:[(0,E.jsx)("title",{className:"jsx-2617195109",children:e("common.title")}),(0,E.jsx)("link",{rel:"stylesheet",href:"/styles/admin-tailwind.css",className:"jsx-2617195109"}),(0,E.jsx)("link",{rel:"apple-touch-icon",href:nH,className:"jsx-2617195109"}),(0,E.jsx)("link",{rel:"icon",href:nH,className:"jsx-2617195109"}),(0,E.jsx)("script",{async:!0,src:"https://js.stripe.com/v3/",className:"jsx-2617195109"}),(0,E.jsx)("script",{async:!0,src:"https://www.googletagmanager.com/gtag/js?i
1d=G-GKN1VYWHE6",className:"jsx-2617195109"}),(0,E.jsx)("script",{dangerouslySetInnerHTML:{__html:"\n (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':\n new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],\n j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=\n 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);\n })(window,document,'script','dataLayer', '".concat($.zs,"');\n ")},className:"jsx-2617195109"})]}),(0,E.jsx)("noscript",{dangerouslySetInnerHTML:{__html:'\n <iframe\n src="https://www.googletagmanager.com/ns.html?id='.concat($.zs,'"\n height="0"\n width="0"\n style="display:none;visibility:hidden"\n />')},className:"jsx-2617195109"}),(0,E.jsx)("div",{className:"jsx-2617195109 admin-container",children:(0,E.jsx)(nL,{})}),(0,E.jsx)(x(),{id:"2617195109",children:["summary{padding:4px;cursor:pointer;}","summary:hover{background-color:#eee;border-radius:2px;}",'input[type="color"]{cursor:pointer;border:none;}',".admin-container button{padding-left:1rem !important;padding-right:1rem !important;}",".admin-container input{border-width:1px;padding-left:0.5rem;padding-right:0.5rem;}",".admin-container textarea{border-width:1px;padding:0.5rem;}"]})]})})})})};let nR=nF},35214:(e,t,n)=>{n.d(t,{K:()=>c});var r=n(42969),i=n(60307),a=n(74815),o=n(99482),s=n(37876);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function c(e){return(0,s.jsx)(i.s,{value:a.$m,children:(0,s.jsx)(o.an,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach(function(t){(0,r.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},e))})}},51357:e=>{e.exports=JSON.parse('[["Abkhazian","ab"],["Afar","aa"],["Afrikaans","af"],["Akan","ak"],["Albanian","sq"],["Amharic","am"],["Arabic","ar"],["Aragonese","an"],["Armenian","hy"],["Assamese","as"],["Avaric","av"],["Avestan","ae"],["Aymara","ay"],["Azerbaijani","az"],["Bambara","bm"],["Bashkir","ba"],["Basque","eu"],["Belarusian","be"],["Bengali (Bangla)","bn"],["Bihari","bh"],["Bislama","bi"],["Bosnian","bs"],["Breton","br"],["Bulgarian","bg"],["Burmese","my"],["Catalan","ca"],["Chamorro","ch"],["Chechen","ce"],["Chichewa, Chewa, Nyanja","ny"],["Chinese","zh"],["Chinese (Simplified)","zh-Hans"],["Chinese (Traditional)","zh-Hant"],["Chuvash","cv"],["Cornish","kw"],["Corsican","co"],["Cree","cr"],["Croatian","hr"],["Czech","cs"],["Danish","da"],["Divehi, Dhivehi, Maldivian","dv"],["Dutch","nl"],["Dzongkha","dz"],["English","en"],["Esperanto","eo"],["Estonian","et"],["Ewe","ee"],["Faroese","fo"],["Fijian","fj"],["Finnish","fi"],["French","fr"],["Fula, Fulah, Pulaar, Pular","ff"],["Galician","gl"],["Gaelic (Scottish)","gd"],["Gaelic (Manx)","gv"],["Georgian","ka"],["German","de"],["Greek","el"],["Greenlandic","kl"],["Guarani","gn"],["Gujarati","gu"],["Haitian Creole","ht"],["Hausa","ha"],["Hebrew","he"],["Herero","hz"],["Hindi","hi"],["Hiri Motu","ho"],["Hungarian","hu"],["Icelandic","is"],["Ido","io"],["Igbo","ig"],["Indonesian","in"],["Interlingua","ia"],["Interlingue","ie"],["Inuktitut","iu"],["Inupiak","ik"],["Irish","ga"],["Italian","it"],["æ¥æ¬èª","ja"],["Javanese","jv"],["Kalaallisut, Greenlandic","kl"],["Kannada","kn"],["Kanuri","kr"],["Kashmiri","ks"],["Kazakh","kk"],["Khmer","km"],["Kikuyu","ki"],["Kinyarwanda (Rwanda)","rw"],["Kirundi","rn"],["Kyrgyz","ky"],["Komi","kv"],["Kongo","kg"],["Korean","ko"],["Kurdish","ku"],["Kwanyama","kj"],["Lao","lo"],["Latin","la"],["Latvian (Lettish)","lv"],["Limburgish ( Limburger)","li"],["Lingala","ln"],["Lithuanian","lt"],["Luga-Katanga","lu"],["Luganda, Ganda","lg"],["Luxembourgish","lb"],["Manx","gv"],["Macedonian","mk"],["Malagasy","mg"],["Malay","ms"],["Malayalam","ml"],["Maltese","mt"],["Maori","mi"],["Marathi","mr"],["Marshallese","mh"],["Moldavian","mo"],["Mongolian","mn"],["Nauru","na"],["Navajo","nv"],["Ndonga","ng"],["Northern Ndebele","nd"],["Nepali","ne"],["Norweg
1ian","no"],["Norwegian bokm\xe5l","nb"],["Norwegian nynorsk","nn"],["Nuosu","ii"],["Occitan","oc"],["Ojibwe","oj"],["Old Church Slavonic, Old Bulgarian","cu"],["Oriya","or"],["Oromo (Afaan Oromo)","om"],["Ossetian","os"],["PÄli","pi"],["Pashto, Pushto","ps"],["Persian (Farsi)","fa"],["Polish","pl"],["Portuguese","pt"],["Punjabi (Eastern)","pa"],["Quechua","qu"],["Romansh","rm"],["Romanian","ro"],["Russian","ru"],["Sami","se"],["Samoan","sm"],["Sango","sg"],["Sanskrit","sa"],["Serbian","sr"],["Serbo-Croatian","sh"],["Sesotho","st"],["Setswana","tn"],["Shona","sn"],["Sichuan Yi","ii"],["Sindhi","sd"],["Sinhalese","si"],["Siswati","ss"],["Slovak","sk"],["Slovenian","sl"],["Somali","so"],["Southern Ndebele","nr"],["Spanish","es"],["Sundanese","su"],["Swahili (Kiswahili)","sw"],["Swati","ss"],["Swedish","sv"],["Tagalog","tl"],["Tahitian","ty"],["Tajik","tg"],["Tamil","ta"],["Tatar","tt"],["Telugu","te"],["Thai","th"],["Tibetan","bo"],["Tigrinya","ti"],["Tonga","to"],["Tsonga","ts"],["Turkish","tr"],["Turkmen","tk"],["Twi","tw"],["Uyghur","ug"],["Ukrainian","uk"],["Urdu","ur"],["Uzbek","uz"],["Venda","ve"],["Vietnamese","vi"],["Volap\xfck","vo"],["Wallon","wa"],["Welsh","cy"],["Wolof","wo"],["Western Frisian","fy"],["Xhosa","xh"],["Yiddish","yi, ji"],["Yoruba","yo"],["Zhuang, Chuang","za"],["Zulu","zu"]]')}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.