<commit_before>const routerBase = ''
const fbAppID = process.env.SERVER === 'prod' ? '1061200460616036' : '331606597252844'
const fbAdmins = 286133171723936
const utmCampaign = 'project_name'
const serverHostname = Object.assign({
  dev: 'https://www.fundrich.com.tw' // 開發環境、系統集成測試（AWS）、用戶驗收測試（業演）、正式環境（竹北）、正式環境
}, require('../../common-elements/assets/js/data/server-hostname.json'))
const axiosBaseURL = Object.assign({
  dev: ['https://www.fundrich.com.tw', 'https://www.fundrich.com.tw'] // 前為 server 內部位置, 後為 client 外部位置
}, require('../../common-elements/assets/js/data/axios-base-url.json'))
const staticURL = require('../../common-elements/assets/js/data/static-url.json')
const axiosServiceURL = Object.assign({
  serverBaseURL: axiosBaseURL[process.env.SERVER][0],
  clientBaseURL: axiosBaseURL[process.env.SERVER][1]
}, require('../../common-elements/assets/js/data/axios-service-url.json'))

module.exports = {
  mode: 'universal',

  /*
   * Create environment variables that will be shared for the client and server-side.
   */
  env: {
    routerBase,
    fbAppID,
    nodeServer: process.env.SERVER,
    serverHostname,
    staticURL,
    axios: axiosServiceURL
  },

  /*
  ** Headers of the page
  */
  head: {
    titleTemplate: '%s - FundRich 基富通',
    title: '網頁標題',
    htmlAttrs: {
      lang: 'zh-Hant-TW',
      prefix: 'og: http://ogp.me/ns#'
    },
    link: [
      { rel: 'icon', type: 'image/x-icon', href: `${routerBase}/favicon.ico` },
      { rel: 'icon', type: 'image/png', href: `${routerBase}/favicon.png` },
      { rel: 'apple-touch-startup-image', href: `${routerBase}/launch-640x1136.png`, media: '(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)' },
      { rel: 'apple-touch-startup-image', href: `${routerBase}/launch-750x1294.png`, media: '(device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)' },
      { rel: 'apple-touch-startup-image', href: `${routerBase}/launch-1242x2148.png`, media: '(device-width: 414px) and (device-height: 736px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)' },
      { rel: 'apple-touch-startup-image', href: `${routerBase}/launch-1125x2436.png`, media: '(device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)' },
      { rel: 'apple-touch-startup-image', href: `${routerBase}/launch-1536x2048.png`, media: '(min-device-width: 768px) and (max-device-width: 1024px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait)' },
      { rel: 'apple-touch-startup-image', href: `${routerBase}/launch-1668x2224.png`, media: '(min-device-width: 834px) and (max-device-width: 834px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait)' },
      { rel: 'apple-touch-startup-image', href: `${routerBase}/launch-2048x2732.png`, media: '(min-device-width: 1024px) and (max-device-width: 1024px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait)' }
    ],
    meta: [
      { charset: 'utf-8' },
      { name: 'viewport', content: 'width=device-width,initial-scale=1.0,viewport-fit=cover' },
      { name: 'apple-mobile-web-app-capable', content: 'yes' },
      { name: 'apple-mobile-web-app-status-bar-style', content: 'white' },
      { hid: 'keywords', name: 'keywords', content: '基富通,買基金,折扣優惠' },
      { hid: 'description', name: 'description', content: '基富通提供股票基金、債券基金、配息基金，等超過二千多級別的基金商品！並有基金淨值、基金搜尋、基金排行、智能理財多種投資理財工具，是您定期定額、單筆基金投資的好選擇！' },
      { property: 'og:type', content: 'website' },
      { property: 'og:site_name', content: 'FundRich 基富通 - 網路基金銷售平台' },
      { hid: 'og:url', property: 'og:url', content: `${serverHostname[process.env.SERVER]}${routerBase || '/'}` },
      { hid: 'og:title', property: 'og:title', content: '網頁標題 - FundRich 基富通' },
      { hid: 'og:description', property: 'og:description', content: '基富通提供股票基金、債券基金、配息基金，等超過二千多級別的基金商品！並有基金淨值、基金搜尋、基金排行、智能理財多種投資理財工具，是您定期定額、單筆基金投資的好選擇！' },
      { hid: 'og:image', property: 'og:image', content: `${serverHostname[process.env.SERVER]}${routerBase}/og.jpg` },
      { hid: 'og:image:type', property: 'og:image:type', content: 'image/jpeg' },
      { property: 'og:image:width', content: '1200' },
      { property: 'og:image:height', content: '628' },
      { property: 'fb:app_id', content: fbAppID },
      { property: 'fb:admins', content: fbAdmins },
      { property: 'fb:pages', content: fbAdmins },
      { 'http-equiv': 'cache-control', content: 'max-age=900' } // 活動站需要時時更新，從 client 端指定沒有 cache 週期
    ],
    script: [
      { hid: 'global-variable-magic', type: 'text/javascript', innerHTML: `var MAGIC_DOMAIN = '${serverHostname[process.env.SERVER]}'; var MAGIC_DOMAIN_API = '${axiosBaseURL[process.env.SERVER][1]}';`, body: true },
      { hid: 'global-variable-twca',  type: 'text/javascript', innerHTML: `var twca_cn = 'www.fundrich.com.tw';`, body: true },
      { type: 'text/javascript', src: '//ssllogo.twca.com.tw/twcaseal_v3.js', body: true }
    ],
    __dangerouslyDisableSanitizersByTagID: { 'global-variable-magic': ['innerHTML'], 'global-variable-twca': ['innerHTML'] }
  },

  /*
  ** Customize the progress-bar color
  */
  loading: { color: '#ba9764' },

  /*
   ** Customize app manifest
   */<commit_msg>type: 'text/javascript' 貌似用不到, 先移除<commit_after>const routerBase = ''
const fbAppID = process.env.SERVER === 'prod' ? '1061200460616036' : '331606597252844'
const fbAdmins = 286133171723936
const utmCampaign = 'project_name'
const serverHostname = Object.assign({
  dev: 'https://www.fundrich.com.tw' // 開發環境、系統集成測試（AWS）、用戶驗收測試（業演）、正式環境（竹北）、正式環境
}, require('../../common-elements/assets/js/data/server-hostname.json'))
const axiosBaseURL = Object.assign({
  dev: ['https://www.fundrich.com.tw', 'https://www.fundrich.com.tw'] // 前為 server 內部位置, 後為 client 外部位置
}, require('../../common-elements/assets/js/data/axios-base-url.json'))
const staticURL = require('../../common-elements/assets/js/data/static-url.json')
const axiosServiceURL = Object.assign({
  serverBaseURL: axiosBaseURL[process.env.SERVER][0],
  clientBaseURL: axiosBaseURL[process.env.SERVER][1]
}, require('../../common-elements/assets/js/data/axios-service-url.json'))

module.exports = {
  mode: 'universal',

  /*
   * Create environment variables that will be shared for the client and server-side.
   */
  env: {
    routerBase,
    fbAppID,
    nodeServer: process.env.SERVER,
    serverHostname,
    staticURL,
    axios: axiosServiceURL
  },

  /*
  ** Headers of the page
  */
  head: {
    titleTemplate: '%s - FundRich 基富通',
    title: '網頁標題',
    htmlAttrs: {
      lang: 'zh-Hant-TW',
      prefix: 'og: http://ogp.me/ns#'
    },
    link: [
      { rel: 'icon', type: 'image/x-icon', href: `${routerBase}/favicon.ico` },
      { rel: 'icon', type: 'image/png', href: `${routerBase}/favicon.png` },
      { rel: 'apple-touch-startup-image', href: `${routerBase}/launch-640x1136.png`, media: '(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)' },
      { rel: 'apple-touch-startup-image', href: `${routerBase}/launch-750x1294.png`, media: '(device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)' },
      { rel: 'apple-touch-startup-image', href: `${routerBase}/launch-1242x2148.png`, media: '(device-width: 414px) and (device-height: 736px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)' },
      { rel: 'apple-touch-startup-image', href: `${routerBase}/launch-1125x2436.png`, media: '(device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)' },
      { rel: 'apple-touch-startup-image', href: `${routerBase}/launch-1536x2048.png`, media: '(min-device-width: 768px) and (max-device-width: 1024px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait)' },
      { rel: 'apple-touch-startup-image', href: `${routerBase}/launch-1668x2224.png`, media: '(min-device-width: 834px) and (max-device-width: 834px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait)' },
      { rel: 'apple-touch-startup-image', href: `${routerBase}/launch-2048x2732.png`, media: '(min-device-width: 1024px) and (max-device-width: 1024px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait)' }
    ],
    meta: [
      { charset: 'utf-8' },
      { name: 'viewport', content: 'width=device-width,initial-scale=1.0,viewport-fit=cover' },
      { name: 'apple-mobile-web-app-capable', content: 'yes' },
      { name: 'apple-mobile-web-app-status-bar-style', content: 'white' },
      { hid: 'keywords', name: 'keywords', content: '基富通,買基金,折扣優惠' },
      { hid: 'description', name: 'description', content: '基富通提供股票基金、債券基金、配息基金，等超過二千多級別的基金商品！並有基金淨值、基金搜尋、基金排行、智能理財多種投資理財工具，是您定期定額、單筆基金投資的好選擇！' },
      { property: 'og:type', content: 'website' },
      { property: 'og:site_name', content: 'FundRich 基富通 - 網路基金銷售平台' },
      { hid: 'og:url', property: 'og:url', content: `${serverHostname[process.env.SERVER]}${routerBase || '/'}` },
      { hid: 'og:title', property: 'og:title', content: '網頁標題 - FundRich 基富通' },
      { hid: 'og:description', property: 'og:description', content: '基富通提供股票基金、債券基金、配息基金，等超過二千多級別的基金商品！並有基金淨值、基金搜尋、基金排行、智能理財多種投資理財工具，是您定期定額、單筆基金投資的好選擇！' },
      { hid: 'og:image', property: 'og:image', content: `${serverHostname[process.env.SERVER]}${routerBase}/og.jpg` },
      { hid: 'og:image:type', property: 'og:image:type', content: 'image/jpeg' },
      { property: 'og:image:width', content: '1200' },
      { property: 'og:image:height', content: '628' },
      { property: 'fb:app_id', content: fbAppID },
      { property: 'fb:admins', content: fbAdmins },
      { property: 'fb:pages', content: fbAdmins },
      { 'http-equiv': 'cache-control', content: 'max-age=900' } // 活動站需要時時更新，從 client 端指定沒有 cache 週期
    ],
    script: [
      { hid: 'global-variable-magic', innerHTML: `var MAGIC_DOMAIN = '${serverHostname[process.env.SERVER]}'; var MAGIC_DOMAIN_API = '${axiosBaseURL[process.env.SERVER][1]}';`, body: true },
      { hid: 'global-variable-twca', innerHTML: `var twca_cn = 'www.fundrich.com.tw';`, body: true },
      { src: '//ssllogo.twca.com.tw/twcaseal_v3.js', body: true }
    ],
    __dangerouslyDisableSanitizersByTagID: { 'global-variable-magic': ['innerHTML'], 'global-variable-twca': ['innerHTML'] }
  },

  /*
  ** Customize the progress-bar color
  */
  loading: { color: '#ba9764' },

  /*
   ** Customize app manifest
   */
{'fraction_non_alphanumeric': 0.1936337017096439, 'fraction_numerical': 0.032681590630017944, 'mean_word_length': 4.0587673196368845, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 8, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6769180', 'n_tokens_mistral': 4382, 'n_tokens_neox': 4236, 'n_words': 705}