Diep.style

Press Esc twice to toggle the menu,and save the setting

目前为 2017-11-12 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name Diep.style
  3. // @namespace https://www.reddit.com/r/Diepio/comments/5y1np1/diepstyle_plugin/
  4. // @version 0.095
  5. // @description Press Esc twice to toggle the menu,and save the setting
  6. // @author sbk2015
  7. // @match http://*diep.io/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13. var localStorage;
  14. var saveList;
  15. var nowSetting;
  16. var isLocal;
  17. var clone;
  18. jsInit();
  19. setTimeout(pluginInit, 1000);
  20.  
  21. function jsInit() {
  22. Storage.prototype.setObject = function(key, value) {
  23. this.setItem(key, JSON.stringify(value));
  24. }
  25. Storage.prototype.getObject = function(key) {
  26. var value = this.getItem(key);
  27. return value && JSON.parse(value);
  28. }
  29. clone = function(obj) {
  30. return JSON.parse(JSON.stringify(obj));
  31. }
  32. window.diepStyle = {};
  33. localStorage = window.localStorage;
  34. if (location.href.indexOf('file://') >= 0) {
  35. var warning = false;
  36. warning ? '' : console.warn('off warning');
  37. isLocal = true;
  38. window.input = {
  39. set_convar: function() {
  40. warning ? console.warn('block input.set_convar') : ''
  41. },
  42. execute: function() {
  43. warning ? console.warn('block input.set_execute') : ''
  44. }
  45. }
  46. }
  47. }
  48.  
  49. function pluginInit() {
  50. storageInit();
  51. keyListen();
  52. tempInit();
  53. styleInit();
  54. diepStyle.onColor = onColor;
  55. diepStyle.storageInit = storageInit;
  56. togglePanel(true);
  57.  
  58. function storageInit(cmd) {
  59. var th = 50,
  60. netTH = 110;
  61. var colors = [{
  62. id: 2,
  63. name: 'You FFA',
  64. color: '00b1de'
  65. },
  66. {
  67. id: 15,
  68. name: 'Other FFA',
  69. color: 'f14e54'
  70. },
  71. {
  72. id: 3,
  73. name: 'Blue Team',
  74. color: '00b1de'
  75. },
  76. {
  77. id: 4,
  78. name: 'Red Team',
  79. color: 'f14e54'
  80. },
  81. {
  82. id: 5,
  83. name: 'Purple Team',
  84. color: 'bf7ff5'
  85. },
  86. {
  87. id: 6,
  88. name: 'Green Team',
  89. color: '00e16e'
  90. },
  91. {
  92. id: 17,
  93. name: 'Fallen team',
  94. color: 'c6c6c6'
  95. },
  96. {
  97. id: 12,
  98. name: 'Arena Closer',
  99. color: 'ffe869'
  100. },
  101. {
  102. id: 8,
  103. name: 'Square',
  104. color: 'ffe869'
  105. },
  106. {
  107. id: 7,
  108. name: 'Green Square?',
  109. color: '89ff69'
  110. },
  111. {
  112. id: 16,
  113. name: 'Necro Square',
  114. color: 'fcc376'
  115. },
  116. {
  117. id: 9,
  118. name: 'Triangle',
  119. color: 'fc7677'
  120. },
  121. {
  122. id: 10,
  123. name: 'Pentagon',
  124. color: '768dfc'
  125. },
  126. {
  127. id: 11,
  128. name: 'Crasher',
  129. color: 'f177dd'
  130. },
  131. {
  132. id: 14,
  133. name: 'Waze Wall',
  134. color: 'bbbbbb'
  135. },
  136. {
  137. id: 1,
  138. name: 'Turret',
  139. color: '999999'
  140. },
  141. {
  142. id: 0,
  143. name: 'Smasher',
  144. color: '4f4f4f'
  145. },
  146. {
  147. id: th++,
  148. name: 'All Bars',
  149. color: '000000',
  150. cmd: 'ren_bar_background_color'
  151. },
  152. {
  153. id: th++,
  154. name: 'Outline',
  155. color: '555555',
  156. cmd: 'ren_stroke_solid_color'
  157. },
  158. {
  159. id: 13,
  160. name: 'Leader Board',
  161. color: '64ff8c'
  162. },
  163. {
  164. id: th++,
  165. name: 'Xp Bar',
  166. color: 'ffde43',
  167. cmd: 'ren_xp_bar_fill_color'
  168. },
  169. {
  170. id: th++,
  171. name: 'Score Bar',
  172. color: '43ff91',
  173. cmd: 'ren_score_bar_fill_color'
  174. },
  175. {
  176. id: th++,
  177. name: 'Health Bar1',
  178. color: '85e37d',
  179. cmd: 'ren_health_fill_color'
  180. },
  181. {
  182. id: th++,
  183. name: 'Health Bar2',
  184. color: '555555',
  185. cmd: 'ren_health_background_color'
  186. },
  187. {
  188. id: th++,
  189. name: 'Grid Color',
  190. color: '000000',
  191. cmd: 'ren_grid_color'
  192. },
  193. {
  194. id: th++,
  195. name: 'Minimap 1',
  196. color: 'CDCDCD',
  197. cmd: 'ren_minimap_background_color'
  198. },
  199. {
  200. id: th++,
  201. name: 'Minimap 2',
  202. color: '797979',
  203. cmd: 'ren_minimap_border_color'
  204. },
  205. {
  206. id: th++,
  207. name: 'Background 1',
  208. color: 'CDCDCD',
  209. cmd: 'ren_background_color'
  210. },
  211. {
  212. id: th++,
  213. name: 'Background 2',
  214. color: '797979',
  215. cmd: 'ren_border_color'
  216. },
  217. {
  218. id: netTH++,
  219. name: 'UI Color1',
  220. color: 'e69f6c',
  221. cmd: 'ui_replace_colors'
  222. },
  223. {
  224. id: netTH++,
  225. name: 'UI Color2',
  226. color: 'ff73ff',
  227. cmd: 'ui_replace_colors'
  228. },
  229. {
  230. id: netTH++,
  231. name: 'UI Color3',
  232. color: 'c980ff',
  233. cmd: 'ui_replace_colors'
  234. },
  235. {
  236. id: netTH++,
  237. name: 'UI Color4',
  238. color: '71b4ff',
  239. cmd: 'ui_replace_colors'
  240. },
  241. {
  242. id: netTH++,
  243. name: 'UI Color5',
  244. color: 'ffed3f',
  245. cmd: 'ui_replace_colors'
  246. },
  247. {
  248. id: netTH++,
  249. name: 'UI Color6',
  250. color: 'ff7979',
  251. cmd: 'ui_replace_colors'
  252. },
  253. {
  254. id: netTH++,
  255. name: 'UI Color7',
  256. color: '88ff41',
  257. cmd: 'ui_replace_colors'
  258. },
  259. {
  260. id: netTH++,
  261. name: 'UI Color8',
  262. color: '41ffff',
  263. cmd: 'ui_replace_colors'
  264. },
  265. ]
  266. diepStyle.colorMap = new Map(colors.map(function(elem) {
  267. return [elem.id, {
  268. color: elem.color,
  269. cmd: elem.cmd || 'no cmd'
  270. }]
  271. }));
  272.  
  273. diepStyle.uiColorMap = function(cmd) {
  274. var uiTH = nowSetting.colors.findIndex(elem => elem.name == 'UI Color1');
  275. var colorBunch = '';
  276. var arr = [];
  277. if (cmd == '0x') {
  278. for (var i = 0; i < 8; i++) {
  279. colorBunch = ' 0x' + nowSetting.colors[uiTH + i].color + colorBunch;
  280. }
  281. return colorBunch;
  282. }
  283. if (cmd == 'array') {
  284. for (var i = 0; i < 8; i++) {
  285. arr.push(nowSetting.colors[uiTH + i].color);
  286. }
  287. return arr;
  288. }
  289. }
  290. var renders = [{
  291. name: 'Grid Alpha',
  292. value: 0.1,
  293. cmd: 'grid_base_alpha'
  294. },
  295. {
  296. name: 'Outline Intensity',
  297. value: 0.25,
  298. cmd: 'stroke_soft_color_intensity'
  299. },
  300. {
  301. name: 'Show Outline',
  302. value: false,
  303. cmd: 'stroke_soft_color',
  304. reverse: true
  305. },
  306. {
  307. name: 'Border Alpha',
  308. value: 0.1,
  309. cmd: 'border_color_alpha'
  310. },
  311. {
  312. name: 'UI Scale',
  313. value: 1,
  314. cmd: 'ui_scale'
  315. },
  316. {
  317. name: 'Clear UI',
  318. value: false,
  319. cmd: 'ui',
  320. reverse: true
  321. },
  322. {
  323. name: 'Show FPS',
  324. value: false,
  325. cmd: 'fps'
  326. },
  327. {
  328. name: 'Show Health',
  329. value: false,
  330. cmd: 'raw_health_values'
  331. },
  332. {
  333. name: 'Hide Name',
  334. value: false,
  335. cmd: 'names',
  336. reverse: true
  337. },
  338. ];
  339.  
  340. ;
  341. (function checkHasStorage() {
  342. var _localStorage = localStorage.getObject('diepStyle')
  343. var page = 1;
  344. if (nowSetting && nowSetting.saveTH) {
  345. page = nowSetting.saveTH;
  346. }
  347. if (_localStorage && _localStorage.saveList) {
  348. saveList = _localStorage.saveList;
  349. nowSetting = _localStorage.nowSetting;
  350. }
  351. if (!nowSetting || cmd == 'reset') {
  352. nowSetting = getBlankSetting();
  353. nowSetting.saveTH = page;
  354. }
  355.  
  356. if (!saveList) saveList = getBlankSaveList();
  357. saveList[0] = getBlankSetting();;
  358. (function checkMissing() {
  359. var plain = getBlankSetting();
  360. plain.renders.forEach((elem, th) => {
  361. var index = nowSetting.renders.findIndex(now => elem.cmd == now.cmd);
  362. if (index < 0) {
  363. nowSetting.renders.splice(th, 0, elem);
  364. saveList[nowSetting.saveTH].renders.splice(th, 0, elem)
  365. }
  366. });
  367. plain.colors.forEach((elem, th) => {
  368. var index = nowSetting.colors.findIndex(now => {
  369. if (elem.cmd && elem.cmd == now.cmd) return true;
  370. if ((elem.id || elem.id == 0) && elem.id == now.id) return true;
  371. });
  372. if (index < 0) {
  373. nowSetting.colors.splice(th, 0, elem);
  374. saveList[nowSetting.saveTH].colors.splice(th, 0, elem);
  375. }
  376. });
  377. })();
  378. })();
  379.  
  380. ;
  381. (function command() {
  382. diepStyle.command = {};
  383. renders.forEach(elem => {
  384. diepStyle.command[elem.cmd] = {};
  385. if (elem.reverse) diepStyle.command[elem.cmd].reverse = true;
  386. })
  387. diepStyle.command.fn = function(cmd, value) {
  388. nowSetting.renders = nowSetting.renders.map(elem => {
  389. if (elem.cmd == cmd) elem.value = value;
  390. return elem
  391. })
  392. if (diepStyle.command[cmd].reverse) value = !value;
  393. input.set_convar("ren_" + cmd, value);
  394. };
  395. })();
  396.  
  397. function getBlankSetting() {
  398. return {
  399. version: 0.095,
  400. saveTH: 1,
  401. lock: false,
  402. colors,
  403. renders
  404. };
  405. }
  406.  
  407. function getBlankSaveList() {
  408. var list = [];
  409. for (var i = 0; i < 6; i++) {
  410. list[i] = getBlankSetting();
  411. if (i == 0) list[i].isDefault = 'default,no save';
  412. }
  413. return clone(list);
  414. };
  415. Storage.prototype.pluginSave = function() {
  416. saveList[nowSetting.saveTH] = clone(nowSetting);
  417. var _storageObj = {
  418. nowSetting: clone(nowSetting),
  419. saveList: clone(saveList)
  420. }
  421. localStorage.setObject('diepStyle', _storageObj);
  422. };
  423. localStorage.pluginSave();
  424. }
  425.  
  426. function keyListen() {
  427. var input = '';
  428. document.addEventListener('keyup', function(evt) {
  429. var that = this;
  430. if (that.pluginOn == undefined) that.pluginOn = false;
  431. var e = window.event || evt;
  432. var key = e.which || e.keyCode;
  433. input += key;
  434. if (input.indexOf('2727') >= 0) {
  435. input = '';
  436. that.pluginOn = !that.pluginOn
  437. togglePanel(that.pluginOn);
  438. (function save() {
  439. if (!that.pluginOn) {
  440. localStorage.pluginSave();
  441. };
  442. })();
  443. }
  444. if (input.length > 10) input = input.substring(input.length - 10);
  445. });
  446. }
  447.  
  448. function tempInit() {
  449.  
  450. var colorObj = {
  451. th: 0
  452. };
  453. var setObj = {
  454. th: 0
  455. }
  456.  
  457. diepStyle.exportJSON = exportJSON;
  458. diepStyle.importJSON = importJSON;
  459. init1();
  460. loadColor();
  461. setTimeout(diepStyle.resetRender, 1500);
  462. diepStyle.resetColor = loadColor;
  463.  
  464. function init1() {
  465. diepStyle.resetRender = resetRender;
  466.  
  467. var title = `<div class="title">Diep.Style Ver 0.095<br>
  468. Press Esc twice to toggle this</div>`;
  469.  
  470. var colorPlane = function(id) {
  471. return `{position:'left',width:300, height:200,onFineChange:'diepStyle.onColor(${id},this)'}`
  472. }
  473.  
  474. colorObj.setClass = function() {
  475. return `colorBlock colorBlock${this.th++}`
  476. }
  477. setObj.setClass = function() {
  478. return `setting setting${this.th++}`
  479. }
  480.  
  481. function resetRender(cmd) {
  482. document.querySelectorAll('#styleSetting .render').forEach(function(elem) {
  483. elem.outerHTML = ``
  484. })
  485. var it = document.querySelector('.renderBegin')
  486. it.insertAdjacentHTML('afterend', getRenderBody());
  487. it.remove();
  488. nowSetting.renders.forEach(function(elem) {
  489. diepStyle.command.fn(elem.cmd, elem.value);
  490. });
  491. listenerInit(cmd);
  492.  
  493. }
  494. var bodyTheme = getThemeBody();
  495. var bodyRender = getRenderBody();
  496. var bodyColor = getColorBody();
  497. var bodyImport = getImportBody();
  498.  
  499. function getThemeBody() {
  500. var th = 0;
  501. var html = `
  502. <div class="themeBody">
  503. <div class="themeBegin">Theme</div>
  504. <div class="header hide themeDesc">
  505. <span class="name"></span>
  506. <span class="author"></span>
  507. </div>
  508. <div class="theme">
  509. <div class="list">
  510. <div data-theme="dark"><img src="https://imgur.com/bFyXqs5.jpg"><br>Dark</div>
  511. <div data-theme="glass"><img src="https://imgur.com/4fnXdkE.jpg"><br>Glass</div>
  512. <div data-theme="moomoo"><img src="https://imgur.com/XJwGabH.jpg"><br>Moomoo</div>
  513. <div data-theme="80s"><img src="https://imgur.com/9Lma43A.jpg"><br>80s </div>
  514. </div>
  515. </div>
  516. </div>
  517. `
  518. return html
  519. }
  520.  
  521. function getRenderBody() {
  522. var renders = nowSetting.renders;
  523. var th = -1;
  524. var html = `
  525. <div class="renderBegin">Render</div>
  526.  
  527. <div class="row render">
  528. <div class="cell">${renders[++th].name} <br><span class="grid_base_value">${renders[th].value}</span></div>
  529. <div class="cell"><input type="range" name="grid_base_alpha" value=${renders[th].value*100} max="200"></div>
  530. </div>
  531. <div class="row render">
  532. <div class="cell">${renders[++th].name} <br><span class="stroke_intensity_value">${renders[th].value}</span></div>
  533. <div class="cell"><input type="range" name="stroke_soft_color_intensity" value=${renders[th].value*100} max="100"></div>
  534. </div>
  535. <div class="row render">
  536. <div class="cell">${renders[++th].name}</div>
  537. <div class="cell"><input type="checkbox" name="stroke_soft_color" ${renders[th].value?'checked':''}></div>
  538. </div>
  539. <div class="row render">
  540. <div class="cell">${renders[++th].name} <br><span class="border_value">${renders[th].value}</span></div>
  541. <div class="cell"><input type="range" name="border_color_alpha" value=${renders[th].value*100} max="100"></div>
  542. </div>
  543. <div class="row render">
  544. <div class="cell">${renders[++th].name} <br><span class="ui_scale_value">${renders[th].value}</span></div>
  545. <div class="cell"><input type="range" name="ui_scale" value=${renders[th].value*100} max="200"></div>
  546. </div>
  547. <div class="row render">
  548. <div class="cell">${renders[++th].name}</div>
  549. <div class="cell"><input type="checkbox" name="ui" ${renders[th].value?'checked':''}></div>
  550. </div>
  551. <div class="row render">
  552. <div class="cell">${renders[++th].name}</div>
  553. <div class="cell"><input type="checkbox" name="fps" ${renders[th].value?'checked':''}></div>
  554. </div>
  555. <div class="row render">
  556. <div class="cell">${renders[++th].name}</div>
  557. <div class="cell"><input type="checkbox" name="raw_health_values" ${renders[th].value?'checked':''}></div>
  558. </div>
  559. <div class="row render">
  560. <div class="cell">${renders[++th].name}</div>
  561. <div class="cell"><input type="checkbox" name="names" ${renders[th].value?'checked':''}></div>
  562. </div>
  563. `
  564. return html;
  565. }
  566.  
  567. function getColorBody() {
  568. var it=`<div class="row colorBegin">Color</div>\n`;
  569. nowSetting.colors.forEach(function(elem, th) {
  570. var id = elem.id;
  571. it += `
  572. <div class="row colorBlock colorBlock${th}">
  573. <div class="cell"></div>
  574. <div class="cell"><input class="jscolor ${colorPlane(`${id}`)}"> </div>
  575. </div>
  576. `;
  577. });
  578. return it
  579. }
  580.  
  581. var allBody =
  582. `
  583. <div class="pluginBody">${title}
  584. <hr>
  585. ${bodyTheme}
  586. <div class="table">
  587. ${bodyRender} ${bodyColor} <br>
  588. </div>
  589. </div>
  590. `;
  591. var getSaveBtns = function() {
  592. var btn = '';
  593. for (var i = 0; i < 6; i++) {
  594. if (i == 0) {
  595. btn += `<button>Default</button>`;
  596. continue;
  597. }
  598. btn += `<button>${i}</button>`;
  599. }
  600. return btn;
  601. }
  602.  
  603. function getImportBody() {
  604. var html =
  605. `
  606. <div class="importBegin">Import / Export Save</div>
  607. <div class="row">
  608. <div class="cell">
  609. <button class="import">Import</button>
  610. </div>
  611. <div class="cell">
  612. <button class="export">Export</button>
  613. </div>
  614. </div>
  615. `
  616. return html
  617. }
  618. // <button class="selectTheme">Theme</button>
  619. var footer =
  620. `
  621. <div class="footer">
  622. <div class="saveBtns">${getSaveBtns()}</div>
  623. <div class="otherBtns">
  624. <span><button class="import">Import</button></span>
  625. <span><button class="export">Export</button></span>
  626. <span class="lock"><button>Lock</button></span>
  627. <span class="reset"><button>Reset</button></span>
  628. </div>
  629. </div>
  630. `
  631. var id = 0;
  632. var temp = `<div id="styleSetting"> ${allBody} ${footer} </div>`;
  633. document.querySelector('body').insertAdjacentHTML('afterend', temp);
  634. loadScript();
  635.  
  636. function listenerInit(cmd) {;
  637. (function() {
  638. var theName = "grid_base_alpha";
  639. document.querySelector(`input[name=${theName}]`).addEventListener('input',
  640. function(e) {
  641. var value = (e.target.value - e.target.value % 2) / 100
  642. document.querySelector('.grid_base_value').innerHTML = value;
  643. diepStyle.command.fn(theName, value);
  644. });
  645. })();;
  646. (function() {
  647. var theName = "stroke_soft_color_intensity";
  648. document.querySelector(`input[name=${theName}]`).addEventListener('input',
  649. function(e) {
  650. var value = (e.target.value - e.target.value % 5) / 100
  651. document.querySelector('.stroke_intensity_value').innerHTML = value;
  652. diepStyle.command.fn(theName, value);
  653. });
  654. })();;
  655. (function() {
  656. var theName = "stroke_soft_color";
  657. document.querySelector(`input[name=${theName}]`).addEventListener('change',
  658. function(e) {
  659. diepStyle.command.fn(theName, e.target.checked);
  660. });
  661. })();;
  662. (function() {
  663. var theName = "border_color_alpha";
  664. document.querySelector(`input[name=${theName}]`).addEventListener('input',
  665. function(e) {
  666. var value = (e.target.value - e.target.value % 2) / 100
  667. document.querySelector('.border_value').innerHTML = value;
  668. diepStyle.command.fn(theName, value);
  669. });
  670. })();;
  671. (function() {
  672. var theName = "ui_scale";
  673. document.querySelector(`input[name=${theName}]`).addEventListener('input',
  674. function(e) {
  675. var value = (e.target.value - e.target.value % 2) / 100
  676. document.querySelector(`.${theName}_value`).innerHTML = value;
  677. diepStyle.command.fn(theName, value);
  678. });
  679. })();;
  680. (function() {
  681. var theName = "ui";
  682. document.querySelector(`input[name=${theName}]`).addEventListener('change',
  683. function(e) {
  684. diepStyle.command.fn(theName, e.target.checked);
  685. });
  686. })();;
  687. (function() {
  688. var theName = "fps";
  689. document.querySelector(`input[name=${theName}]`).addEventListener('change',
  690. function(e) {
  691. diepStyle.command.fn(theName, e.target.checked);
  692. });
  693. })();;
  694. (function() {
  695. var theName = "raw_health_values";
  696. document.querySelector(`input[name=${theName}]`).addEventListener('change',
  697. function(e) {
  698. diepStyle.command.fn(theName, e.target.checked);
  699. });
  700. })();;
  701. (function() {
  702. var theName = "names";
  703. document.querySelector(`input[name=${theName}]`).addEventListener('change',
  704. function(e) {
  705. diepStyle.command.fn(theName, e.target.checked);
  706. });
  707. })();
  708. if (cmd == 'reset') return;
  709. (function() {
  710. document.querySelectorAll(`.theme div[data-theme]`).forEach(dom => {
  711. dom.addEventListener('click',
  712. () => {
  713. const name = dom.getAttribute('data-theme');
  714. const themes=diepStyle.themeJson;
  715. diepStyle.importJSON(themes[name]);
  716. })
  717. })
  718. })();
  719. // document.querySelector('button.selectTheme').addEventListener('click', function(e) {
  720. // alert('k');
  721. // });
  722. document.querySelector('button.import').addEventListener('click', ()=>{
  723. var example = '[\n{"cmd":"ui_scale","value":"1.5"},' + '\n{"id":"8","value":"888888"}\n]';
  724. var gotValue = prompt('Enter The JSON\nExample:\n' + example, example.replace(/\s/g, ''));
  725. diepStyle.importJSON(gotValue);
  726. });
  727. document.querySelector('button.export').addEventListener('click', function(e) {
  728. prompt('Copy the Json', diepStyle.exportJSON('one'));
  729. });
  730. document.querySelectorAll('.saveBtns button').forEach((elem, th) => {
  731. elem.addEventListener('click', function() {
  732. localStorage.pluginSave();
  733. nowSetting = clone(saveList[th]);
  734. nowSetting.saveTH = th;
  735. // diepStyle.storageInit();
  736. // nowSetting.saveTH=th;
  737. diepStyle.resetColor();
  738. diepStyle.resetRender('reset');
  739. updateSaveBtns();
  740. })
  741. })
  742. document.querySelector('.lock button').addEventListener('click',
  743. function(e) {
  744. nowSetting.lock = !nowSetting.lock;
  745. updateSaveBtns();
  746. });
  747. document.querySelector('.reset button').addEventListener('click',
  748. function(e) {
  749. if (e.target.innerHTML != 'Confirm') {
  750. e.target.innerHTML = 'Confirm';
  751. } else {
  752. diepStyle.storageInit('reset');
  753. diepStyle.resetColor();
  754. diepStyle.resetRender('reset');
  755. updateSaveBtns();
  756. }
  757. });
  758. document.querySelector('.reset button').addEventListener('mouseleave', function(e) {
  759. e.target.innerHTML = 'Reset';
  760. })
  761. updateSaveBtns();
  762.  
  763. function updateSaveBtns() {
  764. var theTH = nowSetting.saveTH;
  765. var status = saveList[theTH];
  766. var lockBtn = document.querySelector('.lock button');
  767. var resetBtn = document.querySelector('.reset button');
  768. if (theTH == 0) {
  769. lockBtn.disabled = true;
  770. resetBtn.disabled = true;
  771. nowSetting.lock = true;
  772. } else {
  773. resetBtn.disabled = nowSetting.lock;
  774. lockBtn.disabled = false;
  775. }
  776. if (resetBtn.disabled) {
  777. document.querySelector('.table').classList.add('noClicks');
  778. document.querySelector('.themeBody').classList.add('noClicks');
  779. document.querySelector('button.import').classList.add('noClicks');
  780. lockBtn.innerHTML = 'locked';
  781. } else {
  782. document.querySelector('.table').classList.remove('noClicks');
  783. document.querySelector('.themeBody').classList.remove('noClicks');
  784. document.querySelector('button.import').classList.remove('noClicks');
  785. lockBtn.innerHTML = 'no lock';
  786. };
  787. (function() {
  788. document.querySelectorAll('.saveBtns button').forEach(function(elem, th) {
  789. elem.classList.remove('chosenBtn');
  790. if (theTH == th) elem.classList.add('chosenBtn');
  791. })
  792. })();
  793. }
  794. }
  795. }
  796.  
  797. function loadColor() {
  798. if (nowSetting.theme) {
  799. document.querySelector('.themeDesc').classList.remove('hide');
  800. var it = document.querySelector('.themeDesc .name');
  801. it.innerText = nowSetting.theme.name;
  802. it = document.querySelector('.themeDesc .author');
  803. it.innerText = 'by\n ' + nowSetting.theme.author;
  804. } else {
  805. document.querySelector('.themeDesc').classList.add('hide');
  806. }
  807.  
  808. nowSetting.colors.some(function(elem, th) {
  809. var target = document.querySelector(`.colorBlock${th}`);
  810. if (!target || !target.querySelector('.cell input').jscolor) {
  811. setTimeout(loadColor, 500);
  812. return true
  813. }
  814. onColor(elem.id, elem.color);
  815. target.querySelector('.cell').innerHTML = elem.name;
  816. target.querySelector('.cell input').jscolor.fromString(elem.color);
  817. })
  818. }
  819.  
  820. function exportJSON(cmd) {
  821. var toExport = [];
  822. if (cmd == 'one') toExport = write(nowSetting);
  823. if (cmd == 'all') saveList.forEach(elem => toExport.push(write(elem)));
  824. return JSON.stringify(toExport);
  825.  
  826. function write(now) {
  827. var array = [];
  828. now.colors.forEach(function(elem) {
  829. if (elem.id && elem.id < 50) array.push({
  830. id: elem.id,
  831. value: elem.color
  832. });
  833. if (elem.id && elem.id >= 50 && elem.id < 100) array.push({
  834. cmd: elem.cmd,
  835. value: elem.color
  836. });
  837. if (!elem.id && elem.cmd) array.push({
  838. cmd: elem.cmd,
  839. value: elem.color
  840. });
  841. });
  842. array.push({
  843. cmd: 'ui_replace_colors',
  844. value: diepStyle.uiColorMap('array')
  845. });
  846. now.renders.forEach(function(elem) {
  847. array.push({
  848. cmd: elem.cmd,
  849. value: elem.value
  850. });
  851. });
  852. if (now.theme) {
  853. array.unshift({
  854. theme: {
  855. name: now.theme.name || '',
  856. author: now.theme.author || ''
  857. }
  858. });
  859. } else {
  860. array.unshift({
  861. theme: {
  862. name: '',
  863. author: ''
  864. }
  865. });
  866. }
  867. return array
  868. }
  869. }
  870.  
  871. function importJSON(json) {
  872. if (!isJson(json)) {
  873. alert('Code Incorrect\nPlz git gud and check your JSON');
  874. return
  875. };
  876. var gotArr = JSON.parse(json);
  877. if (!gotArr) return;
  878. gotArr.forEach(function(elem) {
  879. nowSetting.colors = nowSetting.colors.map(function(now) {
  880. if (elem.id && now.id == elem.id) now.color = elem.value;
  881. if (!elem.id && elem.cmd && now.cmd == elem.cmd) now.color = elem.value;
  882. return now
  883. });
  884. nowSetting.renders = nowSetting.renders.map(function(now) {
  885. if (elem.cmd && now.cmd == elem.cmd) now.value = elem.value;
  886. return now
  887. });
  888. if (elem.cmd == 'ui_replace_colors') {
  889. var uiTH = nowSetting.colors.findIndex(elem => elem.name == 'UI Color1');
  890. for (var i = 0; i < 8; i++) {
  891. nowSetting.colors[uiTH + i].color = elem.value[i];
  892. }
  893. };
  894. if (elem.theme) {
  895. if (elem.theme.name || elem.theme.author) nowSetting.theme = elem.theme;
  896. } else {
  897. elem.theme = {};
  898. };
  899. });
  900. document.querySelectorAll('.saveBtns button')[nowSetting.saveTH].click();
  901.  
  902. function isJson(str) {
  903. try {
  904. JSON.parse(str);
  905. } catch (e) {
  906. return false;
  907. }
  908. if (typeof JSON.parse(str) == 'object') return true;
  909. }
  910. }
  911. }
  912.  
  913. function onColor(id, e) {
  914. var target = id;
  915. var color = e.toString();
  916. if (id >= 0 && id < 50) {
  917. input.execute(`net_replace_color ${target} 0x${color}`)
  918. } else if (id >= 50 && id < 100) {
  919. var cmd = diepStyle.colorMap.get(id).cmd
  920. input.set_convar(cmd, `0x${color}`);
  921. } else {
  922. input.execute('ui_replace_colors' + diepStyle.uiColorMap('0x'));
  923. }
  924. nowSetting.colors = nowSetting.colors.map(function(elem) {
  925. if (elem.id === id) elem.color = color;
  926. return elem
  927. })
  928. }
  929.  
  930. function styleInit() {
  931. addGlobalStyle(`#styleSetting{padding: 0.2em; margin:0.2em; position: absolute;top: 0;right: 0;width: 35%;
  932. min-width:20em; background-color: rgba(200,200,200,0.8);display:none;border: 1px solid black;height: 92vh;}`);
  933. addGlobalStyle(".table{ display: table; text-align: center; width: 99%;}");
  934. addGlobalStyle(".row{ display: table-row; }");
  935. addGlobalStyle(`.cell{ display: table-cell;}`);
  936. addGlobalStyle(`.cell:not(.noBoard){ display: table-cell; padding: 0.1em 0.3em;border: 1px solid black;}`);
  937. addGlobalStyle("input[type=checkbox],input[type=range]{transform: scale(1.2); }");
  938.  
  939. addGlobalStyle(`.pluginBody{height: 90%; overflow-y: auto;}`);
  940. addGlobalStyle(`.theme .list div{width: 48%; float: left; text-align: center; padding: 1%;}`);
  941. addGlobalStyle(`.theme img {width: 90%;}`);
  942. // addGlobalStyle(`.themeDesc .cell {width: 40vw;}`);
  943. addGlobalStyle(`.colorBegin, .renderBegin, .importBegin,.themeBegin,.header{font-size:1.1rem; line-height:1.3em;text-align: center;}`);
  944. addGlobalStyle(`.saveBtns button{margin: 0 3%; padding: 0.2em 0.5em;}`);
  945. addGlobalStyle(`@-moz-document url-prefix() {.saveBtns button{margin: 0 1%;padding: 0.1em 0.3em;} } }`);
  946. addGlobalStyle(`.otherBtns button{margin: 0 4%; padding: 0.2em 0.5em;}`);
  947. addGlobalStyle(`.footer{text-align:center;height:10%; border: 1px solid black;}`);
  948. addGlobalStyle(`.footer > *{margin: 0.2vh 0 1.3vh 0;}`);
  949.  
  950. addGlobalStyle(`.reset button{box-shadow: 0 0 1em red;}`);
  951. addGlobalStyle(`.backRed{background-color:#f14e54}`);
  952. addGlobalStyle(`.chosenBtn{-webkit-filter: brightness(0.8);filter:brightness(0.8);}`)
  953. addGlobalStyle(`.noClicks{pointer-events:none; -webkit-filter: opacity(50%); filter: opacity(50%);}`)
  954. addGlobalStyle(`.hide{display:none}`)
  955.  
  956. function addGlobalStyle(css) {
  957. var head, style;
  958. head = document.getElementsByTagName('head')[0];
  959. if (!head) {
  960. return;
  961. }
  962. style = document.createElement('style');
  963. style.type = 'text/css';
  964. style.innerHTML = css;
  965. head.appendChild(style);
  966. }
  967. }
  968. }
  969.  
  970. function togglePanel(tf) {
  971. if (tf) {
  972. try {
  973. document.querySelector('#styleSetting').style.display = "block";
  974. } catch (err) {
  975. var warn = '\n\nYou can DELETE ALL PLUGIN SAVES to fix this' +
  976. '\nType delete to confirm' +
  977. '\nor cancel to download all saves';
  978. var gotValue = prompt('Got an error\n' + err + warn);
  979. if (gotValue == 'delete') {
  980. localStorage.removeItem('diepStyle');
  981. alert('Deleted,refresh to take effect');
  982. return
  983. } else {
  984. download('diep.style saves.txt', diepStyle.exportJSON('all'))
  985. };
  986. }
  987. } else {
  988. document.querySelector('#styleSetting').style.display = "none";
  989. }
  990.  
  991. function download(filename, text) {
  992. var element = document.createElement('a');
  993. element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text));
  994. element.setAttribute('download', filename);
  995.  
  996. element.style.display = 'none';
  997. document.body.appendChild(element);
  998.  
  999. element.click();
  1000.  
  1001. document.body.removeChild(element);
  1002. }
  1003. }
  1004.  
  1005. function loadScript() {;
  1006. (function() {"use strict"; window.jscolor || (window.jscolor = function() {var e = {register: function() {e.attachDOMReadyEvent(e.init), e.attachEvent(document, "mousedown", e.onDocumentMouseDown), e.attachEvent(document, "touchstart", e.onDocumentTouchStart), e.attachEvent(window, "resize", e.onWindowResize) }, init: function() {e.jscolor.lookupClass && e.jscolor.installByClassName(e.jscolor.lookupClass) }, tryInstallOnElements: function(t, n) {var r = new RegExp("(^|\\s)(" + n + ")(\\s*(\\{[^}]*\\})|\\s|$)", "i"); for (var i = 0; i < t.length; i += 1) {if (t[i].type !== undefined && t[i].type.toLowerCase() == "color" && e.isColorAttrSupported) continue; var s; if (!t[i].jscolor && t[i].className && (s = t[i].className.match(r))) {var o = t[i], u = null, a = e.getDataAttr(o, "jscolor"); a !== null ? u = a : s[4] && (u = s[4]); var f = {}; if (u) try {f = (new Function("return (" + u + ")"))() } catch (l) {e.warn("Error parsing jscolor options: " + l + ":\n" + u) } o.jscolor = new e.jscolor(o, f) } } }, isColorAttrSupported: function() {var e = document.createElement("input"); if (e.setAttribute) {e.setAttribute("type", "color"); if (e.type.toLowerCase() == "color") return !0 } return !1 }(), isCanvasSupported: function() {var e = document.createElement("canvas"); return !!e.getContext && !!e.getContext("2d") }(), fetchElement: function(e) {return typeof e == "string" ? document.getElementById(e) : e }, isElementType: function(e, t) {return e.nodeName.toLowerCase() === t.toLowerCase() }, getDataAttr: function(e, t) {var n = "data-" + t, r = e.getAttribute(n); return r !== null ? r : null }, attachEvent: function(e, t, n) {e.addEventListener ? e.addEventListener(t, n, !1) : e.attachEvent && e.attachEvent("on" + t, n) }, detachEvent: function(e, t, n) {e.removeEventListener ? e.removeEventListener(t, n, !1) : e.detachEvent && e.detachEvent("on" + t, n) }, _attachedGroupEvents: {}, attachGroupEvent: function(t, n, r, i) {e._attachedGroupEvents.hasOwnProperty(t) || (e._attachedGroupEvents[t] = []), e._attachedGroupEvents[t].push([n, r, i]), e.attachEvent(n, r, i) }, detachGroupEvents: function(t) {if (e._attachedGroupEvents.hasOwnProperty(t)) {for (var n = 0; n < e._attachedGroupEvents[t].length; n += 1) {var r = e._attachedGroupEvents[t][n]; e.detachEvent(r[0], r[1], r[2]) } delete e._attachedGroupEvents[t] } }, attachDOMReadyEvent: function(e) {var t = !1, n = function() {t || (t = !0, e()) }; if (document.readyState === "complete") {setTimeout(n, 1); return } if (document.addEventListener) document.addEventListener("DOMContentLoaded", n, !1), window.addEventListener("load", n, !1); else if (document.attachEvent) {document.attachEvent("onreadystatechange", function() {document.readyState === "complete" && (document.detachEvent("onreadystatechange", arguments.callee), n()) }), window.attachEvent("onload", n); if (document.documentElement.doScroll && window == window.top) {var r = function() {if (!document.body) return; try {document.documentElement.doScroll("left"), n() } catch (e) {setTimeout(r, 1) } }; r() } } }, warn: function(e) {window.console && window.console.warn && window.console.warn(e) }, preventDefault: function(e) {e.preventDefault && e.preventDefault(), e.returnValue = !1 }, captureTarget: function(t) {t.setCapture && (e._capturedTarget = t, e._capturedTarget.setCapture()) }, releaseTarget: function() {e._capturedTarget && (e._capturedTarget.releaseCapture(), e._capturedTarget = null) }, fireEvent: function(e, t) {if (!e) return; if (document.createEvent) {var n = document.createEvent("HTMLEvents"); n.initEvent(t, !0, !0), e.dispatchEvent(n) } else if (document.createEventObject) {var n = document.createEventObject(); e.fireEvent("on" + t, n) } else e["on" + t] && e["on" + t]() }, classNameToList: function(e) {return e.replace(/^\s+|\s+$/g, "").split(/\s+/) }, hasClass: function(e, t) {return t ? -1 != (" " + e.className.replace(/\s+/g, " ") + " ").indexOf(" " + t + " ") : !1 }, setClass: function(t, n) {var r = e.classNameToList(n); for (var i = 0; i < r.length; i += 1) e.hasClass(t, r[i]) || (t.className += (t.className ? " " : "") + r[i]) }, unsetClass: function(t, n) {var r = e.classNameToList(n); for (var i = 0; i < r.length; i += 1) {var s = new RegExp("^\\s*" + r[i] + "\\s*|" + "\\s*" + r[i] + "\\s*$|" + "\\s+" + r[i] + "(\\s+)", "g"); t.className = t.className.replace(s, "$1") } }, getStyle: function(e) {return window.getComputedStyle ? window.getComputedStyle(e) : e.currentStyle }, setStyle: function() {var e = document.createElement("div"), t = function(t) {for (var n = 0; n < t.length; n += 1) if (t[n] in e.style) return t[n] }, n = {borderRadius: t(["borderRadius", "MozBorderRadius", "webkitBorderRadius"]), boxShadow: t(["boxShadow", "MozBoxShadow", "webkitBoxShadow"]) }; return function(e, t, r) {switch (t.toLowerCase()) {case "opacity": var i = Math.round(parseFloat(r) * 100); e.style.opacity = r, e.style.filter = "alpha(opacity=" + i + ")"; break; default: e.style[n[t]] = r } } }(), setBorderRadius: function(t, n) {e.setStyle(t, "borderRadius", n || "0") }, setBoxShadow: function(t, n) {e.setStyle(t, "boxShadow", n || "none") }, getElementPos: function(t, n) {var r = 0, i = 0, s = t.getBoundingClientRect(); r = s.left, i = s.top; if (!n) {var o = e.getViewPos(); r += o[0], i += o[1] } return [r, i] }, getElementSize: function(e) {return [e.offsetWidth, e.offsetHeight] }, getAbsPointerPos: function(e) {e || (e = window.event); var t = 0, n = 0; return typeof e.changedTouches != "undefined" && e.changedTouches.length ? (t = e.changedTouches[0].clientX, n = e.changedTouches[0].clientY) : typeof e.clientX == "number" && (t = e.clientX, n = e.clientY), {x: t, y: n } }, getRelPointerPos: function(e) {e || (e = window.event); var t = e.target || e.srcElement, n = t.getBoundingClientRect(), r = 0, i = 0, s = 0, o = 0; return typeof e.changedTouches != "undefined" && e.changedTouches.length ? (s = e.changedTouches[0].clientX, o = e.changedTouches[0].clientY) : typeof e.clientX == "number" && (s = e.clientX, o = e.clientY), r = s - n.left, i = o - n.top, {x: r, y: i } }, getViewPos: function() {var e = document.documentElement; return [(window.pageXOffset || e.scrollLeft) - (e.clientLeft || 0), (window.pageYOffset || e.scrollTop) - (e.clientTop || 0)] }, getViewSize: function() {var e = document.documentElement; return [window.innerWidth || e.clientWidth, window.innerHeight || e.clientHeight] }, redrawPosition: function() {if (e.picker && e.picker.owner) {var t = e.picker.owner, n, r; t.fixed ? (n = e.getElementPos(t.targetElement, !0), r = [0, 0]) : (n = e.getElementPos(t.targetElement), r = e.getViewPos()); var i = e.getElementSize(t.targetElement), s = e.getViewSize(), o = e.getPickerOuterDims(t), u, a, f; switch (t.position.toLowerCase()) {case "left": u = 1, a = 0, f = -1; break; case "right": u = 1, a = 0, f = 1; break; case "top": u = 0, a = 1, f = -1; break; default: u = 0, a = 1, f = 1 } var l = (i[a] + o[a]) / 2; if (!t.smartPosition) var c = [n[u], n[a] + i[a] - l + l * f]; else var c = [-r[u] + n[u] + o[u] > s[u] ? -r[u] + n[u] + i[u] / 2 > s[u] / 2 && n[u] + i[u] - o[u] >= 0 ? n[u] + i[u] - o[u] : n[u] : n[u], -r[a] + n[a] + i[a] + o[a] - l + l * f > s[a] ? -r[a] + n[a] + i[a] / 2 > s[a] / 2 && n[a] + i[a] - l - l * f >= 0 ? n[a] + i[a] - l - l * f : n[a] + i[a] - l + l * f : n[a] + i[a] - l + l * f >= 0 ? n[a] + i[a] - l + l * f : n[a] + i[a] - l - l * f]; var h = c[u], p = c[a], d = t.fixed ? "fixed" : "absolute", v = (c[0] + o[0] > n[0] || c[0] < n[0] + i[0]) && c[1] + o[1] < n[1] + i[1]; e._drawPosition(t, h, p, d, v) } }, _drawPosition: function(t, n, r, i, s) {var o = s ? 0 : t.shadowBlur; e.picker.wrap.style.position = i, e.picker.wrap.style.left = n + "px", e.picker.wrap.style.top = r + "px", e.setBoxShadow(e.picker.boxS, t.shadow ? new e.BoxShadow(0, o, t.shadowBlur, 0, t.shadowColor) : null) }, getPickerDims: function(t) {var n = !!e.getSliderComponent(t), r = [2 * t.insetWidth + 2 * t.padding + t.width + (n ? 2 * t.insetWidth + e.getPadToSliderPadding(t) + t.sliderSize : 0), 2 * t.insetWidth + 2 * t.padding + t.height + (t.closable ? 2 * t.insetWidth + t.padding + t.buttonHeight : 0)]; return r }, getPickerOuterDims: function(t) {var n = e.getPickerDims(t); return [n[0] + 2 * t.borderWidth, n[1] + 2 * t.borderWidth] }, getPadToSliderPadding: function(e) {return Math.max(e.padding, 1.5 * (2 * e.pointerBorderWidth + e.pointerThickness)) }, getPadYComponent: function(e) {switch (e.mode.charAt(1).toLowerCase()) {case "v": return "v"} return "s"}, getSliderComponent: function(e) {if (e.mode.length > 2) switch (e.mode.charAt(2).toLowerCase()) {case "s": return "s"; case "v": return "v"} return null }, onDocumentMouseDown: function(t) {t || (t = window.event); var n = t.target || t.srcElement; n._jscLinkedInstance ? n._jscLinkedInstance.showOnClick && n._jscLinkedInstance.show() : n._jscControlName ? e.onControlPointerStart(t, n, n._jscControlName, "mouse") : e.picker && e.picker.owner && e.picker.owner.hide() }, onDocumentTouchStart: function(t) {t || (t = window.event); var n = t.target || t.srcElement; n._jscLinkedInstance ? n._jscLinkedInstance.showOnClick && n._jscLinkedInstance.show() : n._jscControlName ? e.onControlPointerStart(t, n, n._jscControlName, "touch") : e.picker && e.picker.owner && e.picker.owner.hide() }, onWindowResize: function(t) {e.redrawPosition() }, onParentScroll: function(t) {e.picker && e.picker.owner && e.picker.owner.hide() }, _pointerMoveEvent: {mouse: "mousemove", touch: "touchmove"}, _pointerEndEvent: {mouse: "mouseup", touch: "touchend"}, _pointerOrigin: null, _capturedTarget: null, onControlPointerStart: function(t, n, r, i) {var s = n._jscInstance; e.preventDefault(t), e.captureTarget(n); var o = function(s, o) {e.attachGroupEvent("drag", s, e._pointerMoveEvent[i], e.onDocumentPointerMove(t, n, r, i, o)), e.attachGroupEvent("drag", s, e._pointerEndEvent[i], e.onDocumentPointerEnd(t, n, r, i)) }; o(document, [0, 0]); if (window.parent && window.frameElement) {var u = window.frameElement.getBoundingClientRect(), a = [-u.left, -u.top]; o(window.parent.window.document, a) } var f = e.getAbsPointerPos(t), l = e.getRelPointerPos(t); e._pointerOrigin = {x: f.x - l.x, y: f.y - l.y }; switch (r) {case "pad": switch (e.getSliderComponent(s)) {case "s": s.hsv[1] === 0 && s.fromHSV(null, 100, null); break; case "v": s.hsv[2] === 0 && s.fromHSV(null, null, 100) } e.setPad(s, t, 0, 0); break; case "sld": e.setSld(s, t, 0) } e.dispatchFineChange(s) }, onDocumentPointerMove: function(t, n, r, i, s) {return function(t) {var i = n._jscInstance; switch (r) {case "pad": t || (t = window.event), e.setPad(i, t, s[0], s[1]), e.dispatchFineChange(i); break; case "sld": t || (t = window.event), e.setSld(i, t, s[1]), e.dispatchFineChange(i) } } }, onDocumentPointerEnd: function(t, n, r, i) {return function(t) {var r = n._jscInstance; e.detachGroupEvents("drag"), e.releaseTarget(), e.dispatchChange(r) } }, dispatchChange: function(t) {t.valueElement && e.isElementType(t.valueElement, "input") && e.fireEvent(t.valueElement, "change") }, dispatchFineChange: function(e) {if (e.onFineChange) {var t; typeof e.onFineChange == "string" ? t = new Function(e.onFineChange) : t = e.onFineChange, t.call(e) } }, setPad: function(t, n, r, i) {var s = e.getAbsPointerPos(n), o = r + s.x - e._pointerOrigin.x - t.padding - t.insetWidth, u = i + s.y - e._pointerOrigin.y - t.padding - t.insetWidth, a = o * (360 / (t.width - 1)), f = 100 - u * (100 / (t.height - 1)); switch (e.getPadYComponent(t)) {case "s": t.fromHSV(a, f, null, e.leaveSld); break; case "v": t.fromHSV(a, null, f, e.leaveSld) } }, setSld: function(t, n, r) {var i = e.getAbsPointerPos(n), s = r + i.y - e._pointerOrigin.y - t.padding - t.insetWidth, o = 100 - s * (100 / (t.height - 1)); switch (e.getSliderComponent(t)) {case "s": t.fromHSV(null, o, null, e.leavePad); break; case "v": t.fromHSV(null, null, o, e.leavePad) } }, _vmlNS: "jsc_vml_", _vmlCSS: "jsc_vml_css_", _vmlReady: !1, initVML: function() {if (!e._vmlReady) {var t = document; t.namespaces[e._vmlNS] || t.namespaces.add(e._vmlNS, "urn:schemas-microsoft-com:vml"); if (!t.styleSheets[e._vmlCSS]) {var n = ["shape", "shapetype", "group", "background", "path", "formulas", "handles", "fill", "stroke", "shadow", "textbox", "textpath", "imagedata", "line", "polyline", "curve", "rect", "roundrect", "oval", "arc", "image"], r = t.createStyleSheet(); r.owningElement.id = e._vmlCSS; for (var i = 0; i < n.length; i += 1) r.addRule(e._vmlNS + "\\:" + n[i], "behavior:url(#default#VML);") } e._vmlReady = !0 } }, createPalette: function() {var t = {elm: null, draw: null }; if (e.isCanvasSupported) {var n = document.createElement("canvas"), r = n.getContext("2d"), i = function(e, t, i) {n.width = e, n.height = t, r.clearRect(0, 0, n.width, n.height); var s = r.createLinearGradient(0, 0, n.width, 0); s.addColorStop(0, "#F00"), s.addColorStop(1 / 6, "#FF0"), s.addColorStop(2 / 6, "#0F0"), s.addColorStop(.5, "#0FF"), s.addColorStop(4 / 6, "#00F"), s.addColorStop(5 / 6, "#F0F"), s.addColorStop(1, "#F00"), r.fillStyle = s, r.fillRect(0, 0, n.width, n.height); var o = r.createLinearGradient(0, 0, 0, n.height); switch (i.toLowerCase()) {case "s": o.addColorStop(0, "rgba(255,255,255,0)"), o.addColorStop(1, "rgba(255,255,255,1)"); break; case "v": o.addColorStop(0, "rgba(0,0,0,0)"), o.addColorStop(1, "rgba(0,0,0,1)") } r.fillStyle = o, r.fillRect(0, 0, n.width, n.height) }; t.elm = n, t.draw = i } else {e.initVML(); var s = document.createElement("div"); s.style.position = "relative", s.style.overflow = "hidden"; var o = document.createElement(e._vmlNS + ":fill"); o.type = "gradient", o.method = "linear", o.angle = "90", o.colors = "16.67% #F0F, 33.33% #00F, 50% #0FF, 66.67% #0F0, 83.33% #FF0"; var u = document.createElement(e._vmlNS + ":rect"); u.style.position = "absolute", u.style.left = "-1px", u.style.top = "-1px", u.stroked = !1, u.appendChild(o), s.appendChild(u); var a = document.createElement(e._vmlNS + ":fill"); a.type = "gradient", a.method = "linear", a.angle = "180", a.opacity = "0"; var f = document.createElement(e._vmlNS + ":rect"); f.style.position = "absolute", f.style.left = "-1px", f.style.top = "-1px", f.stroked = !1, f.appendChild(a), s.appendChild(f); var i = function(e, t, n) {s.style.width = e + "px", s.style.height = t + "px", u.style.width = f.style.width = e + 1 + "px", u.style.height = f.style.height = t + 1 + "px", o.color = "#F00", o.color2 = "#F00"; switch (n.toLowerCase()) {case "s": a.color = a.color2 = "#FFF"; break; case "v": a.color = a.color2 = "#000"} }; t.elm = s, t.draw = i } return t }, createSliderGradient: function() {var t = {elm: null, draw: null }; if (e.isCanvasSupported) {var n = document.createElement("canvas"), r = n.getContext("2d"), i = function(e, t, i, s) {n.width = e, n.height = t, r.clearRect(0, 0, n.width, n.height); var o = r.createLinearGradient(0, 0, 0, n.height); o.addColorStop(0, i), o.addColorStop(1, s), r.fillStyle = o, r.fillRect(0, 0, n.width, n.height) }; t.elm = n, t.draw = i } else {e.initVML(); var s = document.createElement("div"); s.style.position = "relative", s.style.overflow = "hidden"; var o = document.createElement(e._vmlNS + ":fill"); o.type = "gradient", o.method = "linear", o.angle = "180"; var u = document.createElement(e._vmlNS + ":rect"); u.style.position = "absolute", u.style.left = "-1px", u.style.top = "-1px", u.stroked = !1, u.appendChild(o), s.appendChild(u); var i = function(e, t, n, r) {s.style.width = e + "px", s.style.height = t + "px", u.style.width = e + 1 + "px", u.style.height = t + 1 + "px", o.color = n, o.color2 = r }; t.elm = s, t.draw = i } return t }, leaveValue: 1, leaveStyle: 2, leavePad: 4, leaveSld: 8, BoxShadow: function() {var e = function(e, t, n, r, i, s) {this.hShadow = e, this.vShadow = t, this.blur = n, this.spread = r, this.color = i, this.inset = !!s }; return e.prototype.toString = function() {var e = [Math.round(this.hShadow) + "px", Math.round(this.vShadow) + "px", Math.round(this.blur) + "px", Math.round(this.spread) + "px", this.color]; return this.inset && e.push("inset"), e.join(" ") }, e }(), jscolor: function(t, n) {function i(e, t, n) {e /= 255, t /= 255, n /= 255; var r = Math.min(Math.min(e, t), n), i = Math.max(Math.max(e, t), n), s = i - r; if (s === 0) return [null, 0, 100 * i]; var o = e === r ? 3 + (n - t) / s : t === r ? 5 + (e - n) / s : 1 + (t - e) / s; return [60 * (o === 6 ? 0 : o), 100 * (s / i), 100 * i] } function s(e, t, n) {var r = 255 * (n / 100); if (e === null) return [r, r, r]; e /= 60, t /= 100; var i = Math.floor(e), s = i % 2 ? e - i : 1 - (e - i), o = r * (1 - t), u = r * (1 - t * s); switch (i) {case 6: case 0: return [r, u, o]; case 1: return [u, r, o]; case 2: return [o, r, u]; case 3: return [o, u, r]; case 4: return [u, o, r]; case 5: return [r, o, u] } } function o() {e.unsetClass(d.targetElement, d.activeClass), e.picker.wrap.parentNode.removeChild(e.picker.wrap), delete e.picker.owner } function u() {function l() {var e = d.insetColor.split(/\s+/), n = e.length < 2 ? e[0] : e[1] + " " + e[0] + " " + e[0] + " " + e[1]; t.btn.style.borderColor = n } d._processParentElementsInDOM(), e.picker || (e.picker = {owner: null, wrap: document.createElement("div"), box: document.createElement("div"), boxS: document.createElement("div"), boxB: document.createElement("div"), pad: document.createElement("div"), padB: document.createElement("div"), padM: document.createElement("div"), padPal: e.createPalette(), cross: document.createElement("div"), crossBY: document.createElement("div"), crossBX: document.createElement("div"), crossLY: document.createElement("div"), crossLX: document.createElement("div"), sld: document.createElement("div"), sldB: document.createElement("div"), sldM: document.createElement("div"), sldGrad: e.createSliderGradient(), sldPtrS: document.createElement("div"), sldPtrIB: document.createElement("div"), sldPtrMB: document.createElement("div"), sldPtrOB: document.createElement("div"), btn: document.createElement("div"), btnT: document.createElement("span") }, e.picker.pad.appendChild(e.picker.padPal.elm), e.picker.padB.appendChild(e.picker.pad), e.picker.cross.appendChild(e.picker.crossBY), e.picker.cross.appendChild(e.picker.crossBX), e.picker.cross.appendChild(e.picker.crossLY), e.picker.cross.appendChild(e.picker.crossLX), e.picker.padB.appendChild(e.picker.cross), e.picker.box.appendChild(e.picker.padB), e.picker.box.appendChild(e.picker.padM), e.picker.sld.appendChild(e.picker.sldGrad.elm), e.picker.sldB.appendChild(e.picker.sld), e.picker.sldB.appendChild(e.picker.sldPtrOB), e.picker.sldPtrOB.appendChild(e.picker.sldPtrMB), e.picker.sldPtrMB.appendChild(e.picker.sldPtrIB), e.picker.sldPtrIB.appendChild(e.picker.sldPtrS), e.picker.box.appendChild(e.picker.sldB), e.picker.box.appendChild(e.picker.sldM), e.picker.btn.appendChild(e.picker.btnT), e.picker.box.appendChild(e.picker.btn), e.picker.boxB.appendChild(e.picker.box), e.picker.wrap.appendChild(e.picker.boxS), e.picker.wrap.appendChild(e.picker.boxB)); var t = e.picker, n = !!e.getSliderComponent(d), r = e.getPickerDims(d), i = 2 * d.pointerBorderWidth + d.pointerThickness + 2 * d.crossSize, s = e.getPadToSliderPadding(d), o = Math.min(d.borderRadius, Math.round(d.padding * Math.PI)), u = "crosshair"; t.wrap.style.clear = "both", t.wrap.style.width = r[0] + 2 * d.borderWidth + "px", t.wrap.style.height = r[1] + 2 * d.borderWidth + "px", t.wrap.style.zIndex = d.zIndex, t.box.style.width = r[0] + "px", t.box.style.height = r[1] + "px", t.boxS.style.position = "absolute", t.boxS.style.left = "0", t.boxS.style.top = "0", t.boxS.style.width = "100%", t.boxS.style.height = "100%", e.setBorderRadius(t.boxS, o + "px"), t.boxB.style.position = "relative", t.boxB.style.border = d.borderWidth + "px solid", t.boxB.style.borderColor = d.borderColor, t.boxB.style.background = d.backgroundColor, e.setBorderRadius(t.boxB, o + "px"), t.padM.style.background = t.sldM.style.background = "#FFF", e.setStyle(t.padM, "opacity", "0"), e.setStyle(t.sldM, "opacity", "0"), t.pad.style.position = "relative", t.pad.style.width = d.width + "px", t.pad.style.height = d.height + "px", t.padPal.draw(d.width, d.height, e.getPadYComponent(d)), t.padB.style.position = "absolute", t.padB.style.left = d.padding + "px", t.padB.style.top = d.padding + "px", t.padB.style.border = d.insetWidth + "px solid", t.padB.style.borderColor = d.insetColor, t.padM._jscInstance = d, t.padM._jscControlName = "pad", t.padM.style.position = "absolute", t.padM.style.left = "0", t.padM.style.top = "0", t.padM.style.width = d.padding + 2 * d.insetWidth + d.width + s / 2 + "px", t.padM.style.height = r[1] + "px", t.padM.style.cursor = u, t.cross.style.position = "absolute", t.cross.style.left = t.cross.style.top = "0", t.cross.style.width = t.cross.style.height = i + "px", t.crossBY.style.position = t.crossBX.style.position = "absolute", t.crossBY.style.background = t.crossBX.style.background = d.pointerBorderColor, t.crossBY.style.width = t.crossBX.style.height = 2 * d.pointerBorderWidth + d.pointerThickness + "px", t.crossBY.style.height = t.crossBX.style.width = i + "px", t.crossBY.style.left = t.crossBX.style.top = Math.floor(i / 2) - Math.floor(d.pointerThickness / 2) - d.pointerBorderWidth + "px", t.crossBY.style.top = t.crossBX.style.left = "0", t.crossLY.style.position = t.crossLX.style.position = "absolute", t.crossLY.style.background = t.crossLX.style.background = d.pointerColor, t.crossLY.style.height = t.crossLX.style.width = i - 2 * d.pointerBorderWidth + "px", t.crossLY.style.width = t.crossLX.style.height = d.pointerThickness + "px", t.crossLY.style.left = t.crossLX.style.top = Math.floor(i / 2) - Math.floor(d.pointerThickness / 2) + "px", t.crossLY.style.top = t.crossLX.style.left = d.pointerBorderWidth + "px", t.sld.style.overflow = "hidden", t.sld.style.width = d.sliderSize + "px", t.sld.style.height = d.height + "px", t.sldGrad.draw(d.sliderSize, d.height, "#000", "#000"), t.sldB.style.display = n ? "block" : "none", t.sldB.style.position = "absolute", t.sldB.style.right = d.padding + "px", t.sldB.style.top = d.padding + "px", t.sldB.style.border = d.insetWidth + "px solid", t.sldB.style.borderColor = d.insetColor, t.sldM._jscInstance = d, t.sldM._jscControlName = "sld", t.sldM.style.display = n ? "block" : "none", t.sldM.style.position = "absolute", t.sldM.style.right = "0", t.sldM.style.top = "0", t.sldM.style.width = d.sliderSize + s / 2 + d.padding + 2 * d.insetWidth + "px", t.sldM.style.height = r[1] + "px", t.sldM.style.cursor = "default", t.sldPtrIB.style.border = t.sldPtrOB.style.border = d.pointerBorderWidth + "px solid " + d.pointerBorderColor, t.sldPtrOB.style.position = "absolute", t.sldPtrOB.style.left = -(2 * d.pointerBorderWidth + d.pointerThickness) + "px", t.sldPtrOB.style.top = "0", t.sldPtrMB.style.border = d.pointerThickness + "px solid " + d.pointerColor, t.sldPtrS.style.width = d.sliderSize + "px", t.sldPtrS.style.height = m + "px", t.btn.style.display = d.closable ? "block" : "none", t.btn.style.position = "absolute", t.btn.style.left = d.padding + "px", t.btn.style.bottom = d.padding + "px", t.btn.style.padding = "0 15px", t.btn.style.height = d.buttonHeight + "px", t.btn.style.border = d.insetWidth + "px solid", l(), t.btn.style.color = d.buttonColor, t.btn.style.font = "12px sans-serif", t.btn.style.textAlign = "center"; try {t.btn.style.cursor = "pointer"} catch (c) {t.btn.style.cursor = "hand"} t.btn.onmousedown = function() {d.hide() }, t.btnT.style.lineHeight = d.buttonHeight + "px", t.btnT.innerHTML = "", t.btnT.appendChild(document.createTextNode(d.closeText)), a(), f(), e.picker.owner && e.picker.owner !== d && e.unsetClass(e.picker.owner.targetElement, d.activeClass), e.picker.owner = d, e.isElementType(v, "body") ? e.redrawPosition() : e._drawPosition(d, 0, 0, "relative", !1), t.wrap.parentNode != v && v.appendChild(t.wrap), e.setClass(d.targetElement, d.activeClass) } function a() {switch (e.getPadYComponent(d)) {case "s": var t = 1; break; case "v": var t = 2 } var n = Math.round(d.hsv[0] / 360 * (d.width - 1)), r = Math.round((1 - d.hsv[t] / 100) * (d.height - 1)), i = 2 * d.pointerBorderWidth + d.pointerThickness + 2 * d.crossSize, o = -Math.floor(i / 2); e.picker.cross.style.left = n + o + "px", e.picker.cross.style.top = r + o + "px"; switch (e.getSliderComponent(d)) {case "s": var u = s(d.hsv[0], 100, d.hsv[2]), a = s(d.hsv[0], 0, d.hsv[2]), f = "rgb(" + Math.round(u[0]) + "," + Math.round(u[1]) + "," + Math.round(u[2]) + ")", l = "rgb(" + Math.round(a[0]) + "," + Math.round(a[1]) + "," + Math.round(a[2]) + ")"; e.picker.sldGrad.draw(d.sliderSize, d.height, f, l); break; case "v": var c = s(d.hsv[0], d.hsv[1], 100), f = "rgb(" + Math.round(c[0]) + "," + Math.round(c[1]) + "," + Math.round(c[2]) + ")", l = "#000"; e.picker.sldGrad.draw(d.sliderSize, d.height, f, l) } } function f() {var t = e.getSliderComponent(d); if (t) {switch (t) {case "s": var n = 1; break; case "v": var n = 2 } var r = Math.round((1 - d.hsv[n] / 100) * (d.height - 1)); e.picker.sldPtrOB.style.top = r - (2 * d.pointerBorderWidth + d.pointerThickness) - Math.floor(m / 2) + "px"} } function l() {return e.picker && e.picker.owner === d } function c() {d.importColor() } this.value = null, this.valueElement = t, this.styleElement = t, this.required = !0, this.refine = !0, this.hash = !1, this.uppercase = !0, this.onFineChange = null, this.activeClass = "jscolor-active", this.minS = 0, this.maxS = 100, this.minV = 0, this.maxV = 100, this.hsv = [0, 0, 100], this.rgb = [255, 255, 255], this.width = 181, this.height = 101, this.showOnClick = !0, this.mode = "HSV", this.position = "bottom", this.smartPosition = !0, this.sliderSize = 16, this.crossSize = 8, this.closable = !1, this.closeText = "Close", this.buttonColor = "#000000", this.buttonHeight = 18, this.padding = 12, this.backgroundColor = "#FFFFFF", this.borderWidth = 1, this.borderColor = "#BBBBBB", this.borderRadius = 8, this.insetWidth = 1, this.insetColor = "#BBBBBB", this.shadow = !0, this.shadowBlur = 15, this.shadowColor = "rgba(0,0,0,0.2)", this.pointerColor = "#4C4C4C", this.pointerBorderColor = "#FFFFFF", this.pointerBorderWidth = 1, this.pointerThickness = 2, this.zIndex = 1e3, this.container = null; for (var r in n) n.hasOwnProperty(r) && (this[r] = n[r]); this.hide = function() {l() && o() }, this.show = function() {u() }, this.redraw = function() {l() && u() }, this.importColor = function() {this.valueElement ? e.isElementType(this.valueElement, "input") ? this.refine ? !this.required && /^\s*$/.test(this.valueElement.value) ? (this.valueElement.value = "", this.styleElement && (this.styleElement.style.backgroundImage = this.styleElement._jscOrigStyle.backgroundImage, this.styleElement.style.backgroundColor = this.styleElement._jscOrigStyle.backgroundColor, this.styleElement.style.color = this.styleElement._jscOrigStyle.color), this.exportColor(e.leaveValue | e.leaveStyle)) : this.fromString(this.valueElement.value) || this.exportColor() : this.fromString(this.valueElement.value, e.leaveValue) || (this.styleElement && (this.styleElement.style.backgroundImage = this.styleElement._jscOrigStyle.backgroundImage, this.styleElement.style.backgroundColor = this.styleElement._jscOrigStyle.backgroundColor, this.styleElement.style.color = this.styleElement._jscOrigStyle.color), this.exportColor(e.leaveValue | e.leaveStyle)) : this.exportColor() : this.exportColor() }, this.exportColor = function(t) {if (!(t & e.leaveValue) && this.valueElement) {var n = this.toString(); this.uppercase && (n = n.toUpperCase()), this.hash && (n = "#" + n), e.isElementType(this.valueElement, "input") ? this.valueElement.value = n : this.valueElement.innerHTML = n } t & e.leaveStyle || this.styleElement && (this.styleElement.style.backgroundImage = "none", this.styleElement.style.backgroundColor = "#" + this.toString(), this.styleElement.style.color = this.isLight() ? "#000" : "#FFF"), !(t & e.leavePad) && l() && a(), !(t & e.leaveSld) && l() && f() }, this.fromHSV = function(e, t, n, r) {if (e !== null) {if (isNaN(e)) return !1; e = Math.max(0, Math.min(360, e)) } if (t !== null) {if (isNaN(t)) return !1; t = Math.max(0, Math.min(100, this.maxS, t), this.minS) } if (n !== null) {if (isNaN(n)) return !1; n = Math.max(0, Math.min(100, this.maxV, n), this.minV) } this.rgb = s(e === null ? this.hsv[0] : this.hsv[0] = e, t === null ? this.hsv[1] : this.hsv[1] = t, n === null ? this.hsv[2] : this.hsv[2] = n), this.exportColor(r) }, this.fromRGB = function(e, t, n, r) {if (e !== null) {if (isNaN(e)) return !1; e = Math.max(0, Math.min(255, e)) } if (t !== null) {if (isNaN(t)) return !1; t = Math.max(0, Math.min(255, t)) } if (n !== null) {if (isNaN(n)) return !1; n = Math.max(0, Math.min(255, n)) } var o = i(e === null ? this.rgb[0] : e, t === null ? this.rgb[1] : t, n === null ? this.rgb[2] : n); o[0] !== null && (this.hsv[0] = Math.max(0, Math.min(360, o[0]))), o[2] !== 0 && (this.hsv[1] = o[1] === null ? null : Math.max(0, this.minS, Math.min(100, this.maxS, o[1]))), this.hsv[2] = o[2] === null ? null : Math.max(0, this.minV, Math.min(100, this.maxV, o[2])); var u = s(this.hsv[0], this.hsv[1], this.hsv[2]); this.rgb[0] = u[0], this.rgb[1] = u[1], this.rgb[2] = u[2], this.exportColor(r) }, this.fromString = function(e, t) {var n; if (n = e.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i)) return n[1].length === 6 ? this.fromRGB(parseInt(n[1].substr(0, 2), 16), parseInt(n[1].substr(2, 2), 16), parseInt(n[1].substr(4, 2), 16), t) : this.fromRGB(parseInt(n[1].charAt(0) + n[1].charAt(0), 16), parseInt(n[1].charAt(1) + n[1].charAt(1), 16), parseInt(n[1].charAt(2) + n[1].charAt(2), 16), t), !0; if (n = e.match(/^\W*rgba?\(([^)]*)\)\W*$/i)) {var r = n[1].split(","), i = /^\s*(\d*)(\.\d+)?\s*$/, s, o, u; if (r.length >= 3 && (s = r[0].match(i)) && (o = r[1].match(i)) && (u = r[2].match(i))) {var a = parseFloat((s[1] || "0") + (s[2] || "")), f = parseFloat((o[1] || "0") + (o[2] || "")), l = parseFloat((u[1] || "0") + (u[2] || "")); return this.fromRGB(a, f, l, t), !0 } } return !1 }, this.toString = function() {return (256 | Math.round(this.rgb[0])).toString(16).substr(1) + (256 | Math.round(this.rgb[1])).toString(16).substr(1) + (256 | Math.round(this.rgb[2])).toString(16).substr(1) }, this.toHEXString = function() {return "#" + this.toString().toUpperCase() }, this.toRGBString = function() {return "rgb(" + Math.round(this.rgb[0]) + "," + Math.round(this.rgb[1]) + "," + Math.round(this.rgb[2]) + ")"}, this.isLight = function() {return .213 * this.rgb[0] + .715 * this.rgb[1] + .072 * this.rgb[2] > 127.5 }, this._processParentElementsInDOM = function() {if (this._linkedElementsProcessed) return; this._linkedElementsProcessed = !0; var t = this.targetElement; do {var n = e.getStyle(t); n && n.position.toLowerCase() === "fixed" && (this.fixed = !0), t !== this.targetElement && (t._jscEventsAttached || (e.attachEvent(t, "scroll", e.onParentScroll), t._jscEventsAttached = !0)) } while ((t = t.parentNode) && !e.isElementType(t, "body")) }; if (typeof t == "string") {var h = t, p = document.getElementById(h); p ? this.targetElement = p : e.warn("Could not find target element with ID '" + h + "'") } else t ? this.targetElement = t : e.warn("Invalid target element: '" + t + "'"); if (this.targetElement._jscLinkedInstance) {e.warn("Cannot link jscolor twice to the same element. Skipping."); return } this.targetElement._jscLinkedInstance = this, this.valueElement = e.fetchElement(this.valueElement), this.styleElement = e.fetchElement(this.styleElement); var d = this, v = this.container ? e.fetchElement(this.container) : document.getElementsByTagName("body")[0], m = 3; if (e.isElementType(this.targetElement, "button")) if (this.targetElement.onclick) {var g = this.targetElement.onclick; this.targetElement.onclick = function(e) {return g.call(this, e), !1 } } else this.targetElement.onclick = function() {return !1 }; if (this.valueElement && e.isElementType(this.valueElement, "input")) {var y = function() {d.fromString(d.valueElement.value, e.leaveValue), e.dispatchFineChange(d) }; e.attachEvent(this.valueElement, "keyup", y), e.attachEvent(this.valueElement, "input", y), e.attachEvent(this.valueElement, "blur", c), this.valueElement.setAttribute("autocomplete", "off") } this.styleElement && (this.styleElement._jscOrigStyle = {backgroundImage: this.styleElement.style.backgroundImage, backgroundColor: this.styleElement.style.backgroundColor, color: this.styleElement.style.color }), this.value ? this.fromString(this.value) || this.exportColor() : this.importColor() } }; return e.jscolor.lookupClass = "jscolor", e.jscolor.installByClassName = function(t) {var n = document.getElementsByTagName("input"), r = document.getElementsByTagName("button"); e.tryInstallOnElements(n, t), e.tryInstallOnElements(r, t) }, e.register(), e.jscolor }()); })(); }
  1007. ;(function loadThemes(){
  1008. diepStyle.themeJson={
  1009. dark:`[{"theme":{"name":"Dark Mode","author":"/u/162893476"}} ,{"id":2,"value":"001117"},{"id":15,"value":"140000"},{"id":3,"value":"005574"},{"id":4,"value":"540000"},{"id":5,"value":"090413"},{"id":6,"value":"00121a"},{"id":17,"value":"0D0D0D"},{"id":12,"value":"0D0D0D"},{"id":8,"value":"141400"},{"id":7,"value":"0d1500"},{"id":9,"value":"170606"},{"id":10,"value":"0a0016"},{"id":11,"value":"160517"},{"id":14,"value":"141414"},{"id":1,"value":"0f0f0f"},{"cmd":"ren_bar_background_color","value":"000000"},{"cmd":"ren_stroke_solid_color","value":"555555"},{"id":13,"value":"00bd88"},{"cmd":"ren_xp_bar_fill_color","value":"ffde43"},{"cmd":"ren_score_bar_fill_color","value":"43ff91"},{"cmd":"ren_health_fill_color","value":"85e37d"},{"cmd":"ren_health_background_color","value":"555555"},{"cmd":"ren_grid_color","value":"111111"},{"cmd":"ren_minimap_background_color","value":"323232"},{"cmd":"ren_minimap_border_color","value":"986895"},{"cmd":"ren_background_color","value":"000000"},{"cmd":"ren_border_color","value":"0f0f0f"},{"cmd":"ui_replace_colors","value":["ffe280","ff31a0","882dff","2d5aff","ffde26","ff2626","95ff26","17d2ff"]},{"cmd":"grid_base_alpha","value":2},{"cmd":"stroke_soft_color_intensity","value":-10},{"cmd":"stroke_soft_color","value":false},{"cmd":"border_color_alpha","value":0.5},{"cmd":"ui_scale","value":1},{"cmd":"ui","value":false},{"cmd":"fps","value":false},{"cmd":"raw_health_values","value":false},{"cmd":"names","value":false}] `,
  1010. glass:`[{"theme":{"name":"Glass","author":"/u/162893476"}}, {"id":2,"value":"00627D"},{"id":15,"value":"7E0000"},{"id":3,"value":"00627D"},{"id":4,"value":"7E0000"},{"id":5,"value":"3D007E"},{"id":6,"value":"007E00"},{"id":17,"value":"464646"},{"id":12,"value":"7E7E00"},{"id":8,"value":"7E7E00"},{"id":7,"value":"457E00"},{"id":16,"value":"795C00"},{"id":9,"value":"7C0320"},{"id":10,"value":"43397d"},{"id":11,"value":"7E037A"},{"id":14,"value":"252525"},{"id":1,"value":"464646"},{"cmd":"ren_bar_background_color","value":"191919"},{"cmd":"ren_stroke_solid_color","value":"555555"},{"id":13,"value":"008B54"},{"cmd":"ren_xp_bar_fill_color","value":"666600"},{"cmd":"ren_score_bar_fill_color","value":"008B54"},{"cmd":"ren_health_fill_color","value":"85e37d"},{"cmd":"ren_health_background_color","value":"555555"},{"cmd":"ren_grid_color","value":"373737"},{"cmd":"ren_minimap_background_color","value":"464646"},{"cmd":"ren_minimap_border_color","value":"676767"},{"cmd":"ren_background_color","value":"000000"},{"cmd":"ren_border_color","value":"454545"},{"cmd":"ui_replace_colors","value":["e69f6c","ff73ff","c980ff","71b4ff","ffed3f","ff7979","88ff41","41ffff"]},{"cmd":"grid_base_alpha","value":2},{"cmd":"stroke_soft_color_intensity","value":-9},{"cmd":"stroke_soft_color","value":false},{"cmd":"border_color_alpha","value":0.5},{"cmd":"ui_scale","value":1},{"cmd":"ui","value":false},{"cmd":"fps","value":false},{"cmd":"raw_health_values","value":false},{"cmd":"names","value":false}] `,
  1011. moomoo:`[{"theme":{"name":"Moomoo","author":"yst6zJTuKCHQvAXW4IPV"}}, {"id":2,"value":"847377"},{"id":15,"value":"7F4B63"},{"id":3,"value":"475F9E"},{"id":4,"value":"844052"},{"id":5,"value":"A330B1"},{"id":6,"value":"A66E4F"},{"id":17,"value":"6D6B84"},{"id":12,"value":"596B4A"},{"id":8,"value":"5b6b4d"},{"id":7,"value":"928150"},{"id":16,"value":"596B4A"},{"id":9,"value":"8c4256"},{"id":10,"value":"63647e"},{"id":11,"value":"5A5B72"},{"id":14,"value":"837752"},{"id":1,"value":"535377"},{"cmd":"ren_bar_background_color","value":"586B44"},{"cmd":"ren_stroke_solid_color","value":"35354E"},{"id":13,"value":"64ff8c"},{"cmd":"ren_xp_bar_fill_color","value":"FFFFFF"},{"cmd":"ren_score_bar_fill_color","value":"586B44"},{"cmd":"ren_health_fill_color","value":"8ECC51"},{"cmd":"ren_health_background_color","value":"3D3F42"},{"cmd":"ren_grid_color","value":"000000"},{"cmd":"ren_minimap_background_color","value":"586B44"},{"cmd":"ren_minimap_border_color","value":"586B44"},{"cmd":"ren_background_color","value":"768F5B"},{"cmd":"ren_border_color","value":"333333"},{"cmd":"ui_replace_colors","value":["5d4322","825d30","a8783e","bf8f54","c89e6a","d6b68f","e3ceb5","f1e7da"]},{"cmd":"grid_base_alpha","value":0.1},{"cmd":"stroke_soft_color_intensity","value":0.25},{"cmd":"stroke_soft_color","value":false},{"cmd":"border_color_alpha","value":0.1},{"cmd":"ui_scale","value":1},{"cmd":"ui","value":false},{"cmd":"fps","value":false},{"cmd":"raw_health_values","value":false},{"cmd":"names","value":false}]`,
  1012. "80s":`[{"theme":{"name":"80s Light","author":"Road-to-100k"}}, {"id":2,"value":"00efff"},{"id":15,"value":"ff00ff"},{"id":3,"value":"00efff"},{"id":4,"value":"ff00ff"},{"id":5,"value":"ffaa00"},{"id":6,"value":"4FFFB0"},{"id":17,"value":"c6c6c6"},{"id":12,"value":"ffe869"},{"id":8,"value":"FFD800"},{"id":7,"value":"89ff69"},{"id":16,"value":"fcc376"},{"id":9,"value":"FF004F"},{"id":10,"value":"0000CD"},{"id":11,"value":"ffffff"},{"id":14,"value":"43197e"},{"id":1,"value":"999999"},{"cmd":"ren_bar_background_color","value":"1e0b38"},{"cmd":"ren_stroke_solid_color","value":"555555"},{"id":13,"value":"64ff8c"},{"cmd":"ren_xp_bar_fill_color","value":"ffde43"},{"cmd":"ren_score_bar_fill_color","value":"43ff91"},{"cmd":"ren_health_fill_color","value":"85e37d"},{"cmd":"ren_health_background_color","value":"555555"},{"cmd":"ren_grid_color","value":"ff00ff"},{"cmd":"ren_minimap_background_color","value":"CDCDCD"},{"cmd":"ren_minimap_border_color","value":"797979"},{"cmd":"ren_background_color","value":"1e0b38"},{"cmd":"ren_border_color","value":"000000"},{"cmd":"ui_replace_colors","value":["e69f6c","ff73ff","c980ff","71b4ff","ffed3f","ff7979","88ff41","41ffff"]},{"cmd":"grid_base_alpha","value":1.1},{"cmd":"stroke_soft_color_intensity","value":0.3},{"cmd":"stroke_soft_color","value":false},{"cmd":"border_color_alpha","value":0.6},{"cmd":"ui_scale","value":1},{"cmd":"ui","value":false},{"cmd":"fps","value":false},{"cmd":"raw_health_values","value":false},{"cmd":"names","value":false}] `,
  1013. }
  1014. })();
  1015. })();