(function(){var e={328:function(e){var n=Object.defineProperty;var t=Object.getOwnPropertyDescriptor;var r=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var __export=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:true})};var __copyProps=(e,o,i,c)=>{if(o&&typeof o==="object"||typeof o==="function"){for(let s of r(o))if(!a.call(e,s)&&s!==i)n(e,s,{get:()=>o[s],enumerable:!(c=t(o,s))||c.enumerable})}return e};var __toCommonJS=e=>__copyProps(n({},"__esModule",{value:true}),e);var o={};__export(o,{default:()=>analytics_default});e.exports=__toCommonJS(o);var analytics_default=e=>{const n=process.env.GA_KEY;const t=process.env.GA_V2_KEY;const enableBy=e=>e.config.analytics||n;e.describe({key:"analytics",config:{schema({zod:e}){return e.object({baidu:e.string(),ga:e.string(),ga_v2:e.string()}).partial()},onChange:e.ConfigChangeType.reload},enableBy:enableBy});const baiduTpl=e=>`\n    (function() {\n      var hm = document.createElement('script');\n      hm.src = '//hm.baidu.com/hm.js?${e}';\n      var s = document.getElementsByTagName('script')[0];\n      s.parentNode.insertBefore(hm, s);\n    })();\n  `;const gaTpl=e=>`\n    (function(){\n      if (!location.port) {\n        (function (i, s, o, g, r, a, m) {\n          i['GoogleAnalyticsObject'] = r;\n          i[r] = i[r] || function () {\n              (i[r].q = i[r].q || []).push(arguments)\n            }, i[r].l = 1 * new Date();\n          a = s.createElement(o),\n            m = s.getElementsByTagName(o)[0];\n          a.async = 1;\n          a.src = g;\n          m.parentNode.insertBefore(a, m)\n        })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');\n        ga('create', '${e}', 'auto');\n        ga('send', 'pageview');\n      }\n    })();\n  `;const gaV2Tpl=e=>`\n      window.dataLayer = window.dataLayer || [];\n      function gtag(){dataLayer.push(arguments);}\n      gtag('js', new Date());\n      gtag('config', '${e}');\n    `.trim();e.addHTMLHeadScripts((()=>{const r=e.config.analytics||{};const{baidu:a,ga:o=n,ga_v2:i=t}=r;const c=[];if(a){c.push({content:"var _hmt = _hmt || [];"})}if(e.env!=="development"){if(a){c.push({content:baiduTpl(a)})}if(o){c.push({content:gaTpl(o)})}if(i){c.push({async:true,src:`//www.googletagmanager.com/gtag/js?id=${i}`},{content:gaV2Tpl(i)})}}return c.filter(Boolean)}))}}};var n={};function __nccwpck_require__(t){var r=n[t];if(r!==undefined){return r.exports}var a=n[t]={exports:{}};var o=true;try{e[t](a,a.exports,__nccwpck_require__);o=false}finally{if(o)delete n[t]}return a.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var t=__nccwpck_require__(328);module.exports=t})();