-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbundle.js
1 lines (1 loc) · 27.3 KB
/
bundle.js
1
(()=>{var t={286:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=t(e);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,r){"string"==typeof t&&(t=[[null,t,""]]);var i={};if(r)for(var o=0;o<this.length;o++){var a=this[o][0];null!=a&&(i[a]=!0)}for(var c=0;c<t.length;c++){var s=[].concat(t[c]);r&&i[s[0]]||(n&&(s[2]?s[2]="".concat(n," and ").concat(s[2]):s[2]=n),e.push(s))}},e}},39:(t,e,n)=>{function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=function(t){"use strict";var e,n=Object.prototype,i=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof y?e:y,o=Object.create(i.prototype),a=new T(r||[]);return o._invoke=function(t,e,n){var r=f;return function(i,o){if(r===p)throw new Error("Generator is already running");if(r===h){if("throw"===i)throw o;return j()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var c=k(a,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var s=d(t,e,n);if("normal"===s.type){if(r=n.done?h:m,s.arg===v)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r=h,n.method="throw",n.arg=s.arg)}}}(t,n,a),o}function d(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var f="suspendedStart",m="suspendedYield",p="executing",h="completed",v={};function y(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var x=Object.getPrototypeOf,S=x&&x(x(q([])));S&&S!==n&&i.call(S,a)&&(w=S);var L=g.prototype=y.prototype=Object.create(w);function D(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function I(t,e){function n(o,a,c,s){var l=d(t[o],t,a);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"===r(f)&&i.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,c,s)}),(function(t){n("throw",t,c,s)})):e.resolve(f).then((function(t){u.value=t,c(u)}),(function(t){return n("throw",t,c,s)}))}s(l.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}}function k(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,k(t,n),"throw"===n.method))return v;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var i=d(r,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var o=i.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function q(t){if(t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function n(){for(;++r<t.length;)if(i.call(t,r))return n.value=t[r],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}return{next:j}}function j(){return{value:e,done:!0}}return b.prototype=g,l(L,"constructor",g),l(g,"constructor",b),b.displayName=l(g,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,s,"GeneratorFunction")),t.prototype=Object.create(L),t},t.awrap=function(t){return{__await:t}},D(I.prototype),l(I.prototype,c,(function(){return this})),t.AsyncIterator=I,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new I(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},D(L),l(L,s,"Generator"),l(L,a,(function(){return this})),l(L,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=q,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(E),!t)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function r(r,i){return c.type="throw",c.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],c=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var s=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(s&&l){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),E(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;E(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:q(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}("object"===r(t=n.nmd(t))?t.exports:{});try{regeneratorRuntime=i}catch(t){"object"===("undefined"==typeof globalThis?"undefined":r(globalThis))?globalThis.regeneratorRuntime=i:Function("r","regeneratorRuntime = r")(i)}},402:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var r=n(286),i=n.n(r)()((function(t){return t[1]}));i.push([t.id,"* {\r\n font-family: 'Quicksand', sans-serif;\r\n box-sizing: border-box;\r\n}\r\n\r\nbody {\r\n display: flex;\r\n flex-direction: column;\r\n height: 100vh;\r\n}\r\n\r\nmain {\r\n display: flex;\r\n flex: 1;\r\n flex-direction: column;\r\n}\r\n\r\nh1,\r\nh2,\r\nh3,\r\nh4,\r\nh5,\r\nh6 {\r\n font-weight: bold;\r\n}\r\n\r\n.img-figure {\r\n position: relative;\r\n}\r\n\r\n.badge {\r\n position: absolute;\r\n bottom: 0;\r\n transform: translate(-100%, 0);\r\n}\r\n\r\n.item {\r\n background-color: #f8f9fa;\r\n transition: .3s;\r\n}\r\n\r\n.item:hover {\r\n background-color: #ccd3da;\r\n cursor: pointer;\r\n}\r\n\r\n.index-container {\r\n max-width: 50px !important;\r\n}\r\n\r\n.active {\r\n background-color: #ccd3da;\r\n}\r\n\r\nfooter {\r\n background-color: #2C394B;\r\n color: #f8f9fa;\r\n}\r\n\r\nfooter a {\r\n color: #ff6649;\r\n text-decoration: none;\r\n}\r\n\r\nfooter a:hover {\r\n color: #ccd3da;\r\n \r\n}\r\n\r\n.github, .twitter, .instagram {\r\n fill: #ff6649;\r\n}\r\n\r\n.github:hover, .twitter:hover, .instagram:hover {\r\n fill: #ccd3da;\r\n}\r\n\r\n.contact li {\r\n display: inline;\r\n margin-left: 16px;\r\n}\r\n\r\n.contact li svg {\r\n width: 25px;\r\n}\r\n\r\n@media (max-width: 767.98px) {\r\n .index-container {\r\n max-width: 100% !important;\r\n }\r\n}\r\n\r\n@media (max-width: 575.98px) {\r\n .pl-id-input {\r\n width: 100%;\r\n }\r\n\r\n .colon {\r\n display: none;\r\n }\r\n\r\n footer {\r\n flex-direction: column;\r\n }\r\n\r\n footer .contact {\r\n margin-top: 1.5em;\r\n align-self: flex-end;\r\n }\r\n}",""]);const o=i},379:t=>{"use strict";var e=[];function n(t){for(var n=-1,r=0;r<e.length;r++)if(e[r].identifier===t){n=r;break}return n}function r(t,r){for(var o={},a=[],c=0;c<t.length;c++){var s=t[c],l=r.base?s[0]+r.base:s[0],u=o[l]||0,d="".concat(l," ").concat(u);o[l]=u+1;var f=n(d),m={css:s[1],media:s[2],sourceMap:s[3]};-1!==f?(e[f].references++,e[f].updater(m)):e.push({identifier:d,updater:i(m,r),references:1}),a.push(d)}return a}function i(t,e){var n=e.domAPI(e);return n.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;n.update(t=e)}else n.remove()}}t.exports=function(t,i){var o=r(t=t||[],i=i||{});return function(t){t=t||[];for(var a=0;a<o.length;a++){var c=n(o[a]);e[c].references--}for(var s=r(t,i),l=0;l<o.length;l++){var u=n(o[l]);0===e[u].references&&(e[u].updater(),e.splice(u,1))}o=s}}},569:t=>{"use strict";var e={};t.exports=function(t,n){var r=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},216:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e),e}},565:(t,e,n)=>{"use strict";t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},795:t=>{"use strict";t.exports=function(t){var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var r=n.css,i=n.media,o=n.sourceMap;i?t.setAttribute("media",i):t.removeAttribute("media"),o&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleTagTransform(r,t)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},589:t=>{"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={id:r,loaded:!1,exports:{}};return t[r](o,o.exports,n),o.loaded=!0,o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),(()=>{"use strict";var t=n(379),e=n.n(t),r=n(795),i=n.n(r),o=n(569),a=n.n(o),c=n(565),s=n.n(c),l=n(216),u=n.n(l),d=n(589),f=n.n(d),m=n(402),p={};function h(t,e,n,r,i,o,a){try{var c=t[o](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,i)}function v(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}p.styleTagTransform=f(),p.setAttributes=s(),p.insert=a().bind(null,"head"),p.domAPI=i(),p.insertStyleElement=u(),e()(m.Z,p),m.Z&&m.Z.locals&&m.Z.locals,n(39);var y=function(){return"undefined"!=typeof Storage},b=function(t,e){for(var n="".concat(t,"?"),r=0,i=Object.entries(e);r<i.length;r++){var o=(s=i[r],l=2,function(t){if(Array.isArray(t))return t}(s)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],a=!0,c=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){c=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(c)throw i}}return o}}(s,l)||function(t,e){if(t){if("string"==typeof t)return v(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v(t,e):void 0}}(s,l)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=o[0],c=o[1];c&&(n+="&".concat(a,"=").concat(c))}var s,l;return n},g=function(){var t,e=(t=regeneratorRuntime.mark((function t(e,n){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fetch(e).then((function(t){return t.json()})).then((function(t){return Promise.resolve([t.items.map(n),t])}));case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})),function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){h(o,r,i,a,c,"next",t)}function c(t){h(o,r,i,a,c,"throw",t)}a(void 0)}))});return function(t,n){return e.apply(this,arguments)}}(),w=function(t){t=Number(t);for(var e=["T","B","M","K"],n="";t>999;)t=Math.round(t)/1e3,n=e.pop();return t+n},x=function(t){return t.replace(/([\S]+youtube)?([\S])/,"$1-nocookie$2")},S=function(t,e){var n=e.playlistData,r=n.playlistId,i=n.title,o=n.itemCount,a=n.publishedAt,c=n.player,s=e.playlistItemsData,l=e.videosData,u=e.privateVideo,d={year:"numeric",month:"long",day:"numeric"},f=new Date(a).toLocaleDateString("id-ID",d),m=new Date(a).toLocaleTimeString(),p=s[s.length-1],h=new Date(p.publishedAt).toLocaleDateString("id-ID",d),v=new Date(p.publishedAt).toLocaleTimeString(),y=u?"".concat(o," (").concat(u," private video").concat(u>1?"s":"",")"):"".concat(o);t.innerHTML="",t.innerHTML='\n <div class="container-fluid">\n <div class="row">\n <div class="col-md-8 mx-auto">\n <div class="card shadow">\n <div class="yt-embed-container">\n\n </div>\n <div class="card-body">\n\n <ul class="list-group px-3">\n <li class="list-group-item row d-flex" style="background-color: rgba(0, 0, 0, .03);">\n <h3 class="mb-0">'.concat(i,'</h3>\n </li>\n <li class="list-group-item row d-flex">\n <div class="col-sm-4 col-12 fw-bold">Playlist ID</div>\n <div class="col-sm col"><b class="colon">:</b> ').concat(r,'</div>\n </li>\n <li class="list-group-item row d-flex">\n <div class="col-sm-4 col-12 fw-bold">Published date</div>\n <div class="col-sm col"><b class="colon">:</b> ').concat(f,'</div>\n </li>\n <li class="list-group-item row d-flex">\n <div class="col-sm-4 col-12 fw-bold">Published time</div>\n <div class="col-sm col"><b class="colon">:</b> ').concat(m,'</div>\n </li>\n <li class="list-group-item row d-flex">\n <div class="col-sm-4 col-12 fw-bold">Last video uploaded</div>\n <div class="col-sm col"><b class="colon">:</b> ').concat(h," at ").concat(v,'</div>\n </li>\n <li class="list-group-item row d-flex">\n <div class="col-sm-4 col-12 fw-bold">Total duration</div>\n <div class="col-sm col"><b class="colon">:</b> ').concat(function(t){var e=0;return t.forEach((function(t){var n=t.duration;e+=function(t){for(var e=t.split(":").map((function(t){return Number(t)})),n=e.length,r=0,i=0;i<n;)r+=e.pop()*Math.pow(60,i),i++;return r}(n)})),new Date(1e3*e).toISOString().substr(11,8).split(":").map((function(t,e){if(0!==t||0!==e)return t.toLocaleString("id-ID",{minimumIntegerDigits:2,useGrouping:!1})})).filter((function(t){return t})).join(":")}(l),'</div>\n </li>\n <li class="list-group-item row d-flex">\n <div class="col-sm-4 col-12 fw-bold">Total videos</div>\n <div class="col-sm col"><b class="colon">:</b> ').concat(y,"</div>\n </li>\n </ul>\n\n </div>\n </div>\n </div>\n </div>\n </div>\n ");var b=t.querySelector(".yt-embed-container");b.innerHTML=c;var g=b.querySelector("iframe");g.className="card-img-top";var w=g.getAttribute("src");g.setAttribute("src",x(w))},L=function(t,e){var n=e.playlistItemsData,r=e.channelData.title,i=e.videosData;t.innerHTML="";var o=1;n.forEach((function(e,n){var a=e.videoId,c=e.title,s=e.thumbnail,l=e.publishedAt,u=i[n].duration;t.innerHTML+='\n <div class="col-md-12 col-sm-4 col-6" data-video-id="'.concat(a,'">\n <div class="card mb-3 px-2 shadow-sm item border-0">\n <div class="row g-0 align-items-center">\n <div class="index-container col-md-1">\n <h3 class="small text-muted text-center">').concat(o++,'</h3>\n </div>\n <div class="col-md-4 my-2 mx-md-0 mx-auto img-figure" style="max-width: 180px;">\n <img src="').concat(s,'" class="img-fluid rounded"\n alt="').concat(c,'">\n <span class="badge bg-dark ">').concat(u,'</span>\n </div>\n <div class="col-md">\n <div class="card-body p-2">\n <h6 class="card-title">').concat(c,'</h6>\n <p class="card-text m-0"><small class="text-muted">').concat(r,'</small></p>\n <p class="card-text m-0"><small class="text-muted" style="font-size: .75rem;">Published at ').concat(new Date(l).toLocaleDateString("id-ID"),"</small></p>\n </div>\n </div>\n </div>\n </div>\n </div>\n ")}))},D=function(t,e){var n=e.channelData,r=n.title,i=n.subscriber,o=n.thumbnail,a=n.videoCount,c=e.playlistItemData,s=c.title,l=c.publishedAt,u=(c.description,e.videoData),d=u.duration,f=u.viewCount,m=u.player,p=new Date(l).toLocaleDateString("id-ID",{year:"numeric",month:"long",day:"numeric"}),h=new Date(l).toLocaleTimeString();t.innerHTML="",t.innerHTML='\n <div class="card shadow border-0 sticky-top overflow-auto w-100" style="max-height: 100vh;">\n \x3c!-- awal card --\x3e\n <div class="yt-embed-container">\n \n </div>\n\n <div class="card-body">\n <h5>'.concat(s,'</h5>\n \x3c!-- awal info channel --\x3e\n <div class="row g-0 align-items-center my-1 mt-3">\n <div class="col-md-4 col-4 my-auto" style="width: 5vw; max-width: 80px; min-width: 50px;">\n <img\n src="').concat(o,'"\n class="img-fluid rounded-circle" alt="').concat(o,'">\n </div>\n <div class="col-md col">\n <div class="card-body p-2">\n <h6 class="card-title mb-1">').concat(r,'</h6>\n <p class="small h6 text-muted m-0">').concat(i,' subscribers</p>\n <p class="small h6 text-muted m-0">').concat(a,' videos</p>\n </div>\n </div>\n </div>\n \x3c!-- akhir info channel --\x3e\n\n <table class="table table-borderless mt-3">\n <tr>\n <th>Total viewer(s)</th>\n <td>').concat(f,"</td>\n </tr>\n <tr>\n <th>Published date</th>\n <td>").concat(p,"</td>\n </tr>\n <tr>\n <th>Published time</th>\n <td>").concat(h,"</td>\n </tr>\n <tr>\n <th>Duration</th>\n <td>").concat(d,'</td>\n </tr>\n <tr>\n <th colspan="2">Description</th>\n </tr>\n <tr>\n <td colspan="2">\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Culpa sapiente illum ratione officia,\n commodi deserunt, eveniet consequuntur expedita nemo sit ex consectetur similique in officiis\n explicabo ipsa molestiae alias dolorum consequatur. Magni, voluptate maxime. Rem a dignissimos quo\n beatae eius aliquid accusantium culpa eum qui numquam explicabo quod totam facilis cum ad, fuga\n nulla minima, quas magnam sit tenetur. Nisi porro molestias cum vel quia ad voluptatibus quas\n iusto\n aut magni! Perspiciatis excepturi hic eaque esse quasi quas voluptates, quia tenetur natus tempora\n temporibus quam recusandae consequuntur veniam, facilis necessitatibus assumenda! Iure adipisci\n non\n animi neque recusandae architecto, eos iste.\n </td>\n </tr>\n </table>\n </div>\n \x3c!-- akhir card --\x3e\n </div>\n ');var v=t.querySelector(".yt-embed-container");v.innerHTML=m;var y=v.querySelector("iframe");y.className="card-img-top";var b=y.getAttribute("src");y.setAttribute("src",x(b))};function I(t){return function(t){if(Array.isArray(t))return E(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||A(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],a=!0,c=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){c=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(c)throw i}}return o}}(t,e)||A(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(t,e){if(t){if("string"==typeof t)return E(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?E(t,e):void 0}}function E(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function T(t,e,n,r,i,o,a){try{var c=t[o](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,i)}function q(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){T(o,r,i,a,c,"next",t)}function c(t){T(o,r,i,a,c,"throw",t)}a(void 0)}))}}var j=null,M=document.querySelector(".change-api-key"),P=document.querySelector(".api-key-form"),C=document.querySelector("#submit-playlist-id"),O=document.querySelector(".alert"),_=null;document.addEventListener("DOMContentLoaded",(function(){(j=y()?localStorage.getItem("api_key"):null)?(P.querySelector("input").value=j,document.querySelector(".modal-header").removeAttribute("style"),P.querySelector(".close").removeAttribute("style")):M.click()})),M.addEventListener("click",(function(){O.classList.add("d-none"),P.querySelector("input").value=j})),P.addEventListener("submit",function(){var t=q(regeneratorRuntime.mark((function t(e){var n,r,i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.preventDefault(),n=P.querySelector(".close"),r=j,j=P.querySelector("input").value,t.prev=4,i=b("https://www.googleapis.com/youtube/v3/videos",{key:j,part:"status",id:"rdwz7QiG0lk"}),t.next=8,g(i,(function(t){return t}));case 8:o=j,y()&&localStorage.setItem("api_key",o),n.click(),O.classList.add("d-none"),setTimeout((function(){document.querySelector(".modal-header").removeAttribute("style"),n.removeAttribute("style")}),500),t.next=18;break;case 14:t.prev=14,t.t0=t.catch(4),j=r,O.classList.remove("d-none");case 18:case"end":return t.stop()}var o}),t,null,[[4,14]])})));return function(e){return t.apply(this,arguments)}}()),C.addEventListener("submit",function(){var t=q(regeneratorRuntime.mark((function t(e){var n,r,i,o,a,c,s,l,u,d,f,m,p,h,v,y,x,A,E,T,q,M,P,C,O,N,H;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.preventDefault(),n=document.querySelector("#pl-id"),r=document.querySelector(".yt-item"),i=document.querySelector(".channel-info"),o=document.querySelector(".playlist-info"),a=document.querySelector(".item-details"),c=b("https://www.googleapis.com/youtube/v3/playlists",{key:j,part:"snippet,contentDetails,player",id:n.value}),t.next=9,g(c,(function(t){return{playlistId:t.id,channelId:t.snippet.channelId,title:t.snippet.title,itemCount:t.contentDetails.itemCount,publishedAt:t.snippet.publishedAt,player:t.player.embedHtml}}));case 9:return s=t.sent,l=k(s,1),u=l[0],d=b("https://www.googleapis.com/youtube/v3/channels",{key:j,part:"snippet,statistics",id:u[0].channelId}),t.next=15,g(d,(function(t){return{title:t.snippet.title,subscriber:w(t.statistics.subscriberCount),thumbnail:t.snippet.thumbnails.medium.url,videoCount:t.statistics.videoCount}}));case 15:f=t.sent,m=k(f,1),p=m[0],h=[],v=[],y=void 0,x=0;case 22:return A=b("https://www.googleapis.com/youtube/v3/playlistItems",{key:j,part:"snippet,status,contentDetails",playlistId:n.value,pageToken:y||"",maxResults:50}),t.next=26,g(A,(function(t){if("public"===t.status.privacyStatus)return{videoId:t.contentDetails.videoId,title:t.snippet.title,thumbnail:t.snippet.thumbnails.medium.url,publishedAt:t.contentDetails.videoPublishedAt,description:t.snippet.description}}));case 26:return E=t.sent,T=k(E,2),q=T[0],M=T[1],q=q.filter((function(t){return!!t||(x++,!1)})),P=b("https://www.googleapis.com/youtube/v3/videos",{key:j,part:"contentDetails,player,statistics",id:q.map((function(t){return t.videoId})).join()}),t.next=34,g(P,(function(t){return{duration:(e=t.contentDetails.duration,n=/(\d+)S/,r=/(\d+)M/,i=/(\d+)H/,[i.exec(e)?+i.exec(e)[1]:0,r.exec(e)?+r.exec(e)[1]:0,n.exec(e)?+n.exec(e)[1]:0].map((function(t,e){if(0!==t||0!==e)return t.toLocaleString("id-ID",{minimumIntegerDigits:2,useGrouping:!1})})).filter((function(t){return t})).join(":")),viewCount:t.statistics.viewCount,player:t.player.embedHtml};var e,n,r,i}));case 34:if(C=t.sent,O=k(C,1),N=O[0],h=[].concat(I(h),I(q)),v=[].concat(I(v),I(N)),y=M.nextPageToken){t.next=42;break}return t.abrupt("break",44);case 42:t.next=22;break;case 44:H={channelData:p[0],playlistData:u[0],playlistItemsData:h,videosData:v,privateVideo:x},S(o,H),R=i,void 0,void 0,void 0,void 0,F=(G=H.channelData).title,Z=G.subscriber,U=G.thumbnail,R.innerHTML="",R.innerHTML='\n <div class="col-md-4 col-6 my-auto" style="width: 5vw; max-width: 80px; min-width: 50px;">\n <img src="'.concat(U,'" class="img-fluid rounded-circle" alt="').concat(F,'">\n </div>\n <div class="col-md col">\n <div class="card-body p-2">\n <h6 class="card-title m-0">').concat(F,'</h6>\n <p class="small h6 text-muted">').concat(Z," subscribers</p>\n </div>\n </div>\n "),L(r,H),_=document.querySelectorAll(".item"),a.innerHTML="",_.forEach((function(t){t.addEventListener("click",(function(){var e=t.parentElement.dataset.videoId,n=h.findIndex((function(t){return t.videoId===e})),r={channelData:p[0],playlistItemData:h[n],videoData:v[n]};_.forEach((function(t){t.classList.contains("active")&&t.classList.remove("active")})),t.classList.add("active"),D(a,r)}))}));case 51:case"end":return t.stop()}var R,G,F,Z,U}),t)})));return function(e){return t.apply(this,arguments)}}())})()})();