CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
sagemathinc

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/frontend/billing/data.ts
Views: 687
1
/*
2
* This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3
* License: MS-RSL – see LICENSE.md for details
4
*/
5
6
import { IconName } from "@cocalc/frontend/components";
7
8
export const TEACHER_PAYS =
9
"https://doc.cocalc.com/teaching-upgrade-course.html#teacher-or-institution-pays-for-upgrades";
10
export const STUDENT_PAYS =
11
"https://doc.cocalc.com/teaching-upgrade-course.html#students-pay-for-upgrades";
12
export const INSTRUCTOR_GUIDE =
13
"https://doc.cocalc.com/teaching-instructors.html";
14
export const DOC_LICENSE_URL = "https://doc.cocalc.com/licenses.html";
15
export const DOC_ACCOUNT_LICENSES =
16
"https://doc.cocalc.com/account/licenses.html";
17
18
export const COUNTRIES: string[] =
19
",United States,Canada,Spain,France,United Kingdom,Germany,Russia,Colombia,Mexico,Italy,Afghanistan,Albania,Algeria,American Samoa,Andorra,Angola,Anguilla,Antarctica,Antigua and Barbuda,Argentina,Armenia,Aruba,Australia,Austria,Azerbaijan,Bahamas,Bahrain,Bangladesh,Barbados,Belarus,Belgium,Belize,Benin,Bermuda,Bhutan,Bolivia,Bosnia and Herzegovina,Botswana,Bouvet Island,Brazil,British Indian Ocean Territory,British Virgin Islands,Brunei,Bulgaria,Burkina Faso,Burundi,Cambodia,Cameroon,Canada,Cape Verde,Cayman Islands,Central African Republic,Chad,Chile,China,Christmas Island,Cocos (Keeling) Islands,Colombia,Comoros,Congo,Cook Islands,Costa Rica,Cote d'Ivoire,Croatia,Cuba,Cyprus,Czech Republic,Democratic Republic of The Congo,Denmark,Djibouti,Dominica,Dominican Republic,Ecuador,Egypt,El Salvador,Equatorial Guinea,Eritrea,Estonia,Ethiopia,Falkland Islands,Faroe Islands,Fiji,Finland,France,French Guiana,French Polynesia,French Southern and Antarctic Lands,Gabon,Gambia,Georgia,Germany,Ghana,Gibraltar,Greece,Greenland,Grenada,Guadeloupe,Guam,Guatemala,Guinea,Guinea-Bissau,Guyana,Haiti,Heard Island and McDonald Islands,Honduras,Hong Kong,Hungary,Iceland,India,Indonesia,Iran,Iraq,Ireland,Israel,Italy,Jamaica,Japan,Jordan,Kazakhstan,Kenya,Kiribati,Kuwait,Kyrgyzstan,Laos,Latvia,Lebanon,Lesotho,Liberia,Libya,Liechtenstein,Lithuania,Luxembourg,Macao,Macedonia,Madagascar,Malawi,Malaysia,Maldives,Mali,Malta,Marshall Islands,Martinique,Mauritania,Mauritius,Mayotte,Mexico,Micronesia,Moldova,Monaco,Mongolia,Montenegro,Montserrat,Morocco,Mozambique,Myanmar,Namibia,Nauru,Nepal,Netherlands,Netherlands Antilles,New Caledonia,New Zealand,Nicaragua,Niger,Nigeria,Niue,Norfolk Island,North Korea,Northern Mariana Islands,Norway,Oman,Pakistan,Palau,Palestine,Panama,Papua New Guinea,Paraguay,Peru,Philippines,Pitcairn Islands,Poland,Portugal,Puerto Rico,Qatar,Reunion,Romania,Rwanda,Saint Helena,Saint Kitts and Nevis,Saint Lucia,Saint Pierre and Miquelon,Saint Vincent and The Grenadines,Samoa,San Marino,Sao Tome and Principe,Saudi Arabia,Senegal,Serbia,Seychelles,Sierra Leone,Singapore,Slovakia,Slovenia,Solomon Islands,Somalia,South Africa,South Georgia and The South Sandwich Islands,South Korea,South Sudan,Spain,Sri Lanka,Sudan,Suriname,Svalbard and Jan Mayen,Swaziland,Sweden,Switzerland,Syria,Taiwan,Tajikistan,Tanzania,Thailand,Timor-Leste,Togo,Tokelau,Tonga,Trinidad and Tobago,Tunisia,Turkey,Turkmenistan,Turks and Caicos Islands,Tuvalu,Uganda,Ukraine,United Arab Emirates,United Kingdom,United States,United States Minor Outlying Islands,Uruguay,Uzbekistan,Vanuatu,Vatican City,Venezuela,Vietnam,Wallis and Futuna,Western Sahara,Yemen,Zambia,Zimbabwe".split(
20
","
21
);
22
23
export const STATES: { [code: string]: string } = {
24
"": "",
25
AL: "Alabama",
26
AK: "Alaska",
27
AZ: "Arizona",
28
AR: "Arkansas",
29
CA: "California",
30
CO: "Colorado",
31
CT: "Connecticut",
32
DE: "Delaware",
33
FL: "Florida",
34
GA: "Georgia",
35
HI: "Hawaii",
36
ID: "Idaho",
37
IL: "Illinois",
38
IN: "Indiana",
39
IA: "Iowa",
40
KS: "Kansas",
41
KY: "Kentucky",
42
LA: "Louisiana",
43
ME: "Maine",
44
MD: "Maryland",
45
MA: "Massachusetts",
46
MI: "Michigan",
47
MN: "Minnesota",
48
MS: "Mississippi",
49
MO: "Missouri",
50
MT: "Montana",
51
NE: "Nebraska",
52
NV: "Nevada",
53
NH: "New Hampshire",
54
NJ: "New Jersey",
55
NM: "New Mexico",
56
NY: "New York",
57
NC: "North Carolina",
58
ND: "North Dakota",
59
OH: "Ohio",
60
OK: "Oklahoma",
61
OR: "Oregon",
62
PA: "Pennsylvania",
63
RI: "Rhode Island",
64
SC: "South Carolina",
65
SD: "South Dakota",
66
TN: "Tennessee",
67
TX: "Texas",
68
UT: "Utah",
69
VT: "Vermont",
70
VA: "Virginia",
71
WA: "Washington",
72
WV: "West Virginia",
73
WI: "Wisconsin",
74
WY: "Wyoming",
75
AS: "American Samoa",
76
DC: "District of Columbia",
77
GU: "Guam",
78
MP: "Northern Mariana Islands",
79
PR: "Puerto Rico",
80
VI: "United States Virgin Islands",
81
};
82
83
export function brand_to_icon_name(brand: undefined | string): IconName {
84
if (brand != null && ["discover", "mastercard", "visa"].includes(brand)) {
85
return `cc-${brand}` as IconName;
86
} else {
87
return "credit-card";
88
}
89
}
90
91
import { upgrades } from "@cocalc/util/upgrade-spec";
92
93
export const STUDENT_COURSE_PRICE: number =
94
upgrades.subscription.student_course.price.month4;
95
96