"use strict";
var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getServerSideProps = void 0;
var jsx_runtime_1 = require("react/jsx-runtime");
var icon_1 = require("@cocalc/frontend/components/icon");
var antd_1 = require("antd");
var footer_1 = __importDefault(require("components/landing/footer"));
var head_1 = __importDefault(require("components/landing/head"));
var header_1 = __importDefault(require("components/landing/header"));
var index_list_1 = __importDefault(require("components/landing/index-list"));
var A_1 = __importDefault(require("components/misc/A"));
var site_name_1 = __importDefault(require("components/share/site-name"));
var config_1 = require("lib/config");
var customize_1 = require("lib/customize");
var with_customize_1 = __importDefault(require("lib/with-customize"));
var blog_png_1 = __importDefault(require("public/info/blog.png"));
var cocalc_mailing_list_png_1 = __importDefault(require("public/info/cocalc-mailing-list.png"));
var discord_png_1 = __importDefault(require("public/info/discord.png"));
var facebook_png_1 = __importDefault(require("public/info/facebook.png"));
var github_discussions_png_1 = __importDefault(require("public/info/github-discussions.png"));
var github_png_1 = __importDefault(require("public/info/github.png"));
var share_png_1 = __importDefault(require("public/info/share.png"));
var stackoverflow_png_1 = __importDefault(require("public/info/stackoverflow.png"));
var twitter_png_1 = __importDefault(require("public/info/twitter.png"));
var imageWidth = "300px";
var dataSource = [
    {
        link: "https://discord.gg/nEHs2GK",
        title: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("b", { children: "Chat" }), " about CoCalc on Discord"] })),
        logo: "comment",
        image: discord_png_1.default,
        imageWidth: imageWidth,
        description: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Visit the ", (0, jsx_runtime_1.jsx)(A_1.default, __assign({ href: "https://discord.gg/nEHs2GK" }, { children: "CoCalc Discord server" })), " ", "to chat with other CoCalc users, ask questions, and give us quick feedback."] })),
    },
    {
        shareServer: true,
        link: "/share",
        logo: "bullhorn",
        imageWidth: imageWidth,
        image: share_png_1.default,
        title: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("b", { children: "Explore" }), " Published Files"] })),
        description: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(A_1.default, __assign({ href: "/share" }, { children: ["Browse the ", (0, jsx_runtime_1.jsx)(site_name_1.default, {}), " share server"] })), " ", "to see what other users of this site are publishing. You will find thousands of ", (0, jsx_runtime_1.jsx)(A_1.default, __assign({ href: "/features/jupyter-notebook" }, { children: "Jupyter notebooks" })), ", Sage worksheets, programs, PDF's, final projects from courses,", " ", (0, jsx_runtime_1.jsx)(A_1.default, __assign({ href: "/features/latex-editor" }, { children: "research papers" })), " and more."] })),
    },
    {
        logo: "solution",
        image: stackoverflow_png_1.default,
        imageWidth: imageWidth,
        link: "https://stackoverflow.com/",
        title: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("b", { children: "Ask" }), " on StackExchange"] })),
        description: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["There are many pages on", " ", (0, jsx_runtime_1.jsx)(A_1.default, __assign({ href: "https://stackexchange.com/sites" }, { children: "StackExchange" })), ", where you can get help from a broad community.", " ", (0, jsx_runtime_1.jsxs)("strong", { children: ["Make sure to tag CoCalc specific questions with ", (0, jsx_runtime_1.jsx)("code", { children: "\"cocalc\"" })] }), " ", "and add more tags matching the topic accordingly, e.g.", " ", (0, jsx_runtime_1.jsx)("code", { children: "\"python\"" }), ".", (0, jsx_runtime_1.jsxs)("ul", __assign({ style: { paddingLeft: "20px" } }, { children: [(0, jsx_runtime_1.jsxs)("li", { children: [(0, jsx_runtime_1.jsx)(A_1.default, __assign({ href: "https://stackoverflow.com/" }, { children: "StackOverflow" })), ": programming questions, for professional and enthusiast programmers"] }), (0, jsx_runtime_1.jsxs)("li", { children: [(0, jsx_runtime_1.jsx)(A_1.default, __assign({ href: "https://math.stackexchange.com/" }, { children: "Mathematics" })), ": for people studying math at any level and professionals in related fields"] })] }))] })),
    },
    {
        link: "https://groups.google.com/forum/?fromgroups#!forum/cocalc",
        logo: "envelope",
        image: cocalc_mailing_list_png_1.default,
        imageWidth: imageWidth,
        title: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("b", { children: "Email" }), " via the Google Groups Mailing List"] })),
        description: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Get announcements about CoCalc in your inbox, and use email to participate in discussions with the CoCalc community at the", " ", (0, jsx_runtime_1.jsx)(A_1.default, __assign({ href: "https://groups.google.com/forum/?fromgroups#!forum/cocalc" }, { children: "CoCalc mailing list" })), "."] })),
    },
    {
        link: "https://blog.cocalc.com/archive.html",
        logo: "blog",
        imageWidth: imageWidth,
        image: blog_png_1.default,
        title: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("b", { children: "Read" }), " the CoCalc blog"] })),
        description: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Read about new developments in CoCalc at", " ", (0, jsx_runtime_1.jsx)(A_1.default, __assign({ href: "https://blog.cocalc.com/archive.html" }, { children: "the CoCalc blog" })), ". You can read about", " ", (0, jsx_runtime_1.jsx)(A_1.default, __assign({ href: "https://blog.cocalc.com/2018/10/11/collaborative-editing.html" }, { children: "how collaborative editing works" })), ",", " ", (0, jsx_runtime_1.jsx)(A_1.default, __assign({ href: "https://blog.cocalc.com/cocalc/2018/09/10/where-is-cocalc-from.html" }, { children: "who implements CoCalc" })), ",", " ", (0, jsx_runtime_1.jsx)(A_1.default, __assign({ href: "https://blog.cocalc.com/2017/02/09/rethinkdb-vs-postgres.html" }, { children: "why CoCalc uses PostgreSQL" })), ", and much more."] })),
    },
    {
        link: "https://github.com/sagemathinc/cocalc",
        logo: "github",
        imageWidth: imageWidth,
        image: github_png_1.default,
        title: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["CoCalc's ", (0, jsx_runtime_1.jsx)("b", { children: "Source Code" })] })),
        description: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Browse every change to", " ", (0, jsx_runtime_1.jsxs)(A_1.default, __assign({ href: "https://github.com/sagemathinc/cocalc/commits/master" }, { children: ["CoCalc source code going back to ", (0, jsx_runtime_1.jsx)("b", { children: "April 2012" })] })), ", track the status of", " ", (0, jsx_runtime_1.jsx)(A_1.default, __assign({ href: "https://github.com/sagemathinc/cocalc/issues?q=is%3Aissue+is%3Aopen+label%3AI-bug+-label%3Ablocked+sort%3Acreated-desc" }, { children: "known bugs" })), ",", " ", (0, jsx_runtime_1.jsx)(A_1.default, __assign({ href: "https://github.com/sagemathinc/cocalc/issues/new" }, { children: "report a bug" })), ", comment on", " ", (0, jsx_runtime_1.jsx)(A_1.default, __assign({ href: "https://github.com/sagemathinc/cocalc/issues" }, { children: "development ideas" })), " ", "and see an", " ", (0, jsx_runtime_1.jsx)(A_1.default, __assign({ href: "https://github.com/sagemathinc/cocalc/graphs/contributors" }, { children: "overview of the pace of development" })), ". While you're at it,", " ", (0, jsx_runtime_1.jsx)(A_1.default, __assign({ href: "https://github.com/sagemathinc/cocalc/network/members" }, { children: "fork CoCalc" })), " ", "and send us", " ", (0, jsx_runtime_1.jsx)(A_1.default, __assign({ href: "https://github.com/sagemathinc/cocalc/pulls" }, { children: "a pull request" })), "."] })),
    },
    {
        link: "https://twitter.com/cocalc_com",
        logo: "twitter",
        imageWidth: imageWidth,
        image: twitter_png_1.default,
        title: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Follow CoCalc on ", (0, jsx_runtime_1.jsx)("b", { children: "Twitter" })] })),
        description: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Follow", " ", (0, jsx_runtime_1.jsx)(A_1.default, __assign({ href: "https://twitter.com/cocalc_com" }, { children: "@cocalc_com on Twitter" })), " for announcements about what's going on with CoCalc. You can also DM questions to us or tag us in your tweets."] })),
    },
    {
        link: "https://www.facebook.com/CoCalcOnline/",
        logo: "facebook",
        imageWidth: imageWidth,
        image: facebook_png_1.default,
        title: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["CoCalc on ", (0, jsx_runtime_1.jsx)("b", { children: "Facebook" })] })),
        description: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Check out our", " ", (0, jsx_runtime_1.jsx)(A_1.default, __assign({ href: "https://www.facebook.com/CoCalcOnline/" }, { children: "Facebook page" })), ", where you can post something cool you've done using CoCalc, start a dicussion, or watch out for announcements."] })),
    },
    {
        link: "https://github.com/sagemathinc/cocalc/discussions",
        logo: "github",
        imageWidth: imageWidth,
        image: github_discussions_png_1.default,
        title: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["CoCalc ", (0, jsx_runtime_1.jsx)("b", { children: "GitHub Discussions" })] })),
        description: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Discuss CoCalc with the community at the", " ", (0, jsx_runtime_1.jsx)(A_1.default, __assign({ href: "https://github.com/sagemathinc/cocalc/discussions" }, { children: "GitHub CoCalc Discussion forum" })), ". This is a good place to ask questions, start discussions, and show and tell."] })),
    },
];
function Connect(_a) {
    var customize = _a.customize;
    return ((0, jsx_runtime_1.jsxs)(customize_1.Customize, __assign({ value: customize }, { children: [(0, jsx_runtime_1.jsx)(head_1.default, { title: "Community Support" }), (0, jsx_runtime_1.jsx)(header_1.default, { page: "support", subPage: "community" }), (0, jsx_runtime_1.jsxs)(antd_1.Layout.Content, __assign({ style: {
                    backgroundColor: "white",
                } }, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ style: {
                            maxWidth: config_1.MAX_WIDTH,
                            margin: "15px auto",
                            padding: "15px",
                            backgroundColor: "white",
                        } }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ style: { textAlign: "center", color: "#444" } }, { children: (0, jsx_runtime_1.jsx)("h1", { style: { fontSize: "28pt" } }) })), (0, jsx_runtime_1.jsx)(index_list_1.default, { title: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(icon_1.Icon, { name: "users", style: { marginRight: "30px" } }), "Connect with the Cocalc Community"] }), description: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: "There are many ways that you can connect with the broader CoCalc community." }), dataSource: dataSource })] })), (0, jsx_runtime_1.jsx)(footer_1.default, {})] }))] })));
}
exports.default = Connect;
function getServerSideProps(context) {
    return __awaiter(this, void 0, void 0, function () {
        return __generator(this, function (_a) {
            switch (_a.label) {
                case 0: return [4 /*yield*/, (0, with_customize_1.default)({ context: context })];
                case 1: return [2 /*return*/, _a.sent()];
            }
        });
    });
}
exports.getServerSideProps = getServerSideProps;
//# sourceMappingURL=community.js.map