1'use strict'; 2 3let ajaxUrl, 4 files, 5 intervals = [], 6 ajaxVars = {}, 7 GLOBAL_URL = ''; // GLOBAL_URL 8 9function clearFiles() { 10 files = null; 11} 12 13$.fn.hasAttr = function (name) { 14 return this.attr(name) !== undefined; 15}; 16 17$(function () { 18 // Cancel transitions 19 $('body').on('click', 'a', function (e) { 20 console.log('Cancel transitions'); 21 if (this.hasAttribute('onclick')) { 22 e.preventDefault(); 23 } 24 //if (!$(this).hasClass('nob')) 25 }); 26}); 27 28window.addEventListener('popstate', function (event) { 29 // back to prev page 30 // load(window.location.pathname.replace('/dir', '')); 31 // history.pushState(null, null, window.location.pathname); 32}); 33 34function load(url = null, ...fileds) { 35 let data = new FormData(); 36 let type = 'POST'; 37 38 // Files 39 let fieldOfFiles = $('#files'); 40 if (typeof fieldOfFiles[0] != 'undefined') files = fieldOfFiles[0].files; 41 42 // Files 2 43 let fieldOfFiles2 = $('.init-files'); 44 for (let i = 0; i < fieldOfFiles2.length; i++) { 45 if (fieldOfFiles2[i].files) { 46 files = fieldOfFiles2[i].files; 47 break; 48 } 49 } 50 51 $.each(files, function (key, value) { 52 data.append(key, value); 53 }); 54 55 // Parse params: 56 // #text - знаÑÐµÐ½Ð½Ñ input з id='text' 57 // .text - знаÑÐµÐ½Ð½Ñ input з class='text' 58 // age=25 - пеÑедаÑмо клÑÑ Ñа знаÑÐµÐ½Ð½Ñ 59 // name#field - пеÑедаÑмо клÑÑ Ñа знаÑÐµÐ½Ð½Ñ ÑоÑми ( клÑÑ=name, знаÑеннÑ=field ) 60 // !name#el - пеÑедаÑмо клÑÑ Ñа знаÑÐµÐ½Ð½Ñ ÐµÐ»ÐµÐ¼ÐµÐ½ÑÑ(не input, ex: <p id="el">Text</p>) 61 // form:#login - пеÑедаÑмо ÑоÑÐ¼Ñ Ð· id='login' 62 // json:{} - пеÑедаÑмо json // TODO ... 63 // *SYS_OPTION* - ÑиÑÑемна опÑÑÑ Ð´Ð»Ñ load() ex: *move* 64 for (let i = 0; i < fileds.length; i++) { 65 if (fileds[i].charAt(0) === '#' || fileds[i].charAt(0) === '.') { 66 data.append(fileds[i], $(fileds[i]).val()); 67 } else { 68 // if (fileds[i].indexOf('=') >= 0) { 69 if (/^\w{1,32}=(.*?)$/i.test(fileds[i])) { 70 let arr = fileds[i].split('='); 71 data.append(arr[0], arr[1]); 72 } else { 73 if (/^!?\w{1,32}#(.*?)$/i.test(fileds[i])) { 74 // name#field 75 let arr = fileds[i].split('#'); 76 if (arr[0].charAt(0) === '!') 77 data.append(arr[0].replace('!', ''), $('#' + arr[1]).text()); 78 else data.append(arr[0], $('#' + arr[1]).val()); 79 } else if (/^!?\w{1,32}\.(.*?)$/i.test(fileds[i])) { 80 // name.field 81 let arr = fileds[i].split('.'); 82 if (arr[0].charAt(0) === '!') 83 data.append(arr[0].replace('!', ''), $('.' + arr[1]).text()); 84 else data.append(arr[0], $('.' + arr[1]).val()); 85 } else if (/^\*(.*?)\*$/i.test(fileds[i])) { 86 // *SYS_OPTION* 87 let arr = fileds[i].split('='); 88 sysFunctions[arr[0]] = arr[1] ? arr[1] : true; 89 } else if ('url:url' === fileds[i]) { 90 // url:url curent page url 91 data.append('_url', window.location.href); 92 } else { 93 // form serialize 94 if (/^form:#(.*?)$/i.test(fileds[i])) { 95 let arr = fileds[i].split('#'); 96 let elements = document.forms[arr[1]].elements; 97 // console.log($('#' + arr[1]).serialize()); 98 99 for (let i = 0; i < elements.length; i++) { 100 let formField = $(elements[i]); 101 102 if ( 103 formField[0].type === 'radio' || 104 formField[0].type === 'checkbox' 105 ) { 106 if (formField[0].checked === true) { 107 data.append(formField.attr('name'), formField[0].value); 108 } 109 } else { 110 data.append(formField.attr('name'), formField.val()); 111 } 112 } 113 } 114 // console.log(fileds[i]); 115 } 116 } 117 } 118 } 119 120 let contentType = false;
121 if (/Edge/.test(navigator.userAgent)) { 122 // contentType = "application/x-www-form-urlencoded"; // [-----------------------------7e314734a0746 Content-Disposition:_form-data;_name] => "email" [email protected] 123 // contentType = "multipart/form-data;"; // Missing boundary in multipart/form-data POST data in <b>Unknown</b> on line <b>0</b> 124 // contentType = "application/json; charset=utf-8;"; // empty 125 // contentType = "multipart/form-data; charset=utf-8; boundary=" + Math.random() .toString().substr(2); // empty 126 } 127 128 $.ajax({ 129 // url: site_url + trim(url, '/'), 130 url: url.substring(0, 4) === 'http' ? url : site_url + trim(url, '/'), 131 type: type, 132 data: data, 133 cache: false, 134 dataType: 'json', 135 processData: false, 136 contentType: contentType, 137 138 success: function (result) { 139 if (result.error == false) { 140 //prev page 141 ajaxUrl = window.location.href; 142 143 // Parse result 144 for (let key in result.res) processField(result.res[key]); 145 146 callAfterLoad(); // After Load func 147 } else { 148 if (Array.isArray(result.error)) { 149 result.error.forEach(function (item, i, arr) { 150 $('.' + item.key).addClass('error'); 151 $('.' + item.key + ' span.error_text').text(item.value); 152 }); 153 } else { 154 noticeError(result.error); 155 // alert(result.error); 156 } 157 158 // Parse error res 159 if (Array.isArray(result.error_res)) { 160 for (let key in result.error_res) processField(result.error_res[key]); 161 } 162 163 callAfterLoad(); // After Load func 164 } 165 166 // callAfterLoad(); 167 }, 168 error: function (result) { 169 // alert("Error!"); 170 stopAllSpinnersIMG(); 171 }, 172 }); 173 174 callAfterClick(); 175} 176 177function processField(jsonObj) { 178 try { 179 if (jsonObj.action === 'prepend') { 180 // paste at the begin 181 $(jsonObj.key).prepend(jsonObj.value); 182 } else if (jsonObj.action === 'append') { 183 // paste et the end 184 $(jsonObj.key).append(jsonObj.value); 185 } else if (jsonObj.action === 'after') { 186 // paste after 187 $(jsonObj.key).after(jsonObj.value); 188 189 console.log(jsonObj.key); 190 console.log(jsonObj.value); 191 } else if (jsonObj.action === 'before') { 192 // paste before 193 $(jsonObj.key).before(jsonObj.value); 194 } else if (jsonObj.action === 'attr') { 195 // set attr 196 $(jsonObj.key).attr(jsonObj.attrName, jsonObj.value); 197 } else if (jsonObj.action === 'removeAttr') { 198 // set attr 199 $(jsonObj.key).removeAttr(jsonObj.value); 200 } else if (jsonObj.action === 'addClass') { 201 // set attr 202 $(jsonObj.key).addClass(jsonObj.value); 203 } else if (jsonObj.action === 'removeClass') { 204 // set attr 205 $(jsonObj.key).removeClass(jsonObj.value); 206 } else if (jsonObj.action === 'remove' || jsonObj.action === 'delete') { 207 // remove element 208 $(jsonObj.key).remove(); 209 } else if (jsonObj.action === 'val') { 210 // set value 211 $(jsonObj.key).val(jsonObj.value); 212 } else if (jsonObj.action === 'func') { 213 // function 214 window[jsonObj.key](jsonObj.value); 215 } else if (jsonObj.action === 'jvar') { 216 // пеÑÐµÐ¼ÐµÐ½Ð½Ð°Ñ Ð² глобалÑном маÑиве ajaxVars 217 ajaxVars[jsonObj.key] = jsonObj.value; 218 } else if (jsonObj.action === 'load') { 219 // load page 220 if (jsonObj.value) load(jsonObj.key, jsonObj.value); 221 else load(jsonObj.key); 222 } else if (jsonObj.action === 'redirect') { 223 // redirect 224 window.location.href = jsonObj.value; 225 } else if (jsonObj.action === 'title') { 226 // set title 227 document.title = jsonObj.value; 228 } else if (jsonObj.action === 'url') { 229 //url 230 // add history 231 history.pushState('', '', jsonObj.value); 232 GLOBAL_URL = jsonObj.value; 233 } else if (jsonObj.url != false && typeof jsonObj.url !== 'undefined') { 234 // add history 235 history.pushState('', '', jsonObj.url); 236 GLOBAL_URL = jsonObj.url; 237 } else if (jsonObj.click != false && typeof jsonObj.click !== 'undefined') { 238 // trigger click 239 $(jsonObj.click).trigger('click'); 240 } else { 241 $(jsonObj.key).html(jsonObj.value); 242 } 243 return; 244 } catch (e) { 245 console.log('Error process', e); 246 return; 247 } 248} 249 250let CHECKcallAfterClick = false;
251let CHECKcallAfterLoad = false; 252 253/** 254 * Function calling after click load() 255 */ 256function callAfterClick() { 257 if (!CHECKcallAfterClick) { 258 CHECKcallAfterClick = true; 259 260 // // Hide boards panel 261 // $(document).on('click', function(e) { 262 // // Board 263 // if (!$(e.target).closest('.boards_window').length && !$(e.target).closest('header a').length) { 264 // // console.log("click not boards_window"); 265 // $('#boards').removeClass('open').addClass('close'); 266 // // $('#boards').fadeOut(200); 267 // } 268 // 269 // // Board link 270 // if ($(e.target).closest('.boards_window .board_choose a').length) { 271 // // console.log("click not boards_window > a"); 272 // // $('#boards').removeClass('open').addClass('close'); // <--- work before 273 // // $('#search').addClass('close').removeClass('open'); 274 // } 275 // 276 // e.stopPropagation(); 277 // }); 278 } 279} 280 281function callAfterLoad() { 282 if (!CHECKcallAfterLoad) { 283 CHECKcallAfterLoad = true; 284 285 // // Hide search 286 // $(document).on('click', function(e) { 287 // // Search -> Home 288 // if ($(e.target).closest('._home').length) { 289 // // console.log("click home"); 290 // // closeSearch(); 291 // } 292 // 293 // // Search -> tool open 294 // if ($(e.target).closest('a.head').length) { 295 // // console.log("click search tool"); 296 // // closeSearch(); 297 // } 298 // 299 // e.stopPropagation(); 300 // }); 301 } 302 303 if (typeof AOS !== 'undefined') { 304 AOS.refreshHard(); 305 } 306 // if (typeof window['showBtn'] === "function") { 307 // showBtn(); 308 // } 309 // if (typeof window['redissBtn'] === "function") { 310 // redissBtn(); 311 // } 312} 313 314function isEmpty(obj) { 315 for (var prop in obj) { 316 if (Object.prototype.hasOwnProperty.call(obj, prop)) { 317 return false; 318 } 319 } 320 321 return JSON.stringify(obj) === JSON.stringify({}); 322} 323 324/** 325 * Function event_stop 326 * - event.preventDefault() stop go by link 327 * - event.stopPropagation() stop next events 328 */ 329function stopEv() { 330 event.preventDefault(); // cancel switch href 331 event.stopPropagation(); 332} 333 334function trim(str, charlist) { 335 charlist = !charlist 336 ? ' \\s\xA0' 337 : charlist.replace(/([\[\]\(\)\.\?\/\*\{\}\+\$\^\:])/g, '$1'); 338 let re = new RegExp('^[' + charlist + ']+|[' + charlist + ']+$', 'g'); 339 return str.replace(re, ''); 340} 341 342function formatString(str) { 343 return str 344 .replace(/\\\'/g, "'") 345 .replace(/\\\"/g, '"') 346 .replace(/\\\//g, '/') 347 .replace(/\\\\/g, '\\'); 348} 349 350function putText(target, html) { 351 $(target).html(html); 352} 353 354function setVal(target, html) { 355 $(target).val(html); 356} 357 358function getTime(mode) { 359 mode = mode || 's'; 360 361 if (mode === 'ms') return new Date().getTime(); // result in ms 362 else return Math.floor(new Date().getTime() / 1000); // result in s 363} 364 365function addZero(value) { 366 if (value.toString().length === 1) value = '0' + value; 367 368 return value; 369} 370 371function focusMe(key) { 372 $(key).focus(); 373} 374 375function scrollToEl(el) { 376 let $page = $('html, body'), 377 speed = 0; 378 379 // el = el || '#content'; 380 el = el || 'body'; 381 382 if (/^(.*?)\|\w{1,32}$/i.test(el)) { 383 // Scroll with time 384 let arr = el.split('|'); 385 el = arr[0]; 386 speed = parseInt(arr[1]); 387 388 // $page.animate({ 389 // scrollTop: $(el).offset().top 390 // }, speed); 391 } else { 392 // // Scroll 393 // $(el).animate({ 394 // scrollTop: 0 395 // }, 0); 396 } 397 398 $page.animate( 399 { 400 scrollTop: $(el).offset().top - 100, 401 }, 402 speed 403 ); 404} 405 406/** 407 * isObjEmpty 408 * @param obj 409 * @returns {boolean} 410 */ 411function isObjEmpty(obj) { 412 for (let key in obj) return false; 413 414 return true; 415} 416 417/** 418 * checkInt - пеÑевÑÑÑÑ Ñи знаÑÐµÐ½Ð½Ñ Ñ Ñилом Ñ Ð¿Ð¾Ð²ÐµÑÑÐ°Ñ Ð¹Ð¾Ð³Ð¾, ÑкÑо Ð½Ñ - повеÑÑаÑÑÑÑÑ Ð·Ð½Ð°ÑÐµÐ½Ð½Ñ Ð·Ð° замовÑÑваннÑм 419 * @param value 420 * @param defaultValue 421 */ 422function checkInt(value, defaultValue) { 423 if (!defaultValue && defaultValue !== false) defaultValue = 0; 424 425 if (!isNaN(parseFloat(value)) && isFinite(value)) 426 return parseInt(value); // added parseInt 12.11.2018 427 else return defaultValue; 428} 429 430/** 431 * incrementAction 432 * @param el 433 */ 434 435function incrementAction(el) { 436 let value = parseInt($(el).text()); 437 if (isNaN(value)) value = 0; 438 439 $(el).text(value + 1); 440} 441 442function hideNotice(id) { 443 setTimeout(function () { 444 $('#' + id).fadeOut(2000); 445 }, 7000); 446} 447 448function randomInteger(min, max) { 449 return Math.round(min + Math.random() * (max - min)); 450} 451 452function docW() { 453 return $(document).width(); 454} 455function docH() { 456 return $(document).height(); 457} 458function winW() { 459 return $(window).width(); 460} 461function winH() { 462 return $(window).height(); 463} 464 465/** 466 * copyToClipboard 467 * @param target 468 */ 469function copyToClipboard(target) { 470 /* Get the text field */ 471 var copyText = document.getElementById(target); 472
473 /* Select the text field */ 474 copyText.select(); 475 copyText.setSelectionRange(0, 99999); /*For mobile devices*/ 476 477 /* Copy the text inside the text field */ 478 document.execCommand('copy'); 479 480 /* Alert the copied text */ 481 noticeInfo('Copied!'); 482} 483 484/* Crop */ 485 486var minHeightForCrop = 300; 487var minWidthForCrop = 300; 488 489function setMinHeightForCrop(height) { 490 minHeightForCrop = height; 491} 492function setMinWidthForCrop(width) { 493 minWidthForCrop = width; 494} 495 496function addCrop(cropEl) { 497 var xy_h = document.getElementById('xy_h'); 498 var div = document.getElementById('xy'); 499 var flagOnMove = false; 500 var flagOnResize = false; 501 502 var crop = document.getElementById(cropEl); 503 var cropHeight = parseInt(crop.style.height); 504 var cropWidth = parseInt(crop.style.width); 505 506 var imgCoefficient = $('#coef').val(); 507 if (imgCoefficient <= 1) imgCoefficient = 1; 508 509 var minCropHeight = parseInt(minHeightForCrop / imgCoefficient); 510 var minCropWidth = parseInt(minWidthForCrop / imgCoefficient); 511 512 //console.log(cropWidth + ' * ' + cropHeight); 513 //console.log(imgCoefficient); 514 515 xy_h.style.top = 0 + 'px'; 516 xy_h.style.left = 0 + 'px'; 517 $('#posY').val(0); 518 $('#posX').val(0); 519 520 xy_h.style.width = minCropWidth + 'px'; 521 xy_h.style.height = minCropHeight + 'px'; 522 div.style.width = minCropWidth + 'px'; 523 div.style.height = minCropHeight + 'px'; 524 $('#width').val(minCropWidth); 525 $('#height').val(minCropHeight); 526 527 // ---C1-------------------------- 528 var c1 = document.getElementById('c1'); 529 530 c1.onmousedown = function (event) { 531 flagOnResize = true; 532 533 var width = div.offsetWidth; 534 var height = div.offsetHeight; 535 var top = xy_h.offsetTop; 536 var left = xy_h.offsetLeft; 537 538 var posX = event.pageX; 539 var posY = event.pageY; 540 541 document.onmousemove = function (event) { 542 if (flagOnResize == true) { 543 var res = width - (event.pageX - posX); 544 var resTop = top + event.pageX - posX; 545 var resLeft = left + event.pageX - posX; 546 547 if (res >= minCropWidth && resTop >= 0 && resLeft >= 0) { 548 xy_h.style.top = resTop + 'px'; 549 xy_h.style.left = resLeft + 'px'; 550 $('#posY').val(resTop); 551 $('#posX').val(resLeft); 552 } 553 554 if (res >= minCropWidth && resTop >= 0 && resLeft >= 0) { 555 xy_h.style.width = res + 'px'; 556 xy_h.style.height = res + 'px'; 557 div.style.width = res + 'px'; 558 div.style.height = res + 'px'; 559 560 $('#width').val(res); 561 $('#height').val(res); 562 } 563 564 scaling('mini'); 565 } 566 }; 567 }; 568 569 // ---C2-------------------------- 570 var c2 = document.getElementById('c2'); 571 572 c2.onmousedown = function (event) { 573 flagOnResize = true; 574 575 var width = div.offsetWidth; 576 var height = div.offsetHeight; 577 var top = xy_h.offsetTop; 578 var left = xy_h.offsetLeft; 579 580 var posX = event.pageX; 581 var posY = event.pageY; 582 583 document.onmousemove = function (event) { 584 if (flagOnResize == true) { 585 var res = height + (posY - event.pageY); 586 var resTop = top - (posY - event.pageY); 587 588 if (res >= minCropHeight && resTop >= 0) { 589 if (left + res <= cropWidth) { 590 xy_h.style.top = resTop + 'px'; 591 $('#posY').val(resTop); 592 } 593 } 594 595 if (res >= minCropHeight && resTop >= 0) { 596 if (left + res <= cropWidth) { 597 //res = cropWidth - left; 598 xy_h.style.width = res + 'px'; 599 xy_h.style.height = res + 'px'; 600 div.style.width = res + 'px'; 601 div.style.height = res + 'px'; 602 603 $('#width').val(res); 604 $('#height').val(res); 605 } 606 } 607 608 scaling('mini'); 609 } 610 }; 611 }; 612 613 // ---C3-------------------------- 614 var c3 = document.getElementById('c3'); 615 616 c3.onmousedown = function (event) { 617 flagOnResize = true; 618 619 var width = div.offsetWidth; 620 var height = div.offsetHeight; 621 var top = xy_h.offsetTop; 622 var left = xy_h.offsetLeft; 623 624 var posX = event.pageX; 625 var posY = event.pageY; 626 627 document.onmousemove = function (event) { 628 if (flagOnResize == true) { 629 var res = width + event.pageX - posX; 630 631 if (res <= minCropWidth) res = minCropWidth; 632 if (left + res >= cropWidth) res = cropWidth - left; 633 if (top + res >= cropHeight) res = cropHeight - top; 634 635 xy_h.style.width = res + 'px'; 636 xy_h.style.height = res + 'px'; 637 div.style.width = res + 'px'; 638 div.style.height = res + 'px'; 639 640 $('#width').val(res); 641 $('#height').val(res); 642 643 scaling('mini'); 644 } 645 }; 646 }; 647 648 // ---C4-------------------------- 649 var c4 = document.getElementById('c4'); 650 651 c4.onmousedown = function (event) { 652 flagOnResize = true; 653 654 var width = div.offsetWidth; 655 var height = div.offsetHeight; 656 var top = xy_h.offsetTop; 657 var left = xy_h.offsetLeft; 658 659 var posX = event.pageX; 660 var posY = event.pageY; 661 662 document.onmousemove = function (event) { 663 if (flagOnResize == true) { 664 var res = height + (event.pageY - posY); 665 var resLeft = left + (posY - event.pageY); 666 667 if (res >= minCropHeight && resLeft >= 0 && top + res <= cropHeight) { 668 xy_h.style.left = resLeft + 'px'; 669 $('#posX').val(resLeft); 670 } 671 672 if (res >= minCropHeight && resLeft >= 0 && top + res <= cropHeight) { 673 xy_h.style.width = res + 'px'; 674 xy_h.style.height = res + 'px'; 675 div.style.width = res + 'px'; 676 div.style.height = res + 'px'; 677 678 $('#width').val(res); 679 $('#height').val(res); 680 } 681 682 scaling('mini'); 683 } 684 }; 685 }; 686 687 // ----------------------------- 688 689 div.onmousedown = function (event) { 690 flagOnMove = true; 691 692 var width = div.offsetWidth; 693 var height = div.offsetHeight; 694 var top = xy_h.offsetTop; 695 var left = xy_h.offsetLeft; 696 697 var posX = event.pageX; 698 var posY = event.pageY; 699 700 document.onmousemove = function (event) { 701 if (flagOnMove == true) { 702 var newTop = top + event.pageY - posY; 703 if (newTop <= 0) newTop = 0; 704 if (newTop + height >= cropHeight) newTop = cropHeight - height; 705 706 var newLeft = left + event.pageX - posX; 707 if (newLeft <= 0) newLeft = 0; 708 if (newLeft + width >= cropWidth) newLeft = cropWidth - width; 709 710 xy_h.style.top = newTop + 'px'; 711 xy_h.style.left = newLeft + 'px'; 712 713 $('#width').val(width); 714 $('#height').val(height); 715 $('#posY').val(newTop); 716 $('#posX').val(newLeft); 717 718 scaling('mini'); 719 } 720 }; 721 }; 722 723 document.onmouseup = function () { 724 flagOnMove = false;
725 flagOnResize = false; 726 }; 727} 728 729function scaling(id) { 730 var obj = document.getElementById(id); 731 var xy_h = document.getElementById('xy_h'); 732 var div = document.getElementById('xy'); 733 734 var width = div.offsetWidth; 735 var height = div.offsetHeight; 736 var top = xy_h.offsetTop; 737 var left = xy_h.offsetLeft; 738 739 var imgW = 265; 740 var imgH = 265; 741 var miniature = 50; 742 743 var cofW = miniature / width; 744 var cofH = miniature / height; 745 746 if (obj != null) { 747 obj.style.width = imgW * cofW + 'px'; 748 obj.style.height = imgH * cofH + 'px'; 749 obj.style.marginTop = '-' + top * cofW + 'px'; 750 obj.style.marginLeft = '-' + left * cofH + 'px'; 751 } 752} 753 754function removeFieldImage(id) { 755 $('#image_block_' + id).remove(); 756} 757 758// Return TRUE if the given function has been defined 759function function_exists(function_name) { 760 if (typeof function_name == 'string') { 761 return typeof window[function_name] == 'function'; 762 } else { 763 return function_name instanceof Function; 764 } 765} 766 767function loaderBtnStartCMS(btn) { 768 const currentColor = getComputedStyle(btn).getPropertyValue( 769 '--text-color-loader' 770 ); 771 btn.innerHTML = `<span class="disabled-btn-content">${btn.innerHTML}</span>`; 772 773 btn.insertAdjacentHTML( 774 'beforeend', 775 ` 776 <div role="status"> 777 <svg aria-hidden="true" viewBox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg"> 778 <path class="track-loader" d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z" fill="${currentColor}"/> 779 <path d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z" fill="${currentColor}"/> 780 </svg> 781 <span class="disabled-btn-sr-only">Loading...</span> 782 </div> 783 ` 784 ); 785 786 btn.classList.add('disabled-btn-loader-cms'); 787 btn.disabled = true; 788} 789 790function loaderBtnEndCMS(id) { 791 const btn = document.getElementById(id); 792 793 btn.querySelector('div[role="status"]').remove(); 794 btn.innerHTML = btn.querySelector('span.disabled-btn-content').innerHTML; 795 796 btn.classList.remove('disabled-btn-loader-cms'); 797 btn.disabled = false; 798} 799 800function globalLoaderStartCMS() { 801 const loader = document.getElementById('global-loader'); 802 803 loader.style.opacity = '1'; 804 loader.style.pointerEvents = 'auto'; 805 scrollLock.disablePageScroll(); 806} 807 808function globalLoaderEndCMS() { 809 const loader = document.getElementById('global-loader'); 810 811 loader.style.opacity = '0'; 812 loader.style.pointerEvents = 'none'; 813 scrollLock.enablePageScroll(); 814}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.