1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,568673,e=>{"use strict";let t=(0,e.i(139318).default)("log-out",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);e.s(["LogOut",0,t],568673)},534360,e=>{"use strict";let t="'PingFang TC', 'Microsoft JhengHei', 'Hiragino Sans'",r={sans:`-apple-system, BlinkMacSystemFont, 'Segoe UI', var(--font-noto-sans-tc), 'Noto Sans TC', ${t}, sans-serif`,serif:"Georgia, 'Times New Roman', 'Noto Serif TC', 'Songti TC', 'Hiragino Mincho ProN', 'PMingLiU', serif",rounded:`'SF Pro Rounded', 'Varela Round', var(--font-noto-sans-tc), 'Noto Sans TC', ${t}, system-ui, sans-serif`,mono:"ui-monospace, 'SF Mono', 'Cascadia Code', Menlo, monospace"};e.s(["DEFAULT_DISPLAY_FONT_WEIGHTS",0,["400","700"],"DESIGN_DISPLAY_FONT_OPTIONS",0,["Rajdhani","Barlow Condensed","Antonio","Teko","Bebas Neue","Oswald","Archivo Narrow","Chakra Petch","Saira Condensed","Anton"],"DESIGN_FONT_FAMILY_OPTIONS",0,["sans","serif","rounded","mono"],"DESIGN_SYSTEM_DEFAULT",0,{colors:{primary:"#2563eb",secondary:"#7c3aed",background:"#ffffff",foreground:"#111827"},radius:"md",typography:{fontFamily:"sans",baseSize:16}},"DESIGN_SYSTEM_SETTING_KEY",0,"site.design_system","DISPLAY_FONT_WEIGHT_PATTERN",0,/^[1-9]00$/,"FONT_FAMILY_STACK",0,r,"MAX_DISPLAY_FONT_WEIGHTS",0,4,"RADIUS_SCALE_OPTIONS",0,["none","sm","md","lg","full"],"RADIUS_SCALE_PX",0,{none:{sm:"0px",md:"0px",lg:"0px"},sm:{sm:"2px",md:"4px",lg:"6px"},md:{sm:"4px",md:"8px",lg:"12px"},lg:{sm:"8px",md:"12px",lg:"16px"},full:{sm:"9999px",md:"9999px",lg:"9999px"}},"RENDER_MODE_SETTING_KEY",0,"site.render_mode","isHexColor",0,function(e){return"string"==typeof e&&/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(e)}])},631825,214161,736420,e=>{"use strict";var t=e.i(647083),r=e.i(377339);e.i(390607);let n="site.admin_palette",i=["default","warm"],a="default";function l(e){return"string"==typeof e&&i.includes(e)?e:a}e.s(["ADMIN_PALETTES",0,i,"ADMIN_PALETTE_SETTING_KEY",0,n,"DEFAULT_ADMIN_PALETTE",0,a,"resolveAdminPalette",0,l],214161);var o=e.i(534360);let s=new Set(["zenbu","zenbusite","zenbusites","zenbucms","zenbuapps"]);function u(e){if("string"!=typeof e)return null;let t=e.trim();return 0===t.length?null:s.has(t.replace(/[\s\-_.]+/g,"").toLowerCase().replace(/\d+$/,""))?null:t}let c=new Set(["localhost","127.0.0.1","0.0.0.0","::1"]);e.s(["resolveAdminBrandLabel",0,function(e,t){if(e&&e.trim().length>0)return e.trim();if("string"!=typeof t)return"";let r=t.trim().toLowerCase().replace(/:\d+$/,"").replace(/^www\./,"");return 0===r.length||c.has(r)?"":r},"resolveTenantBrandName",0,u],736420);let d="zenbu_site_settings_v1",f=i.filter(e=>e!==a);JSON.stringify(d),JSON.stringify(f);let p={name:"",configuredName:null,logoUrl:null,faviconUrl:null,defaultOgImage:null,activeTheme:"default",renderMode:"theme",adminPalette:a};function m(e){if("string"!=typeof e)return null;let t=e.trim();return 0===t.length?null:t}let h=null,g=null,y=null,x="site-settings-changed";function b(){return y=(0,r.apiFetch)("/v1/public/settings",{cache:"no-store"}).then(e=>{let t,r;t=m(e["site.name"]),r=m(e["site.active_theme"]),h={name:t??p.name,configuredName:u(e["site.name"]),logoUrl:m(e["site.logo_url"]),faviconUrl:m(e["site.favicon_url"]),defaultOgImage:m(e["site.default_og_image"]),activeTheme:r??p.activeTheme,renderMode:"design-system"===e[o.RENDER_MODE_SETTING_KEY]?"design-system":"theme",adminPalette:l(e[n])},g=Date.now();var i=h;try{window.localStorage.setItem(d,JSON.stringify(i))}catch{}return h}).catch(()=>(h={...p},g=Date.now(),h)).finally(()=>{y=null})}async function v(){return h||y||b()}function S(){return null===g||Date.now()-g>3e4}async function w(){return y||b()}e.s(["invalidateSiteSettingsCache",0,function(){h=null,g=null,window.dispatchEvent(new Event(x))},"useSiteSettings",0,function(){let[e,r]=(0,t.useState)(()=>{if(h)return h;let e=function(){try{let e=window.localStorage.getItem(d);if(!e)return null;let t=JSON.parse(e);if(!t||"object"!=typeof t)return null;return{name:"string"==typeof t.name?t.name:p.name,configuredName:u(t.configuredName),logoUrl:"string"==typeof t.logoUrl?t.logoUrl:null,faviconUrl:"string"==typeof t.faviconUrl?t.faviconUrl:null,defaultOgImage:"string"==typeof t.defaultOgImage?t.defaultOgImage:null,activeTheme:"string"==typeof t.activeTheme?t.activeTheme:p.activeTheme,renderMode:"design-system"===t.renderMode?"design-system":"theme",adminPalette:l(t.adminPalette)}}catch{return null}}();return e?(h=e,e):{...p}}),[n,i]=(0,t.useState)(null===h);return(0,t.useEffect)(()=>{let e=!1,t=()=>
1{v().then(t=>{e||(r(t),i(!1))})},n=()=>{w().then(t=>{e||r(t)})};h?(r(h),i(!1),S()&&n()):t();let a=()=>{S()&&n()},l=()=>{"visible"===document.visibilityState&&a()};return window.addEventListener(x,t),window.addEventListener("focus",a),document.addEventListener("visibilitychange",l),()=>{e=!0,window.removeEventListener(x,t),window.removeEventListener("focus",a),document.removeEventListener("visibilitychange",l)}},[]),{settings:e,loading:n}}],631825)},946532,e=>{"use strict";let t=(0,e.i(139318).default)("calendar-days",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]]);e.s(["CalendarDays",0,t],946532)},383342,e=>{"use strict";let t=(0,e.i(139318).default)("shopping-cart",[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]]);e.s(["ShoppingCart",0,t],383342)},670290,e=>{"use strict";let t=(0,e.i(139318).default)("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);e.s(["Star",0,t],670290)},115834,903970,e=>{"use strict";e.i(390607);let t=new Set(["TWD","JPY","KRW"]);function r(e){let t=e?.trim();return t?t.toUpperCase():"TWD"}function n(e){return 2*!t.has(r(e))}function i(e){return e&&""!==e.trim()?e:"TWD"}function a(e){return"string"==typeof e?Number(e):e}function l(e,t){return e.toLocaleString("zh-TW",{minimumFractionDigits:t,maximumFractionDigits:t})}e.s(["currencyFractionDigits",0,n,"normalizeCurrencyCode",0,r],903970),e.s(["formatAmount",0,function(e,t="TWD"){if(null==e||""===e)return"0";let r=a(e);return Number.isFinite(r)?l(r,n(i(t))):"0"},"formatMoney",0,function(e,t="TWD"){if(null==e||""===e)return"";let o=i(t),s=a(e);if(!Number.isFinite(s))return String(e);let u=n(o);if("TWD"===r(o))return`NT$ ${l(s,u)}`;try{return new Intl.NumberFormat("zh-TW",{style:"currency",currency:o,minimumFractionDigits:u,maximumFractionDigits:u}).format(s)}catch{return`${o} ${l(s,u)}`}},"toPriceNumber",0,function(e){let t=Number(e);return Number.isFinite(t)?t:0}],115834)},451497,e=>{"use strict";let t=(0,e.i(139318).default)("play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);e.s(["Play",0,t],451497)},760172,e=>{"use strict";let t=(0,e.i(139318).default)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);e.s(["RefreshCw",0,t],760172)},708488,698114,e=>{"use strict";var t=e.i(647083),r=e.i(377339);let n="Asia/Taipei",i="commerce.timezone";e.s(["COMMON_TIMEZONES",0,[{value:"Asia/Taipei",labelKey:"tzAsiaTaipei"},{value:"Asia/Tokyo",labelKey:"tzAsiaTokyo"},{value:"Asia/Shanghai",labelKey:"tzAsiaShanghai"},{value:"Asia/Hong_Kong",labelKey:"tzAsiaHongKong"},{value:"Asia/Seoul",labelKey:"tzAsiaSeoul"},{value:"Asia/Singapore",labelKey:"tzAsiaSingapore"},{value:"Asia/Kuala_Lumpur",labelKey:"tzAsiaKualaLumpur"},{value:"Asia/Bangkok",labelKey:"tzAsiaBangkok"},{value:"UTC",labelKey:"tzUtc"},{value:"America/New_York",labelKey:"tzAmericaNewYork"},{value:"America/Los_Angeles",labelKey:"tzAmericaLosAngeles"},{value:"Europe/London",labelKey:"tzEuropeLondon"},{value:"Europe/Paris",labelKey:"tzEuropeParis"},{value:"Australia/Sydney",labelKey:"tzAustraliaSydney"}],"DEFAULT_SHOP_TIMEZONE",0,n,"TIMEZONE_SETTING_KEY",0,i],698114);
1let a=null,l=null,o="shop-timezone-changed";async function s(){return a||l||(l=(0,r.apiFetch)("/v1/public/settings",{cache:"no-store"}).then(e=>{let t=e[i];return a=!function(e){if("string"!=typeof e||0===e.trim().length)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}),!0}catch{return!1}}(t)?n:t}).catch(()=>a=n).finally(()=>{l=null}))}e.s(["invalidateShopTimezoneCache",0,function(){a=null,window.dispatchEvent(new Event(o))},"useShopTimezone",0,function(){let[e,r]=(0,t.useState)(()=>a??n),[i,l]=(0,t.useState)(null===a);return(0,t.useEffect)(()=>{let e=!1,t=()=>{s().then(t=>{e||(r(t),l(!1))})};return a?(r(a),l(!1)):t(),window.addEventListener(o,t),()=>{e=!0,window.removeEventListener(o,t)}},[]),{timeZone:e,loading:i}}],708488)},615983,e=>{"use strict";let t="Asia/Taipei",r=(e,t,r)=>{let n=new Intl.DateTimeFormat("en-CA",{timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hourCycle:"h23"}).formatToParts(e),i=e=>n.find(t=>t.type===e)?.value??"",a=`${i("hour")}:${i("minute")}`;if("time"===r)return a;let l=`${i("year")}-${i("month")}-${i("day")}`;return"date"===r?l:`${l} ${a}`};e.s(["formatInTimeZone",0,function(e,n,i="datetime"){if(null==e)return"â";let a=e instanceof Date?e:new Date(e);if(Number.isNaN(a.getTime()))return"â";try{return r(a,n||t,i)}catch{return r(a,t,i)}}])},650126,e=>{"use strict";let t=(0,e.i(139318).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["ChevronDown",0,t],650126)},914506,e=>{"use strict";let t=(0,e.i(139318).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",0,t],914506)},139318,e=>{"use strict";var t=e.i(647083);let r=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)},n=(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim();var i={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let a=(0,t.forwardRef)(({color:e="currentColor",size:r=24,strokeWidth:a=2,absoluteStrokeWidth:l,className:o="",children:s,iconNode:u,...c},d)=>(0,t.createElement)("svg",{ref:d,...i,width:r,height:r,stroke:e,strokeWidth:l?24*Number(a)/Number(r):a,className:n("lucide",o),...!s&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(c)&&{"aria-hidden":"true"},...c},[...u.map(([e,r])=>(0,t.createElement)(e,r)),...Array.isArray(s)?s:[s]]));e.s(["default",0,(e,i)=>{let l=(0,t.forwardRef)(({className:l,...o},s)=>(0,t.createElement)(a,{ref:s,iconNode:i,className:n(`lucide-${r(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,l),...o}));return l.displayName=r(e),l}],139318)},349173,e=>{"use strict";var t=e.i(200241);function r(e,t){return(...e)=>{try{return t(...e)}catch{throw Error(void 0)}}}let n=r(0,t.useTranslations);r(0,t.useFormatter),e.s(["useTranslations",0,n])},9448,e=>{"use strict";let t=(0,e.i(139318).default)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["CheckCircle2",0,t],9448)},190435,e=>{"use strict";let t=(0,e.i(139318).default)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);e.s(["Info",0,t],190435)},197280,e=>{"use strict";let t=(0,e.i(139318).default)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["AlertCircle",0,t],197280)},78469,(e,t,r)=>{},600515,(e,t,r)=>{var n=e.i(399453);e.r(78469);var i=e.r(647083),a=i&&"object"==typeof i&&"default"in i?i:{default:i},l=void 0!==n.default&&n.default.env&&!0,o=function(e){return"[object String]"===Object.prototype.toString.call(e)},s=function(){function e(e){var t=void 0===e?{}:e,r=t.name,n=void 0===r?"stylesheet":r,i=t.optimizeForSpeed,a=void 0===i?l:i;u(o(n),"`name` must be a string"),this._name=n,this._deletedRulePlaceholder="#"+n+"-deleted-rule____{}",u("boolean"==typeof a,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=a,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0;var s="u">typeof window&&document.querySelector('meta[property="csp-nonce"]');this._nonce=s?s.getAttribute("content"):null}var t,r=e.prototype;return r.setOptimizeForSpeed=function(e){u("boolean"==typeof e,"`setOptimizeForSpeed` accepts a boolean"),u(0===this._rulesCount,"optimizeForSpeed cannot be when rules have already been inserted"),this.flush(),this._optimizeForSpeed=e,this.inject()},r.isOptimizeForSpeed=function(){return this._optimizeForSpeed},r.inject=function(){var e=this;if(u(!this._injected,"sheet already injected"),this._injected=!0,"u">typeof window&&this._optimizeForSpeed){this._tags[0]=this.makeStyleTag(this._name),this._optimizeForSpeed="insertRule"in this.get
1Sheet(),this._optimizeForSpeed||(l||console.warn("StyleSheet: optimizeForSpeed mode not supported falling back to standard mode."),this.flush(),this._injected=!0);return}this._serverSheet={cssRules:[],insertRule:function(t,r){return"number"==typeof r?e._serverSheet.cssRules[r]={cssText:t}:e._serverSheet.cssRules.push({cssText:t}),r},deleteRule:function(t){e._serverSheet.cssRules[t]=null}}},r.getSheetForTag=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]},r.getSheet=function(){return this.getSheetForTag(this._tags[this._tags.length-1])},r.insertRule=function(e,t){if(u(o(e),"`insertRule` accepts only strings"),"u"<typeof window)return"number"!=typeof t&&(t=this._serverSheet.cssRules.length),this._serverSheet.insertRule(e,t),this._rulesCount++;if(this._optimizeForSpeed){var r=this.getSheet();"number"!=typeof t&&(t=r.cssRules.length);try{r.insertRule(e,t)}catch(t){return l||console.warn("StyleSheet: illegal rule: \n\n"+e+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),-1}}else{var n=this._tags[t];this._tags.push(this.makeStyleTag(this._name,e,n))}return this._rulesCount++},r.replaceRule=function(e,t){if(this._optimizeForSpeed||"u"<typeof window){var r="u">typeof window?this.getSheet():this._serverSheet;if(t.trim()||(t=this._deletedRulePlaceholder),!r.cssRules[e])return e;r.deleteRule(e);try{r.insertRule(t,e)}catch(n){l||console.warn("StyleSheet: illegal rule: \n\n"+t+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),r.insertRule(this._deletedRulePlaceholder,e)}}else{var n=this._tags[e];u(n,"old rule at index `"+e+"` not found"),n.textContent=t}return e},r.deleteRule=function(e){if("u"<typeof window)return void this._serverSheet.deleteRule(e);if(this._optimizeForSpeed)this.replaceRule(e,"");else{var t=this._tags[e];u(t,"rule at index `"+e+"` not found"),t.parentNode.removeChild(t),this._tags[e]=null}},r.flush=function(){this._injected=!1,this._rulesCount=0,"u">
1typeof window?(this._tags.forEach(function(e){return e&&e.parentNode.removeChild(e)}),this._tags=[]):this._serverSheet.cssRules=[]},r.cssRules=function(){var e=this;return"u"<typeof window?this._serverSheet.cssRules:this._tags.reduce(function(t,r){return r?t=t.concat(Array.prototype.map.call(e.getSheetForTag(r).cssRules,function(t){return t.cssText===e._deletedRulePlaceholder?null:t})):t.push(null),t},[])},r.makeStyleTag=function(e,t,r){t&&u(o(t),"makeStyleTag accepts only strings as second parameter");var n=document.createElement("style");this._nonce&&n.setAttribute("nonce",this._nonce),n.type="text/css",n.setAttribute("data-"+e,""),t&&n.appendChild(document.createTextNode(t));var i=document.head||document.getElementsByTagName("head")[0];return r?i.insertBefore(n,r):i.appendChild(n),n},t=[{key:"length",get:function(){return this._rulesCount}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(e.prototype,t),e}();function u(e,t){if(!e)throw Error("StyleSheet: "+t+".")}var c=function(e){for(var t=5381,r=e.length;r;)t=33*t^e.charCodeAt(--r);return t>>>0},d={};function f(e,t){if(!t)return"jsx-"+e;var r=String(t),n=e+r;return d[n]||(d[n]="jsx-"+c(e+"-"+r)),d[n]}function p(e,t){"u"<typeof window&&(t=t.replace(/\/style/gi,"\\/style"));var r=e+t;return d[r]||(d[r]=t.replace(/__jsx-style-dynamic-selector/g,e)),d[r]}var m=function(){function e(e){var t=void 0===e?{}:e,r=t.styleSheet,n=void 0===r?null:r,i=t.optimizeForSpeed,a=void 0!==i&&i;this._sheet=n||new s({name:"styled-jsx",optimizeForSpeed:a}),this._sheet.inject(),n&&"boolean"==typeof a&&(this._sheet.setOptimizeForSpeed(a),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer=void 0,this._indices={},this._instancesCounts={}}var t=e.prototype;return t.add=function(e){var t=this;void 0===this._optimizeForSpeed&&(this._optimizeForSpeed=Array.isArray(e.children),this._sheet.setOptimizeForSpeed(this._optimizeForSpeed),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),"u">typeof window&&!this._fromServer&&(this._fromServer=this.selectFromServer(),this._instancesCounts=Object.keys(this._fromServer).reduce(function(e,t){return e[t]=0,e},{}));var r=this.getIdAndRules(e),n=r.styleId,i=r.rules;if(n in this._instancesCounts){this._instancesCounts[n]+=1;return}var a=i.map(function(e){return t._sheet.insertRule(e)}).filter(function(e){return -1!==e});this._indices[n]=a,this._instancesCounts[n]=1},t.remove=function(e){var t=this,r=this.getIdAndRules(e).styleId;if(function(e,t){if(!e)throw Error("StyleSheetRegistry: "+t+".")}(r in this._instancesCounts,"styleId: `"+r+"` not found"),this._instancesCounts[r]-=1,this._instancesCounts[r]<1){var n=this._fromServer&&this._fromServer[r];n?(n.parentNode.removeChild(n),delete this._fromServer[r]):(this._indices[r].forEach(function(e){return t._sheet.deleteRule(e)}),delete this._indices[r]),delete this._instancesCounts[r]}},t.update=function(e,t){this.add(t),this.remove(e)},t.flush=function(){this._sheet.flush(),this._sheet.inject(),this._fromServer=void 0,this._indices={},this._instancesCounts={}},t.cssRules=function(){var e=this,t=this._fromServer?Object.keys(this._fromServer).map(function(t){return[t,e._fromServer[t]]}):[],r=this._sheet.cssRules();return t.concat(Object.keys(this._indices).map(function(t){return[t,e._indices[t].map(function(e){return r[e].cssText}).join(e._optimizeForSpeed?"":"\n")]}).filter(function(e){return!!e[1]}))},t.styles=function(e){var t,r;return t=this.cssRules(),void 0===(r=e)&&(r={}),t.map(function(e){var t=e[0],n=e[1];return a.default.createElement("style",{id:"__"+t,key:"__"+t,nonce:r.nonce?r.nonce:void 0,dangerouslySetInnerHTML:{__html:n}})})},t.getIdAndRules=function(e){var t=e.children,r=e.dynamic,n=e.id;if(r){var i=f(n,r);return{styleId:i,rules:Array.isArray(t)?t.map(function(e){return p(i,e)}):[p(i,t)]}}return{styleId:f(n),rules:Array.isArray(t)?t:[t]}},t.selectFromServer=function(){return Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]')).reduce(function(e,t){return e[t.id.slice(2)]=t,e},{})},e}(),h=i.createContext(null);function g(){return new m}function y(){return i.useContext(h)}h.displayName="StyleSheetContext";var x=a.default.useInsertionEffect||a.default.useLayoutEffect,b="u">typeof window?g():void 0;function v(e){var t=b||y();return t&&("u"<typeof window?t.add(e):x(function(){return t.add(e),function(){t.remove(e)}},[e.id,String(e.dynamic)])),null}v.dynamic=function(e){return e.map(function(e){return f(e[0],e[1])}).join(" ")},r.StyleRegistry=function(e){var t=e.registry,r=e.children,n=i.useContext(h),l=i.useState(function(){return n||t||g()})[0];return a.default.createElement(h.Provider,{value:l},r)},r.createStyleRegistry=g,r.style=v,r.useStyleRegistry=y},569304,(e,t,r)=>{t.exports=e.r(600515).style},296473,e=>{"use strict";var t=e.i(23995),r=e.i(569304),n=e.i(984344),i=e.i(9448),a=e.i(197280),l=e.i(190435),o=e.i(647083);let s=(0,o.createContext)(null);function u({item:e,onDone:s}
1){(0,o.useEffect)(()=>{let e=setTimeout(s,3e3);return()=>clearTimeout(e)},[s]);let c="success"===e.variant?i.CheckCircle2:"error"===e.variant?a.AlertCircle:l.Info,d="success"===e.variant?"text-[var(--color-success)]":"error"===e.variant?"text-[var(--color-error)]":"text-[var(--color-brand)]";return(0,t.jsxs)("div",{className:"jsx-a50fcf8dc960b0ac pointer-events-auto card px-4 py-3 flex items-center gap-3 min-w-[260px] max-w-[380px] shadow-lg zb-toast-card",children:[(0,t.jsx)(c,{size:18,className:"jsx-a50fcf8dc960b0ac "+d+" flex-shrink-0"}),(0,t.jsx)("span",{className:"jsx-a50fcf8dc960b0ac text-sm text-[var(--color-text-primary)] flex-1",children:e.message}),e.action&&(e.action.href?(0,t.jsx)(n.default,{href:e.action.href,onClick:s,className:"text-sm font-semibold text-[var(--color-brand)] hover:underline whitespace-nowrap",children:e.action.label}):(0,t.jsx)("button",{type:"button",onClick:()=>{e.action?.onClick?.(),s()},className:"jsx-a50fcf8dc960b0ac text-sm font-semibold text-[var(--color-brand)] hover:underline whitespace-nowrap",children:e.action.label})),(0,t.jsx)(r.default,{id:"a50fcf8dc960b0ac",children:".zb-toast-card.jsx-a50fcf8dc960b0ac{animation:.22s cubic-bezier(.2,.8,.2,1) zb-toast-slide-down}@keyframes zb-toast-slide-down{0%{opacity:0;transform:translateY(-16px)}to{opacity:1;transform:translateY(0)}}"})]})}let c={push:()=>void 0};e.s(["ToastProvider",0,function({children:e,placement:r="admin"}){let[n,i]=(0,o.useState)([]),a=(0,o.useCallback)((e,t="success",r)=>{i(n=>[...n,{id:Date.now()+Math.random(),message:e,variant:t,action:r}])},[]),l=(0,o.useCallback)(e=>{i(t=>t.filter(t=>t.id!==e))},[]),c=(0,o.useMemo)(()=>({push:a}),[a]);return(0,t.jsxs)(s.Provider,{value:c,children:[e,(0,t.jsx)("div",{className:"fixed left-1/2 -translate-x-1/2 flex flex-col gap-2 pointer-events-none items-center "+("storefront"===r?"zb-storefront-toast-stack":"top-6 z-[60]"),children:n.map(e=>(0,t.jsx)(u,{item:e,onDone:()=>l(e.id)},e.id))})]})},"useToast",0,function(){let e=(0,o.useContext)(s);return e||c}])},545055,e=>{"use strict";let t=(0,e.i(139318).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["Loader2",0,t],545055)},803993,e=>{"use strict";let t=(0,e.i(139318).default)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);e.s(["AlertTriangle",0,t],803993)},997288,e=>{"use strict";var t=e.i(23995),r=e.i(647083),n=e.i(349173),i=e.i(803993),a=e.i(545055);let l=(0,r.createContext)(null);e.s(["ConfirmProvider",0,function({children:e,placement:a="admin"}){let o=(0,n.useTranslations)("admin.common"),[s,u]=(0,r.useState)(null),c=(0,r.useCallback)(e=>{let t=new Promise(t=>{u({...e,resolve:t})});return e.extra?t:t.then(e=>"confirm"===e)},[]),d=(0,r.useCallback)(e=>{s&&(s.resolve(e),u(null))},[s]);return(0,r.useEffect)(()=>{if(!s)return;let e=e=>{"Escape"===e.key?d("cancel"):"Enter"===e.key&&d("confirm")};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[s,d]),(0,t.jsxs)(l.Provider,{value:c,children:[e,s&&(0,t.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center p-4 "+("storefront"===a?"zb-storefront-modal-overlay":"z-[100]"),onClick:()=>d("cancel"),role:"dialog","aria-modal":"true",children:(0,t.jsxs)("div",{className:"bg-[var(--color-bg-elevated)] rounded-xl shadow-2xl max-w-md w-full overflow-hidden animate-in fade-in zoom-in-95 duration-150",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"px-6 pt-6 pb-4 flex items-start gap-3",children:["danger"===s.variant&&(0,t.jsx)("div",{className:"w-10 h-10 rounded-full bg-red-50 flex items-center justify-center flex-shrink-0",children:(0,t.jsx)(i.AlertTriangle,{size:18,className:"text-[var(--color-error)]"})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[s.title&&(0,t.jsx)("h3",{className:"text-base font-semibold text-[var(--color-text-primary)] mb-1",children:s.title}),(0,t.jsx)("div",{className:"text-sm leading-relaxed text-[var(--color-text-secondary)] whitespace-pre-wrap",children:s.message})]})]}),(0,t.jsxs)("div",{className:"px-6 pb-5 flex flex-wrap items-center justify-end gap-2 mt-1",children:[(0,t.jsx)("button",{type:"button",className:"btn-secondary text-xs",onClick:()=>d("cancel"),autoFocus:"danger"===s.variant,children:s.cancelLabel??o("cancel")}),s.extra&&(0,t.jsx)("button",{type:"button",className:"btn-secondary text-xs",onClick:()=>d("extra"),children:s.extra.label}),(0,t.jsx)("button",{type:"button",className:`text-xs py-2 px-4 roun
1ded-lg inline-flex items-center gap-1 text-white transition-opacity hover:opacity-90 ${"danger"===s.variant?"bg-[var(--color-error)]":"bg-[var(--color-brand)]"}`,onClick:()=>d("confirm"),autoFocus:"danger"!==s.variant,children:s.confirmLabel??o("confirm")})]})]})})]})},"InlineLoader",0,function(){return(0,t.jsx)(a.Loader2,{size:12,className:"animate-spin"})},"useConfirm",0,function(){let e=(0,r.useContext)(l);if(!e)throw Error("useConfirm() å¿
é å¨ <ConfirmProvider> ä¹ä¸ä½¿ç¨ï¼è«ç¢ºèª admin root layout å·²å
è¦ <ConfirmProvider>ã");return e}])},860919,e=>{"use strict";let t=(0,e.i(139318).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",0,t],860919)},377339,e=>{"use strict";e.i(399453).default.env.NEXT_PUBLIC_API_URL;class t extends Error{status;body;constructor(e,t,r){super(e),this.name="ApiError",this.status=t,this.body=r}}let r=new Set([502,503,504]);function n(e){return new Promise(t=>setTimeout(t,e))}async function i(e,i){let a,l,o="u">typeof FormData&&i?.body instanceof FormData?{}:{"Content-Type":"application/json"},s="GET"===(l=(i?.method??"GET").toUpperCase())||"HEAD"===l,u=s?4:1,c=[200,500,1500];for(let l=0;l<u;l++)try{let a=await fetch(`${e}`,{credentials:"include",...i,headers:{...o,...i?.headers??{}}});if(!a.ok){let e=await a.json().catch(()=>({})),i=new t(e.message??a.statusText,a.status,e);if(s&&r.has(a.status)&&l<u-1){await n(c[l]??1500);continue}if(401===a.status&&!window.location.pathname.startsWith("/signin")){try{await fetch("/v1/auth/logout",{method:"POST",credentials:"include"})}catch{}let e=window.location.pathname+window.location.search;window.location.href=`/signin?next=${encodeURIComponent(e)}`}throw i}if(204===a.status)return;let d=await a.text();if(""===d)return;return JSON.parse(d)}catch(e){if(a=e,e instanceof t)throw e;if(s&&l<u-1){await n(c[l]??1500);continue}throw e}throw a}e.s(["API_BASE_URL",0,"","ApiError",0,t,"apiFetch",0,i])},202154,e=>{"use strict";let t=(0,e.i(139318).default)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s(["X",0,t],202154)},604341,e=>{"use strict";let t=(0,e.i(139318).default)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);e.s(["Pencil",0,t],604341)},630615,e=>{"use strict";let t=(0,e.i(139318).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["ExternalLink",0,t],630615)},37277,e=>{"use strict";let t;var r=e.i(399453),n=e.i(238811),i=e.i(647083),a=e.i(200241),l=i["use".trim()],o=e.i(625181),s=e.i(79554),u=e.i(138551),c=e.i(23995),d=e.i(876628);let f=["zh-TW","en","ja","ko"],p={locales:f,defaultLocale:(t=("u"<typeof document?r.default.env.SITE_DEFAULT_LOCALE:document.documentElement.getAttribute("data-zb-default-locale")??void 0)?.trim())&&f.includes(t)?t:"zh-TW",localePrefix:"as-needed",localeDetection:!1,alternateLinks:!1},{Link:m,redirect:h,permanentRedirect:g,usePathname:y,useRouter:x,getPathname:b}=function(e){let{Link:t,config:r,getPathname:f,...p}=function(e,t){var r,a,d;let f={...r=t||{},localePrefix:"object"==typeof(d=r.localePrefix)?d:{mode:d||"always"},localeCookie:!!((a=r.localeCookie)??1)&&{name:"NEXT_LOCALE",sameSite:"lax",..."object"==typeof a&&a},localeDetection:r.localeDetection??!0,alternateLinks:r.alternateLinks??!0},p=f.pathnames,m=(0,i.forwardRef)(function({href:t,locale:r,...n},i){let a,u;"object"==typeof t?(a=t.pathname,u=t.params):a=t;let d=(0,o.isLocalizableHref)(t),m=e(),g=(0,o.isPromise)(m)?l(m):m,y=d?h({locale:r||g,href:null==p?a:{pathname:a,params:u},forcePrefix:null!=r||void 0}):a;return(0,c.jsx)(s.default,{ref:i,href:"object"==typeof t?{...t,pathname:y}:y,locale:r,localeCookie:f.localeCookie,...n})});function h(e){let t,{forcePrefix:r,href:n,locale:i}=e;return null==p?"object"==typeof n?(t=n.pathname,n.query&&(t+=(0,u.serializeSearchParams)(n.query))):t=n:t=(0,u.compileLocalizedPathname)({locale:i,...(0,u.normalizeNameOrNameWithParams)(n),pathnames:f.pathnames}),(0,u.applyPathnamePrefix)(t,i,f,r)}function g(e){return function(t,...r){return e(h(t),...r)}}return{config:f,Link:m,redirect:g(n.redirect),permanentRedirect:g(n.permanentRedirect),getPathname:h}}(a.useLocale,e);return{...p,Link:t,usePathname:function(){let e,t,l=(e=(0,n.usePathname)(),t=(0,a.useLocale)(),(0,i.useMemo)(()=>
1{if(!e)return e;let n=e,i=(0,o.getLocalePrefix)(t,r.localePrefix);if((0,o.hasPathnamePrefixed)(i,e))n=(0,o.unprefixPathname)(e,i);else if("never"!==r.localePrefix.mode&&r.localePrefix.prefixes){let r=(0,o.getLocaleAsPrefix)(t);(0,o.hasPathnamePrefixed)(r,e)&&(n=(0,o.unprefixPathname)(e,r))}return n},[r.localePrefix,t,e])),s=(0,a.useLocale)();return(0,i.useMemo)(()=>l&&r.pathnames?(0,u.getRoute)(s,l,r.pathnames):l,[s,l])},useRouter:function(){let e=(0,n.useRouter)(),t=(0,a.useLocale)(),l=(0,n.usePathname)();return(0,i.useMemo)(()=>{function n(e){return function(n,i){let{locale:a,...o}=i||{},s=[f({href:n,locale:a||t,forcePrefix:null!=a||void 0})];Object.keys(o).length>0&&s.push(o),(0,d.default)(r.localeCookie,l,t,a),e(...s)}}return{...e,push:n(e.push),replace:n(e.replace),prefetch:n(e.prefetch)}},[t,l,e])},getPathname:f}}(p);e.s(["Link",0,m,"getPathname",0,b,"routing",0,p,"usePathname",0,y,"useRouter",0,x],37277)},390607,359986,73937,328166,214414,e=>{"use strict";let t=["pages","articles","portfolio","media","forms","products","orders","shipping","invoices","promotions","customers","reviews","affiliate","courses","students","members","content_entries","analytics","sales_dashboard"],r=["analytics","sales_dashboard"],n=["orders:refund","orders:edit_amount","customers:export","invoices:void"],i=new Set(t),a=new Set(n),l=new Set(r);function o(e){return"string"==typeof e?e.trim().toLowerCase():""}function s(...e){return e.flatMap(e=>l.has(e)?[`${e}:read`]:[`${e}:read`,`${e}:write`])}function u(...e){return e.map(e=>`${e}:read`)}let c=[{id:"fulfillment",capabilities:[...u("orders","products"),...s("shipping")],scopeRestriction:null},{id:"support",capabilities:[...s("orders","reviews"),...u("shipping","customers","members")],scopeRestriction:null},{id:"catalog",capabilities:[...s("products","media","promotions"),...u("reviews")],scopeRestriction:null},{id:"editor_content",capabilities:[...s("articles","media","portfolio"),...u("pages")],scopeRestriction:null},{id:"editor_web",capabilities:s("pages","articles","portfolio","media","forms"),scopeRestriction:null},{id:"course_ops",capabilities:[...s("courses","students"),...u("members")],scopeRestriction:null},{id:"instructor",capabilities:s("courses","students"),scopeRestriction:"own_courses"},{id:"marketing",capabilities:[...s("promotions","affiliate","articles","media"),...u("analytics","sales_dashboard")],scopeRestriction:null},{id:"finance",capabilities:[...u("orders","analytics","sales_dashboard"),...s("invoices"),"orders:refund","customers:export","invoices:void"],scopeRestriction:null},{id:"observer",capabilities:t.map(e=>`${e}:read`),scopeRestriction:null}];c.map(e=>e.id),[...s("pages","articles","portfolio","media","forms","products","promotions"),...u("reviews","members")],s("courses","students"),e.s(["ADMIN_CAPABILITY_GROUPS",0,[{id:"content",resources:["pages","articles","portfolio","media","forms"]},{id:"commerce",resources:["products","orders","shipping","invoices","promotions","customers","reviews","affiliate"]},{id:"courses",resources:["courses","students"]},{id:"other",resources:["members","content_entries","analytics","sales_dashboard"]}],"ADMIN_CAPABILITY_TEMPLATES",0,c,"READ_ONLY_CAPABILITY_RESOURCES",0,r,"SENSITIVE_CAPABILITIES",0,n,"findAdminCapabilityTemplate",0,function(e){return e?c.find(t=>t.id===e)??null:null},"hasAdminCapability",0,function(e,t,r){return!!t&&(function(e){let t=new Set;for(let r of e??[]){let e=o(r);if(function(e){let t=o(e);if(a.has(t))return!0;let r=/^([a-z_]+):(read|write|\*)$/.exec(t);return!(!r||!i.has(r[1])||l.has(r[1])&&"read"!==r[2])}(e)){if(e.endsWith(":*")){let r=e.slice(0,-2);t.add(`${r}:read`),l.has(r)||t.add(`${r}:write`);continue}t.add(e)}}return t})(e).has(`${t}:${r}`)}],359986);let d=[{tag:"g:id",required:!0,maxLength:50},{tag:"g:title",required:!0,maxLength:150},{tag:"g:description",required:!0,maxLength:5e3},{tag:"g:link",required:!0,maxLength:2e3},{tag:"g:image_link",required:!0,maxLength:2e3},{tag:"g:availability",required:!0,maxLength:20},{tag:"g:price",required:!0,maxLength:20},{tag:"g:sale_price",required:!1,maxLength:20},{tag:"g:condition",required:!0,maxLength:20},{tag:"g:brand",required:!1,maxLength:70},{tag:"g:gtin",required:!1,maxLength:14},{tag:"g:mpn",required:!1,maxLength:70},{tag:"g:identifier_exists",required:!1,maxLength:5},{tag:"g:product_type",required:!1,maxLength:750},{tag:"g:item_group_id",required:!1,maxLength:50},{tag:"g:shipping_weight",required:!1,maxLength:20},{tag:"g:product_length",required:!1,maxLength:20},{tag:"g:product_width",required:!1,maxLength:20}];e.s(["GOOGLE_FEED_FIELDS",0,d,"PRODUCT_VARIANT_QUERY_PARAM",0,"variant"],73937);let f={"g:id":{maxLength:100},"g:title":{maxLength:200},"g:brand":{required:!0}},p=new Set(["g:identifier_exists"]);d.filter(e=>!p.has(e.tag)).map(e=>({tag:e.tag,required:f[e.tag]?.required??e.required,maxLength:f[e.tag]?.maxLength??e.maxLength}));let m=/^[\p{L}\p{N}]+(?:-[\p{L}\p{N}]+)*$/u,h=m.source.slice(1,-1);RegExp(`^${h}
1(?:/${h}){0,2}$`,"u"),e.s(["SLUG_MAX_LENGTH",0,128,"SLUG_PATTERN",0,m,"encodePageSlugPath",0,function(e){return e.split("/").map(encodeURIComponent).join("/")},"normalizeSlug",0,function(e){return(e??"").normalize("NFC").trim().replace(/[\s/\\_]+/g,"-").replace(/[^\p{L}\p{N}-]+/gu,"").replace(/-+/g,"-").replace(/^-+|-+$/g,"").slice(0,128)}],328166);let g=["blog","portfolio"],y=Object.freeze({maxPages:null,content:Object.freeze({blog:!0,portfolio:!0}),storageMB:null,homePageOnly:null});function x(e){return"number"!=typeof e||!Number.isInteger(e)||e<0?null:e}e.s(["PLAN_HOME_PAGE_ONLY_ERROR_CODE",0,"PLAN_HOME_PAGE_ONLY","UNLIMITED_PLAN",0,y,"parsePlanLimits",0,function(e){if(null===e||"object"!=typeof e||Array.isArray(e))return{maxPages:null,content:{blog:!0,portfolio:!0},storageMB:null,homePageOnly:null};let t=null===e.content||"object"!=typeof e.content||Array.isArray(e.content)?{}:e.content,r={};for(let e of g)r[e]=!1!==t[e];return{maxPages:x(e.maxPages),content:r,storageMB:x(e.storageMB),homePageOnly:"boolean"==typeof e.homePageOnly?e.homePageOnly:null}},"planBlocksPublishing",0,function(e,t,r,n){return!!e&&"published"===r&&"home"!==t&&!/^__.*__$/.test(t)&&"published"!==n}],214414),e.s([],390607)},851396,e=>{"use strict";let t=(0,e.i(139318).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["Check",0,t],851396)},879015,e=>{"use strict";let t=(0,e.i(139318).default)("video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);e.s(["Video",0,t],879015)},549094,e=>{"use strict";let t=(0,e.i(139318).default)("paperclip",[["path",{d:"M13.234 20.252 21 12.3",key:"1cbrk9"}],["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 0 2.828 2 2 0 0 0 2.828 0l8.414-8.586a4 4 0 0 0 0-5.656 4 4 0 0 0-5.656 0l-8.415 8.585a6 6 0 1 0 8.486 8.486",key:"1pkts6"}]]);e.s(["Paperclip",0,t],549094)},236036,e=>{"use strict";e.s(["isBlankNumber",0,function(e){return""===e||null==e},"parseNumberInput",0,function(e){if(""===e.trim())return"";let t=Number(e);return Number.isFinite(t)?t:""}])},304187,e=>{"use strict";var t=e.i(23995),r=e.i(647083),n=e.i(236036);let i=(0,r.forwardRef)(function({value:e,onValueChange:r,min:i,max:l,clampOnBlur:o=!0,selectOnFocus:s=!0,onClamp:u,onFocus:c,onBlur:d,...f},p){return(0,t.jsx)("input",{...f,ref:p,type:"number",inputMode:f.inputMode??"numeric",min:i,max:l,value:e,onChange:e=>r((0,n.parseNumberInput)(e.target.value)),onFocus:e=>{s&&e.currentTarget.select(),c?.(e)},onBlur:t=>{if(o&&""!==e){let t=a(e,i,l);t!==e&&(r(t),u?.(t,e))}d?.(t)}})});function a(e,t,r){let n=e;return"number"==typeof t&&n<t&&(n=t),"number"==typeof r&&n>r&&(n=r),n}function l(e,t={}){let r=""===e?t.fallback??0:e,n=a(Number.isFinite(r)?r:t.fallback??0,t.min,t.max);return t.integer?Math.floor(n):n}let o=(0,r.forwardRef)(function({value:e,onValueChange:i,min:a,max:o,fallback:s=0,integer:u=!1,selectOnFocus:c=!0,onClamp:d,onFocus:f,onBlur:p,...m},h){let[g,y]=(0,r.useState)(null);return(0,t.jsx)("input",{...m,ref:h,type:"number",inputMode:m.inputMode??"numeric",min:a,max:o,value:g??String(e),onChange:e=>{let t=e.target.value;y(t);let r=(0,n.parseNumberInput)(t);""!==r&&i(u?Math.floor(r):r)},onFocus:t=>{y(String(e)),c&&t.currentTarget.select(),f?.(t)},onBlur:t=>{let r=null===g?e:(0,n.parseNumberInput)(g),c=l(r,{min:a,max:o,fallback:s,integer:u});y(null),c!==e&&(i(c),""!==r&&c!==r&&d?.(c,r)),p?.(t)}})});e.s(["NumberField",0,i,"NumberInput",0,o,"numberFieldValue",0,l])},169553,e=>{"use strict";let t=(0,e.i(139318).default)("truck",[["path",{d:"M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2",key:"wrbu53"}],["path",{d:"M15 18H9",key:"1lyqi6"}],["path",{d:"M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14",key:"lysw3i"}],["circle",{cx:"17",cy:"18",r:"2",key:"332jqn"}],["circle",{cx:"7",cy:"18",r:"2",key:"19iecd"}]]);e.s(["Truck",0,t],169553)},824242,e=>{"use strict";let t={weekly:{interval:1,period:"week"},biweekly:{interval:2,period:"week"},monthly:{interval:1,period:"month"},quarterly:{interval:3,period:"month"}};function r(e){var r;let n="day"===e.billingPeriod||"week"===e.billingPeriod||"month"===e.billingPeriod||"year"===e.billingPeriod,i="number"==typeof e.billingInterval&&Number.isFinite(e.billingInterval)&&e.billingInterval>=1;return n&&i?{interval:e.billingInterval,period:e.billingPeriod}
1:(r=e.cadence)&&r in t?t[r]:{interval:1,period:"month"}}function n(e,t){return"month"===t&&3===e}e.s(["BILLING_INTERVAL_OPTIONS",0,[1,2,3,4,5,6],"BILLING_PERIOD_KEYS",0,{day:"billingPeriodDay",week:"billingPeriodWeek",month:"billingPeriodMonth",year:"billingPeriodYear"},"BILLING_PERIOD_OPTIONS",0,[{value:"day",label:"天"},{value:"week",label:"é±"},{value:"month",label:"æ"},{value:"year",label:"å¹´"}],"billingCycleKeyFrom",0,function(e){let{interval:t,period:i}=r(e);if(n(t,i))return{key:"billingEveryQuarter",interval:t,period:i};let a=i.charAt(0).toUpperCase()+i.slice(1);return{key:1===t?`billingEveryOne${a}`:`billingEveryN${a}`,interval:t,period:i}},"billingModelToCadence",0,function(e,t){return"week"===t&&1===e?"weekly":"week"===t&&2===e?"biweekly":"month"===t&&1===e?"monthly":"month"===t&&3===e?"quarterly":"monthly"},"isQuarterlyModel",0,n,"resolveBillingModel",0,r])},191665,e=>{"use strict";function t(e){return"percent"===e.discountType?"percent":"fixed"}function r(e,t){return Math.max(0,Math.floor(e*t/100))}function n(e){return"number"==typeof e&&Number.isFinite(e)&&e>0&&e<=100}function i(e,i,a){let l=function(e,t){if(!t||!Array.isArray(e.variantPrices))return{kind:"default"};let r=e.variantPrices.find(e=>e&&e.variantId===t);return r?null===r.salePrice?{kind:"excluded"}:"number"==typeof r.salePrice&&Number.isFinite(r.salePrice)&&r.salePrice>=0?{kind:"override",salePrice:r.salePrice}:{kind:"default"}:{kind:"default"}}(e,a);return"excluded"===l.kind?null:"override"===l.kind?l.salePrice:"percent"===t(e)?n(e.discountValue)&&Number.isFinite(i)&&!(i<0)?r(i,e.discountValue):null:Number.isFinite(e.salePrice)&&e.salePrice>=0?e.salePrice:null}e.s(["applyPercentDiscount",0,r,"formatDiscountValueEn",0,function(e){if(!n(e))return"";let t=100-e;return`${Number.isInteger(t)?t:t.toFixed(1)}% off`},"formatDiscountValueZh",0,function(e){if(!n(e))return"";let t=e/10;return Number.isInteger(t)?`${t} æ`:`${e} æ`},"isValidDiscountValue",0,n,"resolveBasePrice",0,function(e,t){let r=null==t?null:Number(t);if(null!==r&&Number.isFinite(r))return r;let n=Number(e??0);return Number.isFinite(n)?n:0},"resolveSalePeriodPrice",0,i,"resolveUnitPrice",0,function(e){let r=Number.isFinite(e.basePrice)&&e.basePrice>=0?e.basePrice:0,a=function(e,r){let a=function(e,r=new Date){if(!Array.isArray(e)||0===e.length)return null;let i=r.getTime();for(let r of e){if(!r)continue;let e=Date.parse(r.startAt),a=Date.parse(r.endAt);if(!(Number.isNaN(e)||Number.isNaN(a))&&e<=i&&i<=a&&("percent"===t(r)?n(r.discountValue):Number.isFinite(r.salePrice)&&r.salePrice>=0))return r}return null}(e,r.now??new Date);if(!a)return null;let l=i(a,r.basePrice,r.variantId);return null===l?null:{salePrice:l,label:a.label,endAt:a.endAt,periodId:a.id,discountType:t(a)}}(e.salePeriods,{basePrice:r,variantId:e.variantId,now:e.now}),l="number"==typeof e.memberPrice&&Number.isFinite(e.memberPrice)&&e.memberPrice>=0?e.memberPrice:null,o=r,s="base";return a&&a.salePrice<o&&(o=a.salePrice,s="sale"),null!==l&&l<o&&(o=l,s="member"),{unitPrice:o,activeSale:a,source:s}}])},329217,e=>{"use strict";function t(e){return e.toLocaleString("zh-TW",{maximumFractionDigits:2})}e.s(["normalizeCustomPrice",0,function(e){let t=e&&"object"==typeof e?e:{},r=(e,t)=>{if(null==e||"string"==typeof e&&""===e.trim()||"number"!=typeof e&&"string"!=typeof e)return t;let r="number"==typeof e?e:Number(e);return Number.isFinite(r)&&r>=0?r:t},n=r(t.min,1)??1,i=r(t.max,null);return null!=i&&i<n&&(i=null),{suggested:r(t.suggested,null),min:n,max:i,step:r(t.step,null),label:"string"==typeof t.label?t.label.slice(0,80):""}},"validateCustomPrice",0,function(e,r){let n="number"==typeof r?r:Number(String(r??"").trim());if(!Number.isFinite(n))return{ok:!1,message:"è«è¼¸å
¥éé¡"};let i=Math.round(100*n)/100,a=Number.isFinite(e.min)?e.min:1;return i<a?{ok:!1,message:`éé¡ä¸å¾ä½æ¼ NT$ ${t(a)}`}:null!=e.max&&Number.isFinite(e.max)&&i>e.max?{ok:!1,message:`éé¡ä¸å¾é«æ¼ NT$ ${t(e.max)}`}:{ok:!0,amount:i}}])},908966,e=>{"use strict";let t=(0,e.i(139318).default)("image-plus",[["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}],["path",{d:"M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5",key:"1ue2ih"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]]);e.s(["ImagePlus",0,t],908966)},804748,e=>{"use strict";var t=e.i(647083);let r="/v1/analytics/pv",n="zb_session_id";e.s(["default",0,function({type:e,id:i}){let a=(0,t.useRef)(new Set);return(0,t.useEffect)(()=>
1{if(!e||!i)return;let t=`${e}::${i}`;if(a.current.has(t))return;a.current.add(t);let l=function(){if("u"<typeof document)return;let e=function(e){if("u"<typeof document)return null;for(let t of document.cookie?document.cookie.split(";"):[]){let r=t.trim(),n=r.indexOf("=");if(!(n<0)&&r.slice(0,n)===e)return decodeURIComponent(r.slice(n+1))}return null}(n);return e||(e="u">typeof crypto&&"function"==typeof crypto.randomUUID?crypto.randomUUID():`s-${Date.now()}-${Math.random().toString(36).slice(2,10)}`),!function(e,t){if("u"<typeof document)return;let r=new Date(Date.now()+18e5).toUTCString();document.cookie=`${e}=${encodeURIComponent(t)}; expires=${r}; path=/; SameSite=Lax`}(n,e),e}(),o={type:e,id:i};l&&(o.sessionId=l),function(e){try{let t=JSON.stringify(e);if("u">typeof navigator&&"function"==typeof navigator.sendBeacon){let e=new Blob([t],{type:"application/json"});if(navigator.sendBeacon(r,e))return}"function"==typeof fetch&&fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:t,keepalive:!0}).catch(()=>{})}catch{}}(o)},[e,i]),null}])},9369,e=>{"use strict";let t=(0,e.i(139318).default)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);e.s(["Minus",0,t],9369)},886834,e=>{"use strict";let t="__other__",r="å
¶ä»";function n(e){return`${e}__other`}function i(e){return"checkboxGroup"===e.type}function a(e){return!0===e.allowOther&&("checkboxGroup"===e.type||"radio"===e.type||"select"===e.type)}function l(e){return"string"==typeof e?e:null==e?"":String(e)}function o(e,t){let n=l(e).trim();return""!==n?n:t?.trim()||r}e.s(["DEFAULT_OTHER_LABEL",0,r,"OTHER_OPTION_VALUE",0,t,"defaultCheckedValues",0,function(e){return(e.defaultValue??"").split(",").map(e=>e.trim()).filter(e=>""!==e)},"findMissingRequiredChoices",0,function(e,t){let r=[];for(let n of e)i(n)&&n.required&&0===t(n.name).filter(e=>""!==e.trim()).length&&r.push(n.name);return r},"normalizeChoiceFormData",0,function(e,r){for(let l of r){let r=n(l.name),s=a(l),u=s?o(e.get(r),l.otherLabel):"";if(e.delete(r),!i(l)&&!s)continue;let c=e.getAll(l.name).map(e=>"string"==typeof e?e:"");if(0===c.length)continue;let d=c.map(e=>e===t?u:e);for(let t of(e.delete(l.name),d))e.append(l.name,t)}},"normalizeChoicePayload",0,function(e,r){let s={...e};for(let e of r){let r=n(e.name),u=a(e),c=u?o(s[r],e.otherLabel):"";if(delete s[r],i(e)){let r=s[e.name],n=null==r||""===r?[]:Array.isArray(r)?r:[r];s[e.name]=n.map(e=>{let r=l(e);return u&&r===t?c:r});continue}u&&l(s[e.name])===t&&(s[e.name]=c)}return s},"otherFieldName",0,n,"resolveOtherText",0,o,"supportsOtherOption",0,a])},380203,e=>{"use strict";let t=(0,e.i(139318).default)("map-pin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);e.s(["MapPin",0,t],380203)},642851,e=>{"use strict";let t=(0,e.i(139318).default)("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);e.s(["Send",0,t],642851)},918760,e=>{"use strict";let t=(0,e.i(139318).default)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);e.s(["ArrowRight",0,t],918760)},833330,21293,e=>{"use strict";var t=e.i(886834);function r(e){return!0===e.allowOther&&("select"===e.type||"checkboxGroup"===e.type)}function n(e){return e.otherLabel?.trim()||t.DEFAULT_OTHER_LABEL}e.s(["joinMemberMultiValue",0,function(e,r,i){return null===i?r:[...r,(0,t.resolveOtherText)(i,n(e))]},"memberOtherLabel",0,n,"splitMemberMultiValue",0,function(e,t){let n=Array.isArray(t)?t:t?[t]:[];if(!r(e))return{known:n,otherText:null};let i=new Set((e.options??[]).map(e=>e.value)),a=[],l=null;for(let e of n)i.has(e)?a.push(e):null===l&&(l=e);return{known:a,otherText:l}},"splitMemberSingleValue",0,function(e,t){let n=Array.isArray(t)?t[0]??"":t??"";return n?r(e)?new Set((e.options??[]).map(e=>e.value)).has(n)?{known:n,otherText:null}:{known:"",otherText:n}:{known:n,otherText:null}:{known:"",otherText:null}},"supportsMemberOther",0,r],833330);var i=e.i(23995),a=e.i(647083);e.s(["MemberOtherTextInput",0,function({initial:e,otherLabel:t,className:r,ariaLabel:n,placeholder:l,disabled:o,onChange:s}){let[u,c]=(0,a.useState)(e===t?"":e);return(0,i.jsx)("input",{type:"text",className:r,"aria-label":n,placeholder:l,value:u,disabled:o,onChange:e=>{c(e.target.value),s(e.target.value)}})}],21293)},410234,e=>{"use strict";var t=e.i(23995),r=e.i(647083),n=e.i(349173),i=e.i(914506),a=e.i(851396),l=e.i(630615);function o({label:e,value:l,mono:s=!0}){let u=(0,n.useTranslations)("paymentAwaiting"),[c,d]=(0,r.useState)(!1);async function f(){try{await navigator.clipboard.writeText(l),d(!0),setTimeout(()=>d(!1),1800)}catch{}}return(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:12,padding:"6px 0"},children:[(0,t.jsx)("span",{style:{fontSize:12,color:"#6b7280",flexShrink:0},children:e}),(0,t.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:6,minWidth:0},children:[(0,t.jsx)("code",{style:{fontSize:s?14:13,fontWeight:s?600:400,fontFamily:s?"ui-monospace, SFMono-Regular, monospace":"inherit",color:"#1a1a1a",wordBreak:"break-all",textAlign:"right"},children:l}),(0,t.jsx)("button",{type:"button",onClick:f,"aria-label":c?u("copied"):u("copyField",{label:e}),style:{flexShrink:0,display:"inline-flex",alignItems:"center",justifyContent:"center",width:22,height:22,borderRadius:4,border:"none",background:"transparent",color:"#6b7280",cursor:"pointer"},children:c?(0,t.jsx)(a.Check,{size:13,color:"#047857"}):(0,t.jsx)(i.Copy,{size:13})})]})]})}function s({label:e,value:r}){return(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:12,padding:"6px 0"},children:[(0,t.jsx)("span",{style:{fontSize:12,color:"#6b7280",flexShrink:0},children:e}),(0,t.jsx)("span",{style:{fontSize:13,color:"#1a1a1a",textAlign:"right"},children:r})]})}e.s(["PaymentAwaitingPanel",0,function({info:e,currency:r,showHeading:i=!0}){var a;let u,c,d=(0,n.useTranslations)("paymentAwaiting"),f="atm"===e.kind?"headingAtm":"cvs"===e.kind?"headingCvs":"manual_transfer"===e.kind?"headingManualTransfer":"offline"===e.kind?"headingOffline":"headingBarcode";return(0,t.jsxs)("section",{style:{background:"#ffffff",border:"1px solid #e5e7eb",borderRadius:8,padding:"14px 16px",marginTop:14},children:[i&&(0,t.jsx)("h3",{style:{fontSize:14,fontWeight:600,color:"#1a1a1a",marginBottom:6},children:d(f)}),(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column"},children:["atm"===e.kind&&(0,t.jsxs)(t.Fragment,{children:[e.bankCode&&(0,t.jsx)(o,{label:d("bankCode"),value:e.bankCode}),e.virtualAccount&&(0,t.jsx)(o,{label:d("virtualAccount"),value:e.virtualAccount})]}),"cvs"===e.kind&&(0,t.jsxs)(t.Fragment,{children:[e.paymentNo&&(0,t.jsx)(o,{label:d("paymentNo"),value:e.paymentNo}),e.ibonShopId&&(0,t.jsx)(o,{label:d("ibonShopId"),value:e.ibonShopId})]}),("manual_transfer"===e.kind||"offline"===e.kind)&&e.instructions&&(0,t.jsx)("pre",{style:{margin:"4px 0 2px",fontSize:13,lineHeight:1.7,color:"#1a1a1a",whiteSpace:"pre-wrap",wordBreak:"break-word",fontFamily:"ui-monospace, SFMono-Regular, monospace"},children:e.instructions}),"barcode"===e.kind&&e.barcodes&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o,{label:d("barcode1"),value:e.barcodes[0]}),(0,t.jsx)(o,{label:d("barcode2"),value:e.barcodes[1]}),(0,t.jsx)(o,{label:d("barcode3"),value:e.barcodes[2]})]}),"number"==typeof e.billAmount&&(0,t.jsx)(s,{label:d("billAmount"),value:(a=e.billAmount,u=(r??"TWD").toUpperCase(),c=a.toLocaleStr
1ing(),"TWD"===u?`NT$ ${c}`:`${u} ${c}`)}),e.expireDate&&(0,t.jsx)(s,{label:d("expireDate"),value:e.expireDate})]}),(0,t.jsx)("p",{style:{fontSize:12,color:"#6b7280",lineHeight:1.6,marginTop:8},children:d("atm"===e.kind?"hintAtm":"cvs"===e.kind?"hintCvs":"manual_transfer"===e.kind?"hintManualTransfer":"offline"===e.kind?"hintOffline":"hintBarcode")}),e.shortUrl&&(0,t.jsxs)("a",{href:e.shortUrl,target:"_blank",rel:"noopener noreferrer",style:{display:"inline-flex",alignItems:"center",gap:6,marginTop:10,fontSize:13,fontWeight:600,color:"#1d4ed8",textDecoration:"underline"},children:[d("openPaymentPage"),(0,t.jsx)(l.ExternalLink,{size:13})]})]})}])},225740,e=>{"use strict";function t(e){if(null==e)return null;let t=e instanceof Date?e.getTime():Date.parse(String(e));return Number.isNaN(t)?null:t}function r(e,n=new Date){let i;return(Array.isArray(i=e?.salePauses)?i.filter(e=>!!e&&"object"==typeof e):[]).filter(e=>(function(e,r=new Date){let n=t(e?.startAt);if(null===n)return!1;let i=r.getTime();if(i<n)return!1;let a=t(e?.endAt??null);return null===a||i<a})(e,n))}e.s(["findActiveSalePause",0,function(e,t=new Date){let n=r(e,t);return 0===n.length?null:n.find(e=>"hide"==("disable_purchase"===e.behavior?"disable_purchase":"hide"))??n[0]},"isBlockedBySalePause",0,function(e,t=new Date){return r(e,t).length>0}])},675682,e=>{"use strict";let t=(0,e.i(139318).default)("camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);e.s(["Camera",0,t],675682)},485750,e=>{"use strict";let t=(0,e.i(139318).default)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);e.s(["User",0,t],485750)},120392,e=>{"use strict";let t=/^\d{4}-\d{2}-\d{2}$/;function r(e){let t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0");return`${t}-${r}-${n}`}function n(e,n){if("string"!=typeof e)return;let i=e.trim();if("today"===i)return r(n);if(!t.test(i))return;let[a,l,o]=i.split("-").map(Number),s=new Date(a,l-1,o);if(s.getFullYear()===a&&s.getMonth()===l-1&&s.getDate()===o)return i}let i=/^[a-zA-Z]{2,3}(-[a-zA-Z0-9]{2,8})*$/;e.s(["resolveDateBounds",0,function(e,t){let i,a;"birthday"===e.datePreset&&(i=r(new Date(t.getFullYear()-120,t.getMonth(),t.getDate())),a=r(t));let l=e.yearRange;if(l&&("number"==typeof l.past||"number"==typeof l.future)){let e=Math.max(0,Math.trunc(l.past??0)),r=Math.max(0,Math.trunc(l.future??0)),{y:n,m:o,d:s}=function(e,t){try{let[r,n,i]=new Intl.DateTimeFormat("en-CA",{timeZone:t,year:"numeric",month:"2-digit",day:"2-digit"}).format(e).split("-").map(Number);return{y:r,m:n,d:i}}catch{return{y:e.getFullYear(),m:e.getMonth()+1,d:e.getDate()}}}(t,"Asia/Taipei"),u=e=>{let t=n+e,r=Math.min(s,new Date(t,o,0).getDate());return`${String(t).padStart(4,"0")}-${String(o).padStart(2,"0")}-${String(r).padStart(2,"0")}`};i=u(-e),a=u(r)}return i=n(e.min,t)??i,a=n(e.max,t)??a,i&&a&&i>a&&(i=void 0),{...i?{min:i}:{},...a?{max:a}:{}}},"resolveDateDisplayLang",0,function(e){if("string"!=typeof e)return;let t=e.trim();if(""!==t&&i.test(t))return t}])},493629,e=>{"use strict";var t=e.i(23995),r=e.i(647083);let n={turnstile:{global:"turnstile",src:"https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit",siteKeyParam:"sitekey"},hcaptcha:{global:"hcaptcha",src:"https://js.hcaptcha.com/1/api.js?render=explicit",siteKeyParam:"sitekey"},recaptcha:{global:"grecaptcha",src:"https://www.google.com/recaptcha/api.js?render=explicit",siteKeyParam:"sitekey"}},i=new Map;async function a(e,t=1e4){let r=Date.now()+t;for(;;){let t=window[e];if(t&&"function"==typeof t.render)return t;if(Date.now()>r)throw Error(`captcha åå§å龿ï¼${e}ï¼`);await new Promise(e=>setTimeout(e,100))}}function l({provider:e,siteKey:o,onToken:s}){let u=(0,r.useRef)(null),[c,d]=(0,r.useState)(null),f=(0,r.useRef)(s);return f.current=s,(0,r.useEffect)(()=>{let t=!1,r=n[e],l=u.current;if(l)return(async()=>{try{await function(e){let t=i.get(e);if(t)return t;let r=new Promise((t,r)=>{let n=document.createElement("script");n.src=e,n.async=!0,n.defer=!0,n.onload=()=>t(),n.onerror=()=>r(Error(`captcha script è¼å
¥å¤±æï¼${e}`)),document.head.appendChild(n)});return i.set(e,r),r}(r.src);let e=await a(r.global);if(t)return;e.render(l,{[r.siteKeyParam]:o,callback:e=>f.current(e),"expired-callback":()=>f.current(null),"error-callback":()=>f.current(null)})}catch(e){if(t)return;d(e instanceof Error?e.message:String(e)),f.current(null)}})(),()=>{t=!0}},[e,o]),(0,t.jsxs)("div",{style:{margin:"4px 0 12px"},children:[(0,t.jsx)("div",{ref:u}),c&&(0,t.jsx)("p",{style:{fontSize:12,color:"#b91c1c",lineHeight:1.6,marginTop:6},children:c})]})}var o=e.i(120392);let s={year:"",month:"",day:""},u=/^(\d{4})-(\d{2})-(\d{2})$/;function c(e){if("string"!=typeof e)return s;let t=u.exec(e.trim());return t?{year:t[1],month:t[2],day:t[3]}:s}function d(e,t){return!Number.isInteger(e)||!Number.isInteger(t)||t<1||t>12?31:new Date(e,t,0).getDate()}function f(e,t,r){let n=Number(e),i=Number(t);if(!n||!i)return p(1,31);let a=1,l=d(n,i),o=c(r.min),s=c(r.max);return o.year&&n===Number(o.year)&&i===Number(o.month)&&(a=Number(o.day)),s.year&&n===Number(s.year)&&i===Number(s.month)&&(l=Math.min(l,Number(s.day))),l<a?[]:p(a,l)}function p(e,t){let r=[];for(let n=e;n<=t;n++)r.push(n);return r}let m={zh:{year:"å¹´",month:"æ",day:"æ¥",monthSuffix:"æ"},ja:{year:"å¹´",month:"æ",day:"æ¥",monthSuffix:"æ"},ko:{year:"ë
",month:"ì",day:"ì¼",monthSuffix:"ì"},en:{year:"Year",month:"Month",day:"Day",monthSuffix:""}};function h(e){return m[(e??"zh-TW").split("-")[0].toLowerCase()]??m.en}function g({name:e,required:n,defaultValue:i,bounds:a,locale:l,style:o,invalid:s,today:u}){let m,y,x,[b,v]=(0,r.useState)(()=>c(i)),S=h(l),w=function(e,t){let r=Number(c(e.min).year)||t.getFullYear()-120,n=Number(c(e.max).year)||t.getFullYear();if(n<r)return[n];let i=[];for(let e=n;e>=r;e--)i.push(e);return i}(a,u??new Date),k=function(e,t){let r=Number(e);if(!r)return p(1,12);let n=c(t.min),i=c(t.max),a=1,l=12;return n.year&&r===Number(n.year)&&(a=Number(n.month)),i.year&&r===Number(i.year)&&(l=Number(i.month)),l<a?[]:p(a,l)}(b.year,a),_=f(b.year,b.month,a),j=e=>{v(t=>{let r={...t,...e};return(void 0!==e.year||void 0!==e.month)&&(f(r.year,r.month,a).includes(Number(r.day))||
1(r.day="")),r})},T={...o,flex:"1 1 0",minWidth:0};return(0,t.jsxs)("div",{style:{display:"flex",gap:8},children:[(0,t.jsxs)("select",{"aria-label":S.year,required:n,value:b.year,onChange:e=>j({year:e.target.value}),"aria-invalid":!!s||void 0,style:T,children:[(0,t.jsx)("option",{value:"",children:S.year}),w.map(e=>(0,t.jsx)("option",{value:String(e),children:e},e))]}),(0,t.jsxs)("select",{"aria-label":S.month,required:n,value:b.month,onChange:e=>j({month:e.target.value.padStart(2,"0")}),"aria-invalid":!!s||void 0,style:T,children:[(0,t.jsx)("option",{value:"",children:S.month}),k.map(e=>(0,t.jsx)("option",{value:String(e).padStart(2,"0"),children:function(e,t){let r=h(t);if(r.monthSuffix)return`${e}${r.monthSuffix}`;try{return new Intl.DateTimeFormat(t??"en",{month:"long"}).format(new Date(2e3,e-1,1))}catch{return String(e)}}(e,l)},e))]}),(0,t.jsxs)("select",{"aria-label":S.day,required:n,value:b.day,onChange:e=>j({day:e.target.value.padStart(2,"0")}),"aria-invalid":!!s||void 0,style:T,children:[(0,t.jsx)("option",{value:"",children:S.day}),_.map(e=>(0,t.jsx)("option",{value:String(e).padStart(2,"0"),children:e},e))]}),(0,t.jsx)("input",{type:"hidden",name:e,value:(m=Number(b.year),y=Number(b.month),x=Number(b.day),!b.year||!b.month||!b.day||!Number.isInteger(m)||!Number.isInteger(y)||!Number.isInteger(x)||y<1||y>12||x<1||x>d(m,y)?"":`${String(m).padStart(4,"0")}-${String(y).padStart(2,"0")}-${String(x).padStart(2,"0")}`),readOnly:!0})]})}var y=e.i(886834);function x({formKey:e,label:r,fieldsCount:n}){let i=`/admin/forms/${encodeURIComponent(e)}`;return(0,t.jsxs)("a",{href:i,target:"_top",style:{display:"flex",alignItems:"center",gap:10,padding:"10px 14px",borderRadius:8,background:"#fef3c7",border:"1px dashed #f59e0b",color:"#92400e",fontSize:12,textDecoration:"none",marginBottom:4,cursor:"pointer"},title:"é»æå» admin 編輯表å®è¨å®",children:[(0,t.jsx)("span",{style:{background:"#f59e0b",color:"white",borderRadius:4,padding:"2px 6px",fontWeight:600,fontSize:11,flexShrink:0},children:"â 表å®"}),(0,t.jsxs)("span",{style:{flex:1,minWidth:0},children:[(0,t.jsx)("strong",{children:r})," ",(0,t.jsxs)("span",{style:{opacity:.7},children:["(",n," åæ¬ä½ Â· formKey: ",(0,t.jsx)("code",{style:{fontFamily:"monospace"},children:e}),")"]})]}),(0,t.jsx)("span",{style:{flexShrink:0,opacity:.7},children:"編輯è¨å® â"})]})}function b({field:e,errors:r,locale:n}){let i=r[e.name],a=r[(0,y.otherFieldName)(e.name)],l={padding:"10px 12px",borderRadius:6,border:"1px solid var(--st-line)",background:"var(--st-bg-elev)",color:"var(--st-fg)",fontSize:14,outline:"none",fontFamily:"inherit",width:"100%"},s=(e.allowedFileKinds??[]).flatMap(e=>"image"===e?["image/*"]:"video"===e?["video/*"]:"document"===e?["application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","text/csv","text/plain"]:[]).join(","),u="radio"===e.type||"checkboxGroup"===e.type;return(0,t.jsxs)(u?"div":"label",{style:{display:"flex",flexDirection:"column",gap:6},role:u?"group":void 0,children:[(0,t.jsxs)("span",{style:{fontSize:13,fontWeight:500,color:"var(--st-fg)"},children:[e.label,e.required&&(0,t.jsx)("span",{style:{color:"var(--st-danger)",marginLeft:3},children:"*"})]}),(()=>{if("textarea"===e.type)return(0,t.jsx)("textarea",{name:e.name,required:e.required,placeholder:e.placeholder,defaultValue:e.defaultValue,maxLength:e.maxLength,rows:e.rows??5,style:{...l,resize:"vertical",minHeight:120}});if("select"===e.type)return(0,t.jsx)(_,{field:e,inputStyle:l,otherErrorMessage:a});if("radio"===e.type)return(0,t.jsx)(k,{field:e,inputStyle:l,otherErrorMessage:a});if("checkboxGroup"===e.type)return(0,t.jsx)(w,{field:e,inputStyle:l,otherErrorMessage:a});if("checkbox"===e.type)return(0,t.jsx)("input",{type:"checkbox",name:e.name,required:e.required,defaultChecked:"true"===e.defaultValue,style:{width:16,height:16}});if("file"===e.type)return(0,t.jsx)("input",{type:"file",name:e.name,required:e.required,accept:s||void 0,multiple:e.multiple,style:{...l,padding:8}});let r="date"===e.type?(0,o.resolveDateBounds)(e,new Date):{},u="date"===e.type?(0,o.resolveDateDisplayLang)(e.dateDisplayLang):void 0;return"date"===e.type&&"segmented"==("segmented"===e.dateInputMode?"segmented":"native")?(0,t.jsx)(g,{name:e.name,required:e.required,defaultValue:e.defaultValue,bounds:r,locale:n,style:l,invalid:!!i}):(0,t.jsx)("input",{type:e.type,name:e.name,required:e.required,placeholder:e.placeholder,defaultValue:e.defaultValue,maxLength:e.maxLength,autoComplete:e.autoComplete,min:r.min,max:r.max,lang:u,"aria-invalid":!!i||void 0,style:l})})(),i&&(0,t.jsx)("span",{role:"alert",style:{fontSize:12,color:"var(--st-danger)",marginTop:2},children:i}),e.helpText&&(0,t.jsx)("span",{style:{fontSize:11,color:"var(--st-fg
1-subtle)",marginTop:2},children:e.helpText})]})}let v={display:"flex",alignItems:"center",gap:6,fontSize:14};function S({field:e,inputStyle:r,errorMessage:n}){return(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:4,marginLeft:22},children:[(0,t.jsx)("input",{type:"text",name:(0,y.otherFieldName)(e.name),placeholder:e.otherPlaceholder??"è«å¡«å¯«","aria-label":`${e.label}ï¼${e.otherLabel??y.DEFAULT_OTHER_LABEL}`,maxLength:e.maxLength,required:!0,"aria-invalid":!!n||void 0,style:{...r,fontSize:13}}),n&&(0,t.jsx)("span",{role:"alert",style:{fontSize:12,color:"var(--st-danger)"},children:n})]})}function w({field:e,inputStyle:n,otherErrorMessage:i}){let[a,l]=(0,r.useState)(()=>(0,y.defaultCheckedValues)(e)),o=(e,t)=>l(r=>t?[...r,e]:r.filter(t=>t!==e)),s=a.includes(y.OTHER_OPTION_VALUE);return(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:6},children:[(e.options??[]).map(r=>(0,t.jsxs)("label",{style:v,children:[(0,t.jsx)("input",{type:"checkbox",name:e.name,value:r.value,checked:a.includes(r.value),onChange:e=>o(r.value,e.target.checked)}),r.label]},r.value)),(0,y.supportsOtherOption)(e)&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("label",{style:v,children:[(0,t.jsx)("input",{type:"checkbox",name:e.name,value:y.OTHER_OPTION_VALUE,checked:s,onChange:e=>o(y.OTHER_OPTION_VALUE,e.target.checked)}),e.otherLabel??y.DEFAULT_OTHER_LABEL]}),s&&(0,t.jsx)(S,{field:e,inputStyle:n,errorMessage:i})]})]})}function k({field:e,inputStyle:n,otherErrorMessage:i}){let[a,l]=(0,r.useState)(e.defaultValue??"");return(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[(e.options??[]).map(r=>(0,t.jsxs)("label",{style:v,children:[(0,t.jsx)("input",{type:"radio",name:e.name,value:r.value,required:e.required,defaultChecked:e.defaultValue===r.value,onChange:()=>l(r.value)}),r.label]},r.value)),(0,y.supportsOtherOption)(e)&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("label",{style:v,children:[(0,t.jsx)("input",{type:"radio",name:e.name,value:y.OTHER_OPTION_VALUE,required:e.required,defaultChecked:e.defaultValue===y.OTHER_OPTION_VALUE,onChange:()=>l(y.OTHER_OPTION_VALUE)}),e.otherLabel??y.DEFAULT_OTHER_LABEL]}),a===y.OTHER_OPTION_VALUE&&(0,t.jsx)(S,{field:e,inputStyle:n,errorMessage:i})]})]})}function _({field:e,inputStyle:n,otherErrorMessage:i}){let[a,l]=(0,r.useState)(e.defaultValue??"");return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("select",{name:e.name,required:e.required,defaultValue:e.defaultValue??"",onChange:e=>l(e.target.value),style:n,children:[!e.required&&(0,t.jsx)("option",{value:"",children:"â è«é¸æ â"}),(e.options??[]).map(e=>(0,t.jsx)("option",{value:e.value,children:e.label},e.value)),(0,y.supportsOtherOption)(e)&&(0,t.jsx)("option",{value:y.OTHER_OPTION_VALUE,children:e.otherLabel??y.DEFAULT_OTHER_LABEL})]}),(0,y.supportsOtherOption)(e)&&a===y.OTHER_OPTION_VALUE&&(0,t.jsx)(S,{field:e,inputStyle:n,errorMessage:i})]})}e.s(["ZenbuForm",0,function({formKey:e,locale:n="zh-TW",className:i,style:a,submitLabel:o="éåº",showPrivacyNotice:s=!0,privacyText:u="æäº¤å³åææå以æ¨å¡«å¯«ç email èæ¨è¯ç¹«ãæå䏿尿¨çè³æåäº«çµ¦ç¬¬ä¸æ¹ã"}){let[c,d]=(0,r.useState)(null),[f,p]=(0,r.useState)(null),[m,h]=(0,r.useState)(!1),[g,v]=(0,r.useState)(null),[S,w]=(0,r.useState)(null),[k,_]=(0,r.useState)(null),[j,T]=(0,r.useState)({}),N=(0,r.useRef)(null),E=(0,r.useCallback)(e=>{T(t=>{if(!(e in t))return t;let r={...t};return delete r[e],r})},[]);(0,r.useEffect)(()=>{let t=!1;return fetch(`/v1/public/forms/${encodeURIComponent(e)}/config`).then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return e.json()}).then(e=>{t||d(e)}).catch(e=>{t||p(e instanceof Error?e.message:"Failed to load form")}),()=>{t=!0}},[e]);let C=async t=>{if(t.preventDefault(),!c)return;w(null);let r=t.currentTarget,i=Array.from(r.querySelectorAll("input, select, textarea")).filter(e=>"website"!==e.name&&e.willValidate&&!e.checkValidity()),a=new FormData(r),l=(0,y.findMissingRequiredChoices)(c.fields,e=>a.getAll(e).map(e=>"string"==typeof e?e:""));if(i.length>0||l.length>0){var o;let e={};for(let t of i)t.name&&!e[t.name]&&(e[t.name]=t.validationMessage||"è«å¡«å¯«é忬ä½");for(let t of l)e[t]||(e[t]="è«è³å°å¾é¸ä¸åé¸é
");T(e);let t=i[0]?.name??l[0],n=i[0]??r.querySelector(`input[name="${(o=t,"u">typeof CSS&&"function"==typeof CSS.escape?CSS.escape(o):o.replace(/["\\]/g,"\\$&"))}"]`);n?.scrollIntoView?.({block:"center",behavior:"smooth"}
1),n?.focus({preventScroll:!0});return}T({});let s=!1;for(let e of a.values())if(e instanceof File&&e.size>0){s=!0;break}h(!0);try{let t;if(s){for(let[t,r]of((0,y.normalizeChoiceFormData)(a,c.fields),a.set("formKey",e),a.set("locale",n),g&&a.set("captchaToken",g),Array.from(a.entries())))r instanceof File&&0===r.size&&a.delete(t);t=await fetch("/v1/public/forms/submit-multipart",{method:"POST",body:a})}else{let r={};for(let[e,t]of a.entries())if(!(t instanceof File))if(e in r){let n=r[e];r[e]=Array.isArray(n)?[...n,t]:[n,t]}else r[e]=t;let i=(0,y.normalizeChoicePayload)(r,c.fields);t=await fetch("/v1/public/forms/submit",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({formKey:e,payload:i,locale:n,...g?{captchaToken:g}:{}})})}if(!t.ok){let e=await t.text().catch(()=>"");if(429===t.status)throw Error("éåºå¤ªé »ç¹ï¼è«ç¨å¾å試");if(413===t.status)throw Error("æªæ¡å¤ªå¤§");throw Error(e.slice(0,200)||`HTTP ${t.status}`)}let i=await t.json().catch(()=>null),l=function(e,t){if(!t?.member)return null;let r=e.memberSignupSuccessText?.trim()||null,n=e.memberAlreadySuccessText?.trim()||null;return!0===t.member.alreadyMember?n??r:r}(c,i);if("redirect"===c.successBehavior.kind){window.location.href=c.successBehavior.url;return}l?_({kind:"message",text:l}):_(c.successBehavior),r.reset()}catch(e){w(e instanceof Error?e.message:"éåºå¤±æ")}finally{h(!1)}};if(f)return(0,t.jsxs)("div",{className:i,style:{padding:16,borderRadius:6,border:"1px solid var(--st-line)",color:"var(--st-fg-muted)",fontSize:13,...a},children:["ç¡æ³è¼å
¥è¡¨å®ï¼formKey: ",e,"ï¼â ",f]});if(!c)return(0,t.jsx)("div",{className:i,style:{padding:24,textAlign:"center",color:"var(--st-fg-muted)",fontSize:13,...a},children:"è¼å
¥ä¸â¦"});if(k){if("custom"===k.kind)return(0,t.jsx)("div",{className:`${i??""} zb-user-content`.trim(),style:a,dangerouslySetInnerHTML:{__html:k.html}});let e="message"===k.kind?k.text:"å·²éåº â";return(0,t.jsxs)("div",{className:i,style:{padding:"24px",borderRadius:8,border:"1px solid var(--st-line)",background:"var(--st-bg-elev)",color:"var(--st-fg)",textAlign:"center",...a},children:[(0,t.jsx)("div",{style:{fontSize:17,fontWeight:600,marginBottom:8},children:"å·²éåº â"}),(0,t.jsx)("div",{style:{fontSize:14,color:"var(--st-fg-muted)"},children:e}),(0,t.jsx)("button",{type:"button",onClick:()=>_(null),style:{marginTop:16,background:"transparent",border:"1px solid var(--st-line)",color:"var(--st-fg-muted)",padding:"8px 16px",borderRadius:6,cursor:"pointer",fontSize:13},children:"åå¯ä¸å°"})]})}let P="1"===new URLSearchParams(window.location.search).get("__pe");return(0,t.jsxs)("form",{ref:N,onSubmit:C,noValidate:!0,onInput:e=>{let t=e.target;t?.name&&E(t.name)},className:i,style:{display:"flex",flexDirection:"column",gap:14,o
1pacity:m?.6:1,transition:"opacity 0.15s",...a},children:[P&&(0,t.jsx)(x,{formKey:c.formKey,label:c.label,fieldsCount:c.fields.length}),(0,t.jsx)("fieldset",{disabled:m,style:{display:"flex",flexDirection:"column",gap:14,border:"none",padding:0,margin:0,minWidth:0},children:c.fields.map(e=>(0,t.jsx)(b,{field:e,errors:j,locale:n},e.name))}),(c.protection?.honeypotField??"website")&&(0,t.jsx)("div",{"aria-hidden":"true",style:{position:"absolute",left:"-10000px",top:"auto",width:1,height:1,overflow:"hidden"},children:(0,t.jsxs)("label",{children:["Website (è«å¿å¡«å¯«)",(0,t.jsx)("input",{type:"text",name:c.protection?.honeypotField??"website",tabIndex:-1,autoComplete:"off"})]})}),c.protection?.captcha&&(0,t.jsx)(l,{provider:c.protection.captcha.provider,siteKey:c.protection.captcha.siteKey,onToken:v}),S&&(0,t.jsx)("div",{style:{padding:"10px 12px",borderRadius:6,background:"color-mix(in srgb, var(--st-danger) 8%, transparent)",border:"1px solid color-mix(in srgb, var(--st-danger) 30%, transparent)",color:"var(--st-danger)",fontSize:13},children:S}),(0,t.jsx)("button",{type:"submit",style:{padding:"12px 20px",borderRadius:6,background:"var(--st-brand)",color:"var(--st-on-brand)",fontSize:15,fontWeight:600,border:"none",cursor:m?"not-allowed":"pointer"},children:m?"éåºä¸â¦":o}),s&&(0,t.jsx)("div",{style:{fontSize:12,color:"var(--st-fg-subtle)",lineHeight:1.6},children:u})]})}],493629)},379612,e=>{"use strict";var t=e.i(23995),r=e.i(647083),n=e.i(37277);function i(e){return`zenbu_preview_unlocked:${e}`}let a={minHeight:"100vh","--pw-bg":"#ffffff","--pw-surface":"#f6f5f3","--pw-border":"rgba(17,24,29,.10)","--pw-fg":"#16181d","--pw-fg-muted":"rgba(22,24,29,.68)","--pw-fg-subtle":"rgba(22,24,29,.5)","--pw-accent":"var(--st-accent, #c89b6a)","--pw-on-accent":"var(--st-accent-fg, #fff)",background:"var(--pw-bg)",color:"var(--pw-fg)"};e.s(["PreviewWatch",0,function({locale:e,data:l,initialLessonId:o}){let s=(0,r.useMemo)(()=>(function(e){let t=[];for(let r of e.chapters)for(let e of r.lessons)for(let r of(e.isPreview&&e.media&&t.push(e),e.subLessons??[]))r.isPreview&&r.media&&t.push(r);return t})(l),[l]),u=s[0]?.id??null,c=o&&s.some(e=>e.id===o)?o:u,[d,f]=(0,r.useState)(c),p=!1!==l.course.previewRequireEmail,[m,h]=(0,r.useState)(!p),[g,y]=(0,r.useState)(""),[x,b]=(0,r.useState)(!1),[v,S]=(0,r.useState)(null);async function w(e){if(e.preventDefault(),x)return;S(null);let t=g.trim();if(!t||!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t))return void S("è«å¡«å¯«æ£ç¢ºç Email");b(!0);try{let e=await fetch(`/v1/public/courses/${encodeURIComponent(l.course.slug)}/preview-lead`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({email:t})});if(!e.ok&&204!==e.status){let t=await e.text().catch(()=>"");throw Error(t||`HTTP ${e.status}`)}try{window.localStorage.setItem(i(l.course.slug),"1")}catch{}h(!0)}catch(e){S((e instanceof Error&&e.message,"éåºå¤±æï¼è«ç¨å¾åè©¦ä¸æ¬¡"))}finally{b(!1)}}(0,r.useEffect)(()=>{if(p)try{let e=window.localStorage.getItem(i(l.course.slug));"1"===e&&h(!0)}catch{}},[l.course.slug,p]);let k=d?s.find(e=>e.id===d):null,_=k?s.findIndex(e=>e.id===k.id):-1,j=_>=0?s[_+1]??null:null;return(0,t.jsxs)("div",{style:a,children:[(0,t.jsxs)("header",{style:{maxWidth:1280,margin:"0 auto",padding:"20px 24px",display:"flex",alignItems:"center",gap:16,borderBottom:"1px solid var(--pw-border)"},children:[(0,t.jsx)(n.Link,{href:`/courses/${l.course.slug}`,locale:e,style:{fontSize:13,color:"var(--pw-fg-muted)",textDecoration:"none"},children:"â åå°èª²ç¨ä¸»é "}),(0,t.jsx)("div",{style:{flex:1}}),(0,t.jsx)("span",{style:{fontSize:12,letterSpacing:"0.18em",color:"var(--pw-accent)",fontWeight:500},children:"PREVIEW · è©¦çæ¨¡å¼"})]}),(0,t.jsxs)("div",{style:{maxWidth:1280,margin:"0 auto",padding:"24px",display:"grid",gridTemplateColumns:"minmax(0, 1fr) 320px",gap:24},className:"preview-watch-grid",children:[(0,t.jsxs)("main",{style:{minWidth:0},children:[(0,t.jsx)("div",{style:{background:"var(--pw-surface)",borderRadius:16,border:"1px solid var(--pw-border)",overflow:"hidden"},children:m?k&&k.media?"video"===k.media.type?(0,t.jsx)("video",{src:k.media.playUrl??k.media.url??"",poster:k.media.thumbnailUrl??void 0,controls:!0,autoPlay:!0,style:{width:"100%",aspectRatio:"16 / 9",background:"#000",display:"block"}},k.id):(0,t.jsx)("div",{style:{aspectRatio:"16 / 9",display:"flex",alignItems:"center",justifyContent:"center",color:"var(--pw-fg-muted)",fontSize:14},children:"æ¤å®å
çºæå / éä»¶å
§å®¹ï¼è«è¦ä¸æ¹èªªæã"}):(0,t.jsx)("div",{style:{aspectRatio:"16 / 9",display:"flex",alignItems:"center",justifyContent:"center",color:"var(--pw-fg-muted)",fontSize:14},children:"è«å¾å³å´é¸æè©¦çå®å
"}):(0,t.jsx)("div",{style:{aspectRatio:"16 / 9",display:"flex",alignItems:"center",justifyContent:"center",padding:"32px 24px",background:"linear-gradient(135deg, rgba(0,0,0,.65) 0%, rgba(0,0,0,.85) 100%)",backgroundImage:k?.media?.thumbnailUrl?`linear-gradient(135deg, rgba(0,0,0,.65) 0%, rgba(0,0,0,.85) 100%), url(${k.media.thumbnailUrl})`:void 0,backgroundSize:"cover",backgroundPosition:"center"},children:(0,t.jsxs)("form",{onSubmit:w,style:{width:"100%",maxWidth:420,background:"rgba(255,255,255,.06)",border:"1px solid rgba(255,255,255,.12)",backdropFilter:"blur(8px)",padding:"24px",borderRadius:14,display:"grid",gap:12},children:[(0,t.jsx)("div",{style:{fontSize:11,letterSpacing:"0.18em",color:"var(--pw-accent)",fontWeight:500},children:"FREE PREVIEW"}),(0,t.jsxs)("h2",{style:{margin:0,color:"#fff",fontSize:18,lineHeight:1.4,fontWeight:600},children:["差䏿¥å³å¯éå試çï¼",(0,t.jsx)("br",{}),"çä¸ä½ ç Emailï¼å³å¯è©¦ç課ç¨å½±ç"]}),(0,t.jsx)("input",{type:"email",placeholder:"[email protected]",value:g,onChange:e=>y(e.target.value),required:!0,autoComplete:"email",style:{width:"100%",boxSizing:"border-box",padding:"10px 12px",border:"1px solid rgba(255,255,255,.2)",borderRadius:8,background:"rgba(0,0,0,.3)",color:"#fff",fontSize:14}}),v?(0,t.jsx)("div",{style:{color:"#fca5a5",fontSize:12},children:v}):null,(0,t.jsx)("button",{type:"submit",disabled:x,style:{padding:"11px 16px",background:"var(--pw-accent)",color:"var(--pw-on-accent)",border:"none",borderRadius:999,fontSize:14,fontWeight:600,cursor:x?"not-allowed":"pointer",opacity:x?.6:1},children:x?"éåºä¸â¦":"éå§è©¦ç"}),(0,t.jsx)("div",{style:{fontSize:11,color:"rgba(255,255,255,.55)"},children:"æåå
ä»¥æ¤ Email å¯é試çé£çµè課ç¨ç¸éè¨æ¯ï¼å¯é¨æéè¨ã"})]})})}),k&&(0,t.jsxs)("section",{style:{marginTop:24},children:[(0,t.jsx)("h1",{style:{margin:0,fontSize:24,fontWeight:600,fontFamily:"var(--font-display)",lineHeight:1.35},children:k.title}),k.description&&(0,t.jsx)("p",{style:{marginTop:14,color:"var(--pw-fg-muted)",fontSize:15,lineHeight:1.75,whiteSpace:"pre-wrap"},children:k.description})]}),(0,t.jsx)("div",{style:{height:96},"aria-hidden":!0})]}),(0,t.jsx)("aside",{style:{background:"var(--pw-surface)",borderRadius:14,border:"1px solid var(--pw-border)",height:"fit-content",position:"sticky",top:24,maxHeight:"calc(100vh - 48px - 96px)",overflow:"hidden",display:"flex",flexDirection:"column"},children:(0,t.jsxs)("div",{style:{padding:"18px",overflowY:"auto",minHeight:0},children:[(0,t.jsx)("div",{style:{fontSize:11,letterSpacing:"0.18em",color:"var(--pw-fg-subtle)",fontWeight:500,marginBottom:4},children:"FREE PREVIEW"}),(0,t.jsxs)("h2",{style:{margin:"0 0 16px",fontSize:15,fontWeight:600},children:["å¯è©¦çå®å
ï¼",s.length,"ï¼"]}),(0,t.jsx)("div",{style:{display:"grid",gap:16},children:l.chapters.map(e=>(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{style:{fontSize:12,fontWeight:500,color:"var(--pw-fg-muted)",marginBottom:6},children:e.title}),(0,t.jsx)("ul",{style:{listStyle:"none",padding:0,margin:0,display:"grid",gap:2},children:e.lessons.flatMap(e=>{let r=[];for(let t of(e.isPreview&&e.media&&r.push({lesson:e,indent:!1}),e.subLessons??[]))t.isPreview&&t.media&&r.push({lesson:t,indent:!0});return r.map(({lesson:e,indent:r})=>{let n=e.id===d;return(0,t.jsx)("li",{children:(0,t.jsxs)("button",{type:"button",onClick:()=>f(e.id),style:{width:"100%",textAlign:"left",background:n?"color-mix(in srgb, var(--pw-accent) 18%, transparent)":"transparent",color:n?"var(--pw-accent)":"var(--pw-fg)",border:"none",padding:r?"8px 10px 8px 24px":"8px 10px",borderRadius:8,cursor:"pointer",fontSize:13,display:"flex",alignItems:"center",gap:8,fontWeight:n?500:400},children:[(0,t.jsxs)("span",{style:{flex:1,minWidth:0},children:[r?"â ":"",e.title]}),e.durationSeconds?(0,t.jsx)("span",{style:{fontSize:11,color:"var(--pw-fg-subtle)",whiteSpace:"nowrap"},children:function(e){if(!e)return"";let t=Math.round(e/60);return`${t} å`}(e.durationSeconds)}):null]})},e.id)})})})]},e.id))})]})})]}),(0,t.jsx)("div",{style:{position:"fixed",left:0,right:0,bottom:0,zIndex:5,background:"linear-gradient(135deg, var(--pw-accent) 0%, color-mix(in srgb, var(--pw-accent) 70%, #6b4a2c) 100%)",color:"var(--pw-on-accent)",boxShadow:"0 -8px 24px rgba(0,0,0,.12)"},children:(0,t.jsxs)("div",{style:{maxWidth:1280,margin:"0 auto",padding:"14px 24px calc(14px + env(safe-area-inset-bottom))",display:"flex",alignItems:"center",gap:16,flexWrap:"wrap"},children:[(0,t.jsxs)("div",{style:{flex:1,minWidth:220},children:[(0,t.jsx)("div",{style:{fontSize:15,fontWeight:600},children:"æ³ç宿´èª²ç¨ï¼ç«å³å ±åè§£éå
¨é¨å®å
"}),(0,t.jsx)("div",{style:{fontSize:13,opacity:.9,marginTop:4}
1,children:l.course.shortDescription||l.course.title})]}),j?(0,t.jsx)("button",{type:"button",onClick:()=>f(j.id),style:{background:"rgba(0,0,0,.18)",color:"inherit",border:"1px solid rgba(255,255,255,.4)",padding:"10px 16px",borderRadius:999,fontSize:13,cursor:"pointer",fontWeight:500},children:"çä¸ä¸å試çå®å â"}):null,(0,t.jsx)(n.Link,{href:`/courses/${l.course.slug}`,locale:e,style:{background:"#000",color:"#fff",padding:"10px 18px",borderRadius:999,fontSize:13,fontWeight:600,textDecoration:"none"},children:"ç«å³å ±å"})]})}),(0,t.jsx)("style",{children:` 2 @media (max-width: 900px) { 3 .preview-watch-grid { 4 grid-template-columns: 1fr !important; 5 } 6 } 7 `})]})}],379612)},431569,e=>{"use strict";let t="https://x.invalid";e.s(["isSafeInternalPath",0,function(e){let r;if("string"!=typeof e||0===e.length||!e.startsWith("/")||e.startsWith("//")||function(e){for(let t=0;t<e.length;t+=1){let r=e.charCodeAt(t);if(r<=31||127===r||92===r)return!0}return!1}(e))return!1;try{r=new URL(e,`${t}/`)}catch{return!1}return r.origin===t&&r.pathname.startsWith("/")}])},122434,e=>{"use strict";var t=e.i(431569);let r=["zh-TW","en","ja","ko"],n=r.map(e=>`/${e}`);
7e.s(["DEFAULT_ACCOUNT_REDIRECT",0,"/account","SUPPORTED_LOCALES",0,r,"safeRedirectTarget",0,function(e){if("string"!=typeof e)return null;let r=e.trim();if(!(0,t.isSafeInternalPath)(r))return null;let i=function(e){for(let t of n){if(e===t)return"/";if(e.startsWith(t+"/"))return e.slice(t.length)}return e}(r);return(0,t.isSafeInternalPath)(i)?i:null}])},54129,e=>{"use strict";var t=e.i(23995),r=e.i(647083),n=e.i(349173),i=e.i(914506),a=e.i(851396),l=e.i(190435),o=e.i(296473),s=e.i(592213);e.s(["CopyReferralLink",0,function({code:e}){let u=(0,n.useTranslations)("account"),c=(0,o.useToast)(),[d,f]=(0,r.useState)(!1),[p,m]=(0,r.useState)(!1),h=window.location.origin,g=(0,s.buildReferralLink)(h,"/",e);async function y(){try{await navigator.clipboard.writeText(g),f(!0),c.push(u("affCopyLinkSuccess"),"success"),setTimeout(()=>f(!1),2e3)}catch{c.push(u("affCopyFailed"),"error")}}return(0,t.jsxs)("div",{className:"rounded-xl border border-[var(--st-line)] bg-[color-mix(in_srgb,var(--st-brand)_8%,var(--st-bg))] p-5",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,t.jsx)("div",{className:"text-xs text-[var(--st-fg-muted)]",children:u("affReferralLinkLabel")}),(0,t.jsxs)("button",{onClick:()=>m(!p),className:"text-xs text-[var(--color-brand)] hover:underline inline-flex items-center gap-1",children:[(0,t.jsx)(l.Info,{size:12})," ",u("affHowToUse")]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("code",{className:"flex-1 truncate text-sm font-mono px-3 py-2 bg-[var(--st-bg-elev)] rounded-lg border border-[var(--st-line)]",children:g}),(0,t.jsxs)("button",{onClick:y,className:"px-3 py-2 rounded-lg bg-[var(--color-brand)] text-white text-sm flex items-center gap-1.5 hover:opacity-90",children:[d?(0,t.jsx)(a.Check,{size:14}):(0,t.jsx)(i.Copy,{size:14}),d?u("commonCopied"):u("commonCopy")]})]}),(0,t.jsxs)("p",{className:"text-xs text-[var(--st-fg-muted)] mt-2",children:[u("affYourCode"),(0,t.jsx)("span",{className:"font-mono font-semibold text-[var(--color-text-primary)]",children:e})]}),p&&(0,t.jsxs)("div",{className:"mt-4 p-3 rounded-lg st-chip st-chip-info text-xs space-y-2",children:[(0,t.jsx)("p",{className:"font-semibold",children:u("affHelpTitle")}),(0,t.jsx)("p",{children:u.rich("affHelpBody",{refCode:e,b:e=>(0,t.jsx)("strong",{children:e}),c:e=>(0,t.jsx)("code",{className:"mx-1 px-1.5 py-0.5 bg-[var(--st-bg-elev)] rounded",children:e})})}),(0,t.jsx)("p",{children:u("affHelpExamples")}),(0,t.jsxs)("ul",{className:"space-y-0.5 ml-3",children:[(0,t.jsxs)("li",{children:["⢠",u.rich("affHelpExampleProduct",{origin:h,refCode:e,c:e=>(0,t.jsx)("code",{className:"font-mono",children:e})})]}),(0,t.jsxs)("li",{children:["⢠",u.rich("affHelpExampleCourse",{origin:h,refCode:e,c:e=>(0,t.jsx)("code",{className:"font-mono",children:e})})]}),(0,t.jsxs)("li",{children:["⢠",u.rich("affHelpExampleBlog",{origin:h,refCode:e,c:e=>(0,t.jsx)("code",{className:"font-mono",children:e})})]})]}),(0,t.jsx)("p",{children:u("affHelpFooter")})]})]})}])},554425,e=>{"use strict";var t=e.i(23995),r=e.i(349173),n=e.i(37277);e.s(["ApplyAffiliateButton",0,function(){let e=(0,r.useTranslations)("account"),i=(0,n.useRouter)();return(0,t.jsx)("button",{onClick:()=>i.push("/account/affiliate/apply"),className:"mt-5 inline-flex items-center gap-2 px-5 py-2.5 rounded-lg bg-[var(--color-brand)] text-white text-sm font-medium hover:opacity-90",children:e("affApplyCta")})}])},37424,e=>{"use strict";var t=e.i(23995),r=e.i(647083),n=e.i(238811),i=e.i(851396),a=e.i(650126);let l=["enrolled","recent","name"];e.s(["CoursesSortSelect",0,function({value:e,basePath:o,extraQuery:s,labels:u,paramName:c="sort",tokens:d="account"}){let f=(0,n.useRouter)(),[p,m]=(0,r.useState)(!1),h=(0,r.useRef)(null),g="storefront"===d?{muted:"var(--st-fg-muted)",line:"var(--st-line)",bgElev:"var(--st-bg-elev)",fg:"var(--st-fg)"}:{muted:"var(--muted)",line:"var(--line)",bgElev:"var(--bg-elev)",fg:"var(--fg)"};(0,r.useEffect)(()=>{if(!p)return;let e=e=>{if(e instanceof KeyboardEvent){"Escape"===e.key&&m(!1);return}h.current&&!h.current.contains(e.target)&&m(!1)};return document.addEventListener("mousedown",e),document.addEventListener("keydown",e),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",e)}}
7,[p]);let y=e=>"name"===e?u.name:"recent"===e?u.recent:u.enrolled;return(0,t.jsxs)("div",{ref:h,style:{position:"relative",display:"inline-flex",alignItems:"center",gap:8,fontSize:13,color:g.muted},children:[u.label,(0,t.jsxs)("button",{type:"button",onClick:()=>m(e=>!e),"aria-haspopup":"listbox","aria-expanded":p,style:{display:"inline-flex",alignItems:"center",gap:6,padding:"6px 10px",borderRadius:8,border:`1px solid ${g.line}`,background:g.bgElev,color:g.fg,fontSize:13,cursor:"pointer"},children:[y(e),(0,t.jsx)(a.ChevronDown,{size:13,"aria-hidden":!0,style:{transform:p?"rotate(180deg)":"none",transition:"transform 0.15s"}})]}),p&&(0,t.jsx)("ul",{role:"listbox",style:{position:"absolute",top:"100%",right:0,marginTop:4,minWidth:140,listStyle:"none",padding:4,margin:0,borderRadius:8,border:`1px solid ${g.line}`,background:g.bgElev,boxShadow:"0 4px 16px rgba(0,0,0,0.12)",zIndex:20},children:l.map(r=>(0,t.jsx)("li",{role:"option","aria-selected":e===r,children:(0,t.jsxs)("button",{type:"button",onClick:()=>{let e;m(!1),(e=new URLSearchParams(s)).set(c,r),f.push(`${o}?${e.toString()}`)},style:{display:"flex",alignItems:"center",gap:6,width:"100%",padding:"6px 8px",borderRadius:6,border:"none",background:"none",color:g.fg,fontSize:13,textAlign:"left",cursor:"pointer"},children:[(0,t.jsx)("span",{style:{width:14,flexShrink:0,display:"inline-flex"},children:e===r&&(0,t.jsx)(i.Check,{size:13,"aria-hidden":!0})}),y(r)]})},r))})]})}])},769020,e=>{"use strict";let t=(0,e.i(139318).default)("hourglass",[["path",{d:"M5 22h14",key:"ehvnwv"}],["path",{d:"M5 2h14",key:"pdyrp9"}],["path",{d:"M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22",key:"1d314k"}],["path",{d:"M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2",key:"1vvvr6"}]]);e.s(["Hourglass",0,t],769020)},21411,e=>{"use strict";var t=e.i(23995),r=e.i(349173);e.s(["default",0,function({value:e,onChange:n,min:i=1,max:a}){let l=(0,r.useTranslations)("shopUi"),o=e=>{let t=Math.max(i,e);return void 0!==a?Math.min(a,t):t};return(0,t.jsxs)("div",{className:"zb-qty-input inline-flex items-center border border-gray-300 rounded-md overflow-hidden",children:[(0,t.jsx)("button",{type:"button",onClick:()=>n(o(e-1)),className:"zb-qty-btn w-8 h-8 text-base leading-none hover:bg-gray-100 select-none","aria-label":l("decreaseQty"),children:"â"}),(0,t.jsx)("input",{type:"number",min:i,max:a,value:e,onChange:e=>{let t=parseInt(e.target.value,10);n(Number.isFinite(t)?o(t):i)},className:"zb-qty-num w-10 h-8 text-center text-sm border-x border-gray-300 outline-none [-moz-appearance:textfield] [&::-webkit-outer-spin-button]:m-0 [&::-webkit-outer-spin-button]:[-webkit-appearance:none] [&::-webkit-inner-spin-button]:m-0 [&::-webkit-inner-spin-button]:[-webkit-appearance:none]"}),(0,t.jsx)("button",{type:"button",onClick:()=>n(o(e+1)),disabled:void 0!==a&&e>=a,className:"zb-qty-btn w-8 h-8 text-base leading-none hover:bg-gray-100 select-none disabled:opacity-40","aria-label":l("increaseQty"),children:"+"})]})}])}]);
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.