{"version":3,"sources":["index.js"],"names":["CaseStudyArchiveButton","this","archivedCaseStudiesAreShowing","archivedCaseStudiesHTML","that","$","on","text","load","data","html","document","ready"],"mappings":"AACA,IAAIA,uBACA,WACIC,KAAKC,+BAAgC,EACrCD,KAAKE,wBAA0B,GAC/B,IAAIC,EAAOH,KACXI,EAAE,2BAA2BC,GAAG,QAAS,YACM,IAAvCF,EAAKF,+BACLE,EAAKF,+BAAgC,EACrCG,EAAEJ,MAAMM,KAAK,gCAEwB,KAAjCH,EAAKD,wBACLE,EAAE,sBAAsBG,KAAK,2CAA4C,SAAUC,GAC/EL,EAAKD,wBAA0BM,IAInCJ,EAAE,sBAAsBK,KAAKN,EAAKD,2BAItCC,EAAKF,+BAAgC,EACrCG,EAAEJ,MAAMM,KAAK,0BACbF,EAAE,sBAAsBK,KAAK,QAQ7CL,EAAEM,UAAUC,MAAM,WACe,IAAIZ","file":"../caseStudyArchiveButton/caseStudyArchiveButton.min.js","sourcesContent":["/// <reference path=\"../../../node_modules/@types/jquery/index.d.ts\" />\nvar CaseStudyArchiveButton = /** @class */ (function () {\n    function CaseStudyArchiveButton() {\n        this.archivedCaseStudiesAreShowing = false;\n        this.archivedCaseStudiesHTML = '';\n        var that = this;\n        $('#caseStudyArchiveButton').on('click', function () {\n            if (that.archivedCaseStudiesAreShowing === false) { // show the archived case studies\n                that.archivedCaseStudiesAreShowing = true;\n                $(this).text('HIDE ADDITIONAL CASE STUDIES');\n                // if the content hasn't been fetched before, then store it too\n                if (that.archivedCaseStudiesHTML === '') {\n                    $(\"#caseStudyArchives\").load(\"/case-studies/archived-case-studies.aspx\", function (data) {\n                        that.archivedCaseStudiesHTML = data;\n                    });\n                }\n                else {\n                    $(\"#caseStudyArchives\").html(that.archivedCaseStudiesHTML);\n                }\n            }\n            else { // hide the archived case studies\n                that.archivedCaseStudiesAreShowing = false;\n                $(this).text('VIEW MORE CASE STUDIES');\n                $(\"#caseStudyArchives\").html(\"\");\n            }\n        });\n    }\n    return CaseStudyArchiveButton;\n}());\n\n/// <reference path=\"../../../node_modules/@types/jquery/index.d.ts\" />\n$(document).ready(function () {\n    var caseStudyArchiveButton = new CaseStudyArchiveButton();\n});\n"]}