1import{_ as b}from"./main.js";import{aX as d,C as i,E as t,U as n,T as h,W as C,P as g,D as l,V as m,am as f,O as T,H as v,R as w}from"./vendors.js";import"./vendor-element.js";const V={name:"ChatGPT",data(){return{countryValue:"",countryList:[],familypro_plans:[],country_config:{},country_price:[],exchange_rates:{},currency:"USD",currencySymbol:"$",interval_type:"month",share_type:"personal"}},computed:{currentCountryLabel(){return this.countryValue?this.$t("3-in-1.country."+this.countryValue):"--"},currentCurrencyLabel(){return this.currency?this.$t("3-in-1.currency."+this.currency):"--"}},async created(){await this.init()},methods:{async getChatGPTData(){const e="https://fronted.familypro.io/familypro/resource/triple/price/ChatGPT_config_updated.json";try{const r=await fetch(e);if(!r.ok)throw new Error(`HTTP ${r.status}`);const o=await r.json(),u=Array.isArray(o.country_list)?o.country_list:[];this.countryList=[...u].sort((c,s)=>c.localeCompare(s)),this.familypro_plans=o.familypro_plans||[],this.country_config=o.country_config||{},this.exchange_rates=o.exchange_rates||{}}catch(r){console.warn("ChatGPT é
ç½®å 载失败: ",r),this.$message({type:"warning",message:"ä»·æ ¼æ°æ®å 载失败ï¼è¯·ç¨åå·æ°éè¯"})}},async init(){await this.getChatGPTData(),this.countryList.length>0&&this.handleCurrentChange(this.countryList[0])},handleCurrentChange(e){const r=this.country_config[e];r&&(this.currency=r.currency||"USD",this.currencySymbol=r.symbol||"$",this.interval_type=r.interval_type||"month",this.share_type=r.share_type||"personal",this.country_price=Array.isArray(r.price_list)?r.price_list:[],this.countryValue=e)},getFamilyProPlan(e){const r=this.familypro_plans.find(_=>_.plan_name===e);if(!r)return null;const o=this.currency||"USD";if(o==="USD"||o===r.currency)return r;const u=this.exchange_rates.CNY_PER_USD,c=this.exchange_rates[`CNY_PER_${o}`];if(!u||!c)return r;const s=u/c,y=r.price_list.map(_=>({..._,price:parseFloat((_.price*s).toFixed(2))}));return{...r,currency:o,symbol:this.currencySymbol,price_list:y}},jumpToPlan(e){if(!this.getFamilyProPlan(e))return;let o="https://familypro.io/en/products/gpt";e==="ChatGPT Go"&&(o="https://familypro.io/en/products/gpt-go"),window.open(`${o}?utm_source=3to1`,"_blank")},formatPrice(e){return e===0?"Free":typeof e=="number"?e.toLocaleString():e},formatPlanName(e){return typeof e=="string"?e.replace(/ChatGPT/gi,"GPT"):e},getPlanCardClass(e){return e==="ChatGPT-Free"?"planCard--free":e.includes("Pro")?"planCard--pro":e==="ChatGPT Plus"?"planCard--popular":""}}},L={class:"chatGPTContent"},G={class:"heroCard"},k={class:"heroCopy"},F={class:"eyebrow"},S={class:"heroTitle"},$={class:"heroDesc"},D={class:"heroControls"},U={class:"selectLabel",for:"chatgpt-country-select"},B={class:"planComparison"},E={class:"comparisonHeader"},O={class:"planGrid"},j={class:"planCard__header"},A={class:"planCard__name"},R={class:"planCard__price"},H={class:"planCard__priceValue"},N={class:"planCard__priceMeta"},Y={class:"planCard__badge"},z={key:0,class:"planCard__familypro"},I={class:"familyproTag"},M={class:"familyproOptions"},W={class:"familyproOption__price"},X={class:"familyproOption__meta"},q={key:1,class:"planCard__noFamilypro"},J={class:"noFamilyproLabel"},K={class:"endText"},Q={class:"endTextValue"},Z={class:"countryValue"},x={class:"endTextValue"};function ee(e,r,o,u,c,s){const y=d("el-option"),_=d("el-select"),P=d("el-button");return l(),i("div",L,[t("section",G,[t("div",k,[t("span",F,n(e.$t("3-in-1.chatgpt.select_desc_one")),1),t("h2",S,n(s.currentCountryLabel),1),t("p",$,[h(n(e.$t("3-in-1.chatgpt.select_desc_two"))+" ",1),t("strong",null,n(s.currentCurrencyLabel),1)])]),t("div",D,[t("label",U,n(e.$t("3-in-1.chatgpt.select_country")),1),C(_,{id:"chatgpt-country-select",modelValue:c.countryValue,"onUpdate:modelValue":r[0]||(r[0]=a=>c.countryValue=a),placeholder:"Select",class:"selectBlock",filterable:"",onChange:s.handleCurrentChange},{default:g(()=>[(l(!0),i(m,null,f(c.countryList,a=>(l(),T(y,{key:a,label:e.$t("3-in-1.country."+a),value:a},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])])]),t("section",B,[t("div",E,[t("h3",null,n(e.$t("3-in-1.chatgpt.official_price")),1),t("p",null,n(e.$t("3-in-1.chatgpt.price_desc")),1
1)]),t("div",O,[(l(!0),i(m,null,f(c.country_price,a=>(l(),i("article",{key:a.plan_name,class:v(["planCard",s.getPlanCardClass(a.plan_name)])},[t("div",j,[t("h4",A,n(s.formatPlanName(a.plan_name)),1),t("div",R,[t("span",H,n(c.currencySymbol)+n(s.formatPrice(a.price)),1),t("span",N,"/ "+n(e.$t("web.used_interval_count."+c.interval_type)),1)]),t("div",Y,n(e.$t("3-in-1.chatgpt."+c.share_type)),1)]),s.getFamilyProPlan(a.plan_name)?(l(),i("div",z,[t("div",I,n(e.$t("3-in-1.chatgpt.price_in_familypro")),1),t("div",M,[(l(!0),i(m,null,f(s.getFamilyProPlan(a.plan_name).price_list,p=>(l(),i("div",{key:p.share_type,class:"familyproOption"},[t("span",W,n(s.getFamilyProPlan(a.plan_name).symbol)+n(p.price),1),t("span",X," / "+n(e.$t("web.used_interval_count."+p.interval_type))+" · "+n(e.$t("web.share_type."+p.share_type)),1)]))),128))]),C(P,{class:"familyproBtn",onClick:p=>s.jumpToPlan(a.plan_name)},{default:g(()=>[h(n(e.$t("3-in-1.chatgpt.buy_now")),1)]),_:1},8,["onClick"])])):a.plan_name!=="ChatGPT-Free"?(l(),i("div",q,[t("span",J,n(e.$t("3-in-1.chatgpt.no_familypro")),1)])):w("",!0)],2))),128))])]),t("div",K,[t("p",Q,[h(n(e.$t("3-in-1.chatgpt.current_country_one"))+" ",1),t("span",Z,n(s.currentCountryLabel),1),h(" "+n(e.$t("3-in-1.chatgpt.current_country_two")),1)]),t("p",x,n(e.$t("3-in-1.chatgpt.other_desc")),1)])])}const se=b(V,[["render",ee],["__scopeId","data-v-ced1c96b"]]);export{se as default};
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.