{"version":3,"sources":["index.ts"],"names":["com","aboersch","wp","GistContainer","container","_this","this","_collapsed","_container","_rawUrl","getAttribute","r","gistRegex","exec","_fileName","_collapsedElement","jQuery","on","expandCollapse","prepend","append","copy","prototype","gist","querySelector","show","hide","toggleClass","getText","_getRequest","ajax","url","done","data","$temp","val","select","document","execCommand","remove","init","_initCalled","each","i","e","create"],"mappings":"AAAA,GAAUA,MAAV,SAAUA,IAAI,SAAAC,IAAS,SAAAC,GACnB,GAAAC,GAAA,WAUI,QAAAA,GAAYC,GAAZ,GAAAC,GAAAC,IAFQA,MAAAC,YAAa,EAGjBD,KAAKE,WAAaJ,EAClBE,KAAKG,QAAUL,EAAUM,aAAa,SACtC,IAAIC,GAAIR,EAAcS,UAAUC,KAAKP,KAAKG,QAC1CH,MAAKQ,UAAYH,EAAE,GACnBL,KAAKS,kBAAoBC,OAAO,2CAC3BC,GAAG,QAAS,WAAQZ,EAAKa,mBAC9BF,OAAOZ,GAAWe,QAAQH,OAAO,4BAC5BI,OAAOJ,OAAO,SACVI,OAAOJ,OAAO,6CAA6CV,KAAKQ,UAAS,sCACrEG,GAAG,QAAS,WAAQZ,EAAKa,qBACjCE,OAAOJ,OAAO,SACVI,OAAOJ,OAAO,+CACVC,GAAG,QAAS,WAAQZ,EAAKgB,UAC7BD,OAAOJ,OAAO,OAAOI,OAAOd,KAAKS,sBAiDlD,MA9CYZ,GAAAmB,UAAAC,KAAR,WACI,MAAOjB,MAAKE,WAAWgB,cAAc,yBAGjCrB,EAAAmB,UAAAJ,eAAR,WACQZ,KAAKC,WACLS,OAAOV,KAAKiB,QAAQE,OAEpBT,OAAOV,KAAKiB,QAAQG,OAExBpB,KAAKS,kBAAkBY,YAAY,wCACnCrB,KAAKC,YAAcD,KAAKC,YAGpBJ,EAAAmB,UAAAM,QAAR,WAII,MAHKtB,MAAKuB,cACNvB,KAAKuB,YAAcb,OAAOc,MAAOC,IAAKzB,KAAKG,WAExCH,KAAKuB,aAGR1B,EAAAmB,UAAAD,KAAR,WACIf,KAAKsB,UAAUI,KAAK,SAACC,GACjB,GAAMC,GAAQlB,OAAO,UACrBA,QAAO,QAAQI,OAAOc,GACtBA,EAAMC,IAAIF,GAAMG,SAChBC,SAASC,YAAY,QACrBJ,EAAMK,YAIApC,EAAAqC,KAAd,WACQrC,EAAcsC,cAGlBtC,EAAcsC,aAAc,EAC5BzB,OAAO,qBAAqB0B,KAAK,SAACC,EAAGC,GAEjC,MADAzC,GAAc0C,OAAOD,IACd,IAEX5B,OAAO,QAAQI,OAAO,wDAGXjB,EAAA0C,OAAf,SAAsBzC,GAClB,MAAO,IAAID,GAAcC,IAEjCD,IAvEmBA,GAAAS,UAAY,+EAFlBV,EAAAC,cAAaA,GADPF,EAAAC,KAAAD,EAAAC,SAATF,EAAAC,WAAAD,EAAAC,eAAJD,MAAAA","file":"index.js","sourcesContent":["namespace com.aboersch.wp {\r\n export class GistContainer {\r\n private static _initCalled: boolean;\r\n private static gistRegex = /\\/\\/gist.githubusercontent.com\\/(.*?)\\/([0-9a-f]*?)\\/raw\\/[0-9a-f]*?\\/(.*?)$/;\r\n\r\n private _container: HTMLElement;\r\n private _rawUrl: string;\r\n private _fileName: string;\r\n private _getRequest: JQueryXHR;\r\n private _collapsed = true;\r\n private _collapsedElement: JQuery;\r\n constructor(container: HTMLElement) {\r\n this._container = container;\r\n this._rawUrl = container.getAttribute('rawUrl');\r\n let r = GistContainer.gistRegex.exec(this._rawUrl);\r\n this._fileName = r[3];\r\n this._collapsedElement = jQuery('')\r\n .on('click', () => { this.expandCollapse(); });\r\n jQuery(container).prepend(jQuery('