Änderungen von Dokument Get Started

Zuletzt geändert von Veronika Kocher am Freitag, 04 Sep. 2026 14:45

Von Version 2.10
bearbeitet von Veronika Kocher
am Freitag, 04 Sep. 2026 14:23
Änderungskommentar: Es gibt keinen Kommentar für diese Version
Auf Version 2.6
bearbeitet von Veronika Kocher
am Donnerstag, 03 Sep. 2026 9:34
Änderungskommentar: Es gibt keinen Kommentar für diese Version

Zusammenfassung

Details

Seiteneigenschaften
Inhalt
... ... @@ -384,145 +384,27 @@
384 384   <a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/Enable/Project%20Planning%20%26%20Organisation/">Projektplanung &amp; Organisation</a>,
385 385   <a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/Enable/Funding%20%26%20Funder%20Requirements/">Förderung &amp; Förderbedingungen</a> und <a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/Enable/Plan%20Your%20Data%20Management/">Datenmanagement planen</a>.
386 386   </div>
387 -
388 -<!-- ARSN_TRAINING_WORKSHOPS_INCLUDE_V1_START -->
389 -{{include reference="Service Navigator.Art & Research Services Navigator.Code.TrainingWorkshopsBlock" author="target" /}}
390 -<!-- ARSN_TRAINING_WORKSHOPS_INCLUDE_V1_END -->
391 -
392 -<!-- ARSN_PRACTICAL_RESOURCES_FALLBACK_V1_START -->
393 -{{include reference="Service Navigator.Art & Research Services Navigator.Code.PracticalResourcesFallbackBlock" author="target" /}}
394 -<!-- ARSN_PRACTICAL_RESOURCES_FALLBACK_V1_END -->
395 -
396 396  </div>
397 397  {{/html}}
398 398  
399 399  {{html clean="false"}}
400 -<!-- SN_SERVICE_NAVIGATOR_MASTER_STYLE_START -->
401 -
402 -<style data-sn-service-navigator-master="1">
403 -/* =========================================================
404 - MASTER TYPOGRAPHY
405 - ========================================================= */
406 -#xwikicontent h1,
407 -#xwikicontent h2,
408 -#xwikicontent h3,
409 -#xwikicontent h4,
410 -#xwikicontent h5,
411 -#xwikicontent h6,
412 -#xwikicontent .box-title,
413 -#xwikicontent [role="heading"],
414 -#xwikicontent h1 a,
415 -#xwikicontent h2 a,
416 -#xwikicontent h3 a,
417 -#xwikicontent h4 a,
418 -#xwikicontent h5 a,
419 -#xwikicontent h6 a,
420 -#xwikicontent .box-title a,
421 -#xwikicontent [role="heading"] a{
422 - text-align:left!important;
423 - text-justify:auto!important;
424 - word-spacing:normal!important;
425 -}
426 -
427 -/* =========================================================
428 - COMING SOON / IN VORBEREITUNG
429 - ========================================================= */
430 -.sn-coming-soon-badge{
431 - display:inline-block;
432 - vertical-align:middle;
433 - margin-left:10px;
434 - padding:4px 8px;
435 - border-radius:14px;
436 - border:1px solid #efd9cc;
437 - background:#fff4ee;
438 - color:#8a4d36;
439 - font-size:11px;
440 - font-weight:700;
441 - letter-spacing:.055em;
442 - line-height:1.2;
443 - white-space:nowrap;
444 -}
445 -
446 -/* =========================================================
447 - NATIVE / DETAIL CALLOUT GEOMETRY
448 - Preserve existing backgrounds.
449 - ========================================================= */
450 -#xwikicontent .arsn-info,
451 -#xwikicontent .dmp-info,
452 -#xwikicontent .ido-info,
453 -#xwikicontent .pp-info,
454 -#xwikicontent .infomessage{
455 - box-sizing:border-box!important;
456 - border-left:4px solid #21b6d7!important;
457 - border-radius:8px;
458 - text-align:left!important;
459 - word-spacing:normal!important;
460 -}
461 -
462 -#xwikicontent .arsn-warn,
463 -#xwikicontent .dmp-warn,
464 -#xwikicontent .ido-warn,
465 -#xwikicontent .pp-warn,
466 -#xwikicontent .warn,
467 -#xwikicontent .warning,
468 -#xwikicontent .warningmessage,
469 -#xwikicontent .errormessage{
470 - box-sizing:border-box!important;
471 - border-left:4px solid #e94b13!important;
472 - border-radius:8px;
473 - text-align:left!important;
474 - word-spacing:normal!important;
475 -}
476 -
477 -[data-sn-master-equal-height],
478 -[data-sn-master-first-row]{
391 +<!-- SN_HORIZONTAL_BOX_HARMONIZER_START -->
392 +<style data-sn-horizontal-box-harmonizer="4">
393 +[data-sn-equal-height-managed],
394 +[data-sn-first-section-aligned]{
479 479   box-sizing:border-box;
480 480  }
481 -
482 -/* =========================================================
483 - FULL-WIDTH THREE-LINE NUMBER / TITLE / SUBTITLE BLOCKS
484 - ========================================================= */
485 -#xwikicontent .arsn-area-label[data-sn-three-line="1"]{
486 - display:grid!important;
487 - grid-template-columns:minmax(0,1fr)!important;
488 - grid-auto-rows:auto!important;
489 - width:100%!important;
490 - max-width:none!important;
491 - box-sizing:border-box!important;
492 - justify-items:start!important;
493 - align-items:start!important;
494 - gap:2px!important;
495 - text-align:left!important;
496 - text-align-last:left!important;
497 - text-justify:auto!important;
498 - word-spacing:normal!important;
499 - white-space:normal!important;
500 -}
501 -#xwikicontent .arsn-area-label[data-sn-three-line="1"] > .arsn-area-number,
502 -#xwikicontent .arsn-area-label[data-sn-three-line="1"] > .sn-area-label-title,
503 -#xwikicontent .arsn-area-label[data-sn-three-line="1"] > .arsn-area-action{
504 - display:block!important;
505 - width:100%!important;
506 - margin:0!important;
507 - text-align:left!important;
508 - text-align-last:left!important;
509 - text-justify:auto!important;
510 - word-spacing:normal!important;
511 - white-space:normal!important;
512 -}
513 513  </style>
514 -
515 -<script data-sn-service-navigator-master="1">
398 +<script data-sn-horizontal-box-harmonizer="4">
516 516  (function(){
517 517   "use strict";
518 518  
519 - var PAGE_KIND="detail";
520 - var PLACEHOLDER=false;
521 - var PLACEHOLDER_LABEL="IN VORBEREITUNG";
522 -
523 523   var MOBILE_MAX=767;
524 524   var ROW_TOLERANCE=6;
525 - var RESIZE_DEBOUNCE=220;
404 + var MIN_W=150;
405 + var MIN_H=36;
406 + var MAX_PARENT_CHILDREN=16;
407 + var SEARCH_DEPTH=5;
526 526  
527 527   var root=
528 528   document.getElementById("xwikicontent")||
... ... @@ -532,105 +532,93 @@
532 532  
533 533   if(!root)return;
534 534  
535 - var managedHeight=new Set();
536 - var managedMargin=new Set();
537 - var originalHeight=new WeakMap();
538 - var originalMargin=new WeakMap();
417 + var heightManaged=new Set();
418 + var sectionManaged=new Set();
419 + var originalMinHeight=new WeakMap();
420 + var originalMarginTop=new WeakMap();
421 + var raf=0;
539 539  
540 - var resizeTimer=0;
541 - var running=false;
423 + function num(v){
424 + var n=parseFloat(v);
425 + return Number.isFinite(n)?n:0;
426 + }
542 542  
543 - var THEMES=[
544 - {
545 - name:"BLUE",
546 - accent:"#21b6d7",
547 - bg:"#eaf7fb",
548 - text:"#315d68",
549 - labels:[
550 - "HIER STARTEN",
551 - "ENTSCHEIDEN",
552 - "ÜBERPRÜFEN & ANPASSEN",
553 - "START HERE",
554 - "DECIDE",
555 - "REVIEW & ADAPT"
556 - ]
557 - },
558 - {
559 - name:"RED",
560 - accent:"#e94b13",
561 - bg:"#fff1ec",
562 - text:"#8a4d36",
563 - labels:[
564 - "PLANEN & ORGANISIEREN",
565 - "ORGANISIEREN & DOKUMENTIEREN",
566 - "PUBLIZIEREN & PRÄSENTIEREN",
567 - "PLAN & ORGANISE",
568 - "PLAN & ORGANIZE",
569 - "ORGANISE & DOCUMENT",
570 - "ORGANIZE & DOCUMENT",
571 - "PUBLISH & PRESENT"
572 - ]
573 - },
574 - {
575 - name:"YELLOW",
576 - accent:"#f0aa00",
577 - bg:"#fff8e7",
578 - text:"#785b17",
579 - labels:[
580 - "SCHÜTZEN & KLÄREN",
581 - "STANDARDISIEREN & IDENTIFIZIEREN",
582 - "ÖFFNEN, NACHNUTZEN & AUFFINDBAR MACHEN",
583 - "PROTECT & CLARIFY",
584 - "STANDARDISE & IDENTIFY",
585 - "STANDARDIZE & IDENTIFY",
586 - "OPEN, REUSE & MAKE FINDABLE"
587 - ]
588 - },
589 - {
590 - name:"GREEN",
591 - accent:"#38b76a",
592 - bg:"#edf9f1",
593 - text:"#3f7451",
594 - labels:[
595 - "INFRASTRUKTUR EINRICHTEN",
596 - "INFRASTRUKTUR & ZUSAMMENARBEIT EINRICHTEN",
597 - "SPEICHERN & ZUGRIFF STEUERN",
598 - "REPOSITORIUM, ERHALTEN & ÜBERGEBEN",
599 - "SET UP INFRASTRUCTURE",
600 - "SET UP INFRASTRUCTURE & COLLABORATION",
601 - "STORE & CONTROL ACCESS",
602 - "REPOSITORY, PRESERVE & HAND OVER"
603 - ]
428 + function visible(el,minW,minH){
429 + if(!el||el.nodeType!==1)return false;
430 +
431 + var s=getComputedStyle(el);
432 +
433 + if(
434 + s.display==="none"||
435 + s.visibility==="hidden"||
436 + Number(s.opacity)===0
437 + ){
438 + return false;
604 604   }
605 - ];
606 606  
607 - function num(value){
608 - var n=parseFloat(value);
609 - return Number.isFinite(n)?n:0;
441 + var r=el.getBoundingClientRect();
442 +
443 + return (
444 + r.width>=(minW||1)&&
445 + r.height>=(minH||1)
446 + );
610 610   }
611 611  
612 - function norm(value){
613 - return String(value||"")
614 - .replace(/\s+/g," ")
615 - .trim()
616 - .toUpperCase();
449 + function excluded(el){
450 + return (
451 + !el.matches||
452 + el.matches(
453 + "button,input,select,textarea,option,label,img,svg,canvas,table,thead,tbody,tfoot,tr,td,th,summary,script,style,noscript,template,.btn,.chip,[role=button]"
454 + )
455 + );
617 617   }
618 618  
619 - function visible(el){
620 - if(!el||el.nodeType!==1)return false;
458 + function namedLikeBox(el){
459 + var c=
460 + typeof el.className==="string"
461 + ? el.className
462 + : "";
621 621  
622 - var style=getComputedStyle(el);
623 - var rect=el.getBoundingClientRect();
464 + return /(^|[s_-])(box|card|tile|panel|role|check|service|source|call|area|detail|resource|topic|warn|info)([s_-]|$)/i.test(c);
465 + }
624 624  
467 + function boxLike(el){
468 + if(!visible(el,MIN_W,MIN_H)||excluded(el))return false;
469 +
470 + var s=getComputedStyle(el);
471 + var r=el.getBoundingClientRect();
472 +
473 + var border=
474 + num(s.borderTopWidth)+
475 + num(s.borderRightWidth)+
476 + num(s.borderBottomWidth)+
477 + num(s.borderLeftWidth);
478 +
479 + var radius=Math.max(
480 + num(s.borderTopLeftRadius),
481 + num(s.borderTopRightRadius),
482 + num(s.borderBottomLeftRadius),
483 + num(s.borderBottomRightRadius)
484 + );
485 +
486 + var bg=
487 + s.backgroundColor&&
488 + s.backgroundColor!=="rgba(0, 0, 0, 0)"&&
489 + s.backgroundColor!=="transparent";
490 +
491 + var shadow=
492 + s.boxShadow&&
493 + s.boxShadow!=="none";
494 +
625 625   return (
626 - style.display!=="none"&&
627 - style.visibility!=="hidden"&&
628 - rect.width>20&&
629 - rect.height>4
496 + namedLikeBox(el)||
497 + border>=1||
498 + (bg&&radius>=3)||
499 + (shadow&&r.width>=180)
630 630   );
631 631   }
632 632  
633 - function saveStyle(el,map,property){
503 + function saveOriginal(el,map,property){
634 634   if(map.has(el))return;
635 635  
636 636   map.set(el,{
... ... @@ -639,7 +639,7 @@
639 639   });
640 640   }
641 641  
642 - function restoreStyle(el,map,property){
512 + function restoreOriginal(el,map,property){
643 643   var original=map.get(el);
644 644  
645 645   if(original&&original.value){
... ... @@ -653,470 +653,247 @@
653 653   }
654 654   }
655 655  
656 - function resetRuntime(){
657 - managedHeight.forEach(function(el){
658 - restoreStyle(
526 + function reset(){
527 + heightManaged.forEach(function(el){
528 + restoreOriginal(
659 659   el,
660 - originalHeight,
530 + originalMinHeight,
661 661   "min-height"
662 662   );
533 +
663 663   el.removeAttribute(
664 - "data-sn-master-equal-height"
535 + "data-sn-equal-height-managed"
665 665   );
666 666   });
667 667  
668 - managedMargin.forEach(function(el){
669 - restoreStyle(
539 + sectionManaged.forEach(function(el){
540 + restoreOriginal(
670 670   el,
671 - originalMargin,
542 + originalMarginTop,
672 672   "margin-top"
673 673   );
545 +
674 674   el.removeAttribute(
675 - "data-sn-master-first-row"
547 + "data-sn-first-section-aligned"
676 676   );
677 677   });
678 678  
679 - managedHeight.clear();
680 - managedMargin.clear();
551 + heightManaged.clear();
552 + sectionManaged.clear();
681 681   }
682 682  
683 - function themeFor(text){
684 - var value=norm(text);
555 + function pickTarget(child){
556 + if(!visible(child,MIN_W,MIN_H))return null;
685 685  
686 - for(var i=0;i<THEMES.length;i++){
687 - for(var j=0;j<THEMES[i].labels.length;j++){
688 - var label=THEMES[i].labels[j];
689 -
690 - if(
691 - value===label||
692 - value.indexOf(label+" ")===0||
693 - value.indexOf(label+" -")===0||
694 - value.indexOf(label+" ·")===0
695 - ){
696 - return THEMES[i];
697 - }
698 - }
558 + if(boxLike(child)){
559 + return child;
699 699   }
700 700  
701 - return null;
702 - }
562 + var cr=child.getBoundingClientRect();
563 + var q=[];
703 703  
704 - /* =======================================================
705 - BORDERLESS FILLED RED/ORANGE CTA BUTTONS
706 - ======================================================= */
707 -
708 - function colourDistance(a,b){
709 - return Math.sqrt(
710 - Math.pow(a[0]-b[0],2)+
711 - Math.pow(a[1]-b[1],2)+
712 - Math.pow(a[2]-b[2],2)
713 - );
714 - }
715 -
716 - function makeFilledRedOrangeCTAsBorderless(){
717 - var RED_ORANGE=[233,75,19];
718 -
719 - Array.from(
720 - root.querySelectorAll(
721 - 'a,button,[role="button"],input[type="submit"],input[type="button"]'
722 - )
723 - ).forEach(function(el){
724 - if(!visible(el))return;
725 -
726 - var style=getComputedStyle(el);
727 - var rgb=parseRGB(style.backgroundColor);
728 -
729 - if(!rgb)return;
730 -
731 - if(
732 - colourDistance(
733 - rgb,
734 - RED_ORANGE
735 - )>55
736 - ){
737 - return;
738 - }
739 -
740 - var rect=el.getBoundingClientRect();
741 -
742 - if(
743 - rect.width<80||
744 - rect.height<24
745 - ){
746 - return;
747 - }
748 -
749 - el.style.setProperty(
750 - "border",
751 - "none",
752 - "important"
753 - );
754 -
755 - el.style.setProperty(
756 - "border-left",
757 - "none",
758 - "important"
759 - );
760 -
761 - el.style.setProperty(
762 - "border-top",
763 - "none",
764 - "important"
765 - );
766 -
767 - el.style.setProperty(
768 - "border-right",
769 - "none",
770 - "important"
771 - );
772 -
773 - el.style.setProperty(
774 - "border-bottom",
775 - "none",
776 - "important"
777 - );
778 -
779 - el.style.setProperty(
780 - "box-shadow",
781 - "none",
782 - "important"
783 - );
565 + Array.from(child.children||[]).forEach(function(el){
566 + q.push({el:el,depth:1});
784 784   });
785 - }
786 786  
787 - /* =======================================================
788 - FULL-WIDTH THREE-LINE AREA LABELS
789 - ======================================================= */
569 + var best=null;
570 + var bestScore=-Infinity;
790 790  
791 - function compactText(value){
792 - return String(value||"")
793 - .replace(/\s+/g," ")
794 - .trim();
795 - }
572 + while(q.length){
573 + var item=q.shift();
574 + var el=item.el;
796 796  
797 - function makeThreeLineAreaLabels(){
798 - Array.from(
799 - root.querySelectorAll(
800 - ".arsn-area-label"
801 - )
802 - ).forEach(function(label){
803 - if(
804 - label.getAttribute(
805 - "data-sn-three-line"
806 - )==="1"
807 - ){
808 - return;
809 - }
576 + if(!visible(el,MIN_W,MIN_H))continue;
810 810  
811 - var number=
812 - label.querySelector(
813 - ":scope > .arsn-area-number"
814 - );
578 + var r=el.getBoundingClientRect();
815 815  
816 - var action=
817 - label.querySelector(
818 - ":scope > .arsn-area-action"
819 - );
820 -
821 821   if(
822 - !number||
823 - !action
581 + r.width>=cr.width*.68&&
582 + boxLike(el)
824 824   ){
825 - return;
826 - }
584 + var widthFit=
585 + 1-Math.min(
586 + 1,
587 + Math.abs(cr.width-r.width)/
588 + Math.max(1,cr.width)
589 + );
827 827  
828 - var clone=
829 - label.cloneNode(true);
591 + var topFit=
592 + 1-Math.min(
593 + 1,
594 + Math.abs(cr.top-r.top)/100
595 + );
830 830  
831 - var cloneNumber=
832 - clone.querySelector(
833 - ":scope > .arsn-area-number"
834 - );
597 + var score=
598 + widthFit*6+
599 + topFit*3+
600 + Math.min(r.height,900)/450+
601 + Math.min(r.width*r.height,900000)/900000;
835 835  
836 - var cloneAction=
837 - clone.querySelector(
838 - ":scope > .arsn-area-action"
839 - );
840 -
841 - if(cloneNumber){
842 - cloneNumber.remove();
603 + if(score>bestScore){
604 + best=el;
605 + bestScore=score;
606 + }
843 843   }
844 844  
845 - if(cloneAction){
846 - cloneAction.remove();
609 + if(item.depth<SEARCH_DEPTH){
610 + Array.from(el.children||[]).forEach(function(next){
611 + q.push({
612 + el:next,
613 + depth:item.depth+1
614 + });
615 + });
847 847   }
617 + }
848 848  
849 - var titleText=
850 - compactText(
851 - clone.textContent
852 - );
619 + return best;
620 + }
853 853  
854 - if(!titleText){
855 - return;
856 - }
622 + function groupsByVisualRow(entries){
623 + var groups=[];
857 857  
858 - var numberNode=
859 - number.cloneNode(true);
860 -
861 - var actionNode=
862 - action.cloneNode(true);
863 -
864 - var titleNode=
865 - document.createElement(
866 - "span"
625 + entries
626 + .slice()
627 + .sort(function(a,b){
628 + return (
629 + a.rect.top-b.rect.top||
630 + a.rect.left-b.rect.left
867 867   );
632 + })
633 + .forEach(function(entry){
634 + var group=null;
868 868  
869 - titleNode.className=
870 - "sn-area-label-title";
636 + for(var i=0;i<groups.length;i++){
637 + if(
638 + Math.abs(
639 + groups[i].top-
640 + entry.rect.top
641 + )<=ROW_TOLERANCE
642 + ){
643 + group=groups[i];
644 + break;
645 + }
646 + }
871 871  
872 - titleNode.textContent=
873 - titleText;
648 + if(!group){
649 + group={
650 + top:entry.rect.top,
651 + entries:[]
652 + };
653 + groups.push(group);
654 + }
874 874  
875 - while(label.firstChild){
876 - label.removeChild(
877 - label.firstChild
878 - );
879 - }
656 + group.entries.push(entry);
657 + });
880 880  
881 - label.appendChild(
882 - numberNode
883 - );
884 -
885 - label.appendChild(
886 - titleNode
887 - );
888 -
889 - label.appendChild(
890 - actionNode
891 - );
892 -
893 - label.setAttribute(
894 - "data-sn-three-line",
895 - "1"
896 - );
897 -
898 - var head=
899 - label.closest(
900 - ".arsn-area-head"
901 - );
902 -
903 - if(head){
904 - head.style.setProperty(
905 - "width",
906 - "100%",
907 - "important"
908 - );
909 -
910 - head.style.setProperty(
911 - "max-width",
912 - "100%",
913 - "important"
914 - );
915 -
916 - head.style.setProperty(
917 - "box-sizing",
918 - "border-box",
919 - "important"
920 - );
921 - }
922 - });
659 + return groups;
923 923   }
924 924  
925 - /* =======================================================
926 - PLACEHOLDER BADGE
927 - ======================================================= */
662 + function validHorizontalGroup(group){
663 + if(group.entries.length<2)return false;
928 928  
929 - function applyPlaceholderBadge(){
930 - if(!PLACEHOLDER)return;
665 + var lefts=
666 + group.entries
667 + .map(function(e){return e.rect.left;})
668 + .sort(function(a,b){return a-b;});
931 931  
932 932   if(
933 - document.querySelector(
934 - ".sn-coming-soon-badge"
935 - )
671 + lefts[lefts.length-1]-
672 + lefts[0]<
673 + 80
936 936   ){
937 - return;
675 + return false;
938 938   }
939 939  
940 - var title=
941 - document.querySelector(
942 - "#document-title"
943 - )||
944 - document.querySelector(
945 - "h1"
946 - );
678 + var widths=
679 + group.entries
680 + .map(function(e){return e.rect.width;})
681 + .filter(function(w){return w>0;});
947 947  
948 - if(!title)return;
683 + if(widths.length<2)return false;
949 949  
950 - var badge=
951 - document.createElement(
952 - "span"
953 - );
685 + var minWidth=Math.min.apply(Math,widths);
686 + var maxWidth=Math.max.apply(Math,widths);
954 954  
955 - badge.className=
956 - "sn-coming-soon-badge";
957 -
958 - badge.textContent=
959 - PLACEHOLDER_LABEL;
960 -
961 - badge.setAttribute(
962 - "aria-label",
963 - PLACEHOLDER_LABEL
688 + return (
689 + maxWidth/
690 + Math.max(1,minWidth)<=
691 + 1.9
964 964   );
693 + }
965 965  
966 - title.appendChild(
967 - badge
968 - );
695 + function normalizeText(text){
696 + return String(text||"")
697 + .replace(/s+/g," ")
698 + .trim()
699 + .toUpperCase();
969 969   }
970 970  
971 - /* =======================================================
972 - DETAIL PAGE OWN-ACCENT PROPAGATION
973 - ======================================================= */
702 + function exactKnownFirstSection(el){
703 + var text=normalizeText(el.textContent);
974 974  
975 - function parseRGB(value){
976 - var match=String(value||"").match(
977 - /rgba?\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)/i
705 + return (
706 + text==="HIER STARTEN"||
707 + text==="ORGANISIEREN & DOKUMENTIEREN"||
708 + text==="ENTSCHEIDEN"||
709 + text==="START HERE"||
710 + text==="GET STARTED"||
711 + text==="ORGANISE & DOCUMENT"||
712 + text==="ORGANIZE & DOCUMENT"||
713 + text==="DECIDE"
978 978   );
979 -
980 - if(!match)return null;
981 -
982 - return [
983 - Number(match[1]),
984 - Number(match[2]),
985 - Number(match[3])
986 - ];
987 987   }
988 988  
989 - function distance(a,b){
990 - return Math.sqrt(
991 - Math.pow(a[0]-b[0],2)+
992 - Math.pow(a[1]-b[1],2)+
993 - Math.pow(a[2]-b[2],2)
994 - );
995 - }
717 + function visuallyFirstSectionBar(card){
718 + var cardRect=card.getBoundingClientRect();
719 + var candidates=[];
996 996  
997 - function paletteMatch(cssColor){
998 - var rgb=parseRGB(cssColor);
999 -
1000 - if(!rgb)return null;
1001 -
1002 - var palette=[
1003 - {hex:"#21b6d7",rgb:[33,182,215]},
1004 - {hex:"#e94b13",rgb:[233,75,19]},
1005 - {hex:"#f0aa00",rgb:[240,170,0]},
1006 - {hex:"#38b76a",rgb:[56,183,106]}
1007 - ];
1008 -
1009 - var best=null;
1010 - var bestDistance=Infinity;
1011 -
1012 - palette.forEach(function(item){
1013 - var d=distance(rgb,item.rgb);
1014 -
1015 - if(d<bestDistance){
1016 - best=item;
1017 - bestDistance=d;
1018 - }
1019 - });
1020 -
1021 - return bestDistance<=30
1022 - ?best
1023 - :null;
1024 - }
1025 -
1026 - function propagateDetailAccents(){
1027 - if(PAGE_KIND!=="detail")return;
1028 -
1029 1029   Array.from(
1030 - root.querySelectorAll(
1031 - ".arsn-call,.dmp-call,.ido-call,.pp-call,"+
1032 - ".arsn-source,.dmp-source,.ido-source,.pp-source"
722 + card.querySelectorAll(
723 + "div,p,span,strong,h3,h4,h5,h6"
1033 1033   )
1034 1034   ).forEach(function(el){
1035 - if(!visible(el))return;
726 + if(!visible(el,20,6))return;
727 + if(excluded(el))return;
1036 1036  
1037 - var style=getComputedStyle(el);
729 + var r=el.getBoundingClientRect();
730 + var relativeTop=r.top-cardRect.top;
1038 1038  
1039 1039   if(
1040 - num(style.borderTopWidth)>=2
733 + relativeTop<45||
734 + relativeTop>cardRect.height*.72
1041 1041   ){
1042 - var match=
1043 - paletteMatch(
1044 - style.borderTopColor
1045 - );
1046 -
1047 - if(match){
1048 - el.style.setProperty(
1049 - "border-left",
1050 - "4px solid "+match.hex,
1051 - "important"
1052 - );
1053 - }
736 + return;
1054 1054   }
1055 - });
1056 1056  
1057 - // Warning families: explicit safety override.
1058 - Array.from(
1059 - root.querySelectorAll(
1060 - ".arsn-warn,.dmp-warn,.ido-warn,.pp-warn,"+
1061 - ".warn,.warning,.warningmessage,.errormessage"
1062 - )
1063 - ).forEach(function(el){
1064 - if(!visible(el))return;
739 + var widthRatio=
740 + r.width/
741 + Math.max(1,cardRect.width);
1065 1065  
1066 - el.style.setProperty(
1067 - "border-left",
1068 - "4px solid #e94b13",
1069 - "important"
1070 - );
1071 - });
743 + if(
744 + widthRatio<.55||
745 + widthRatio>1.05||
746 + r.height>54
747 + ){
748 + return;
749 + }
1072 1072  
1073 - // Info families: explicit orientation override.
1074 - Array.from(
1075 - root.querySelectorAll(
1076 - ".arsn-info,.dmp-info,.ido-info,.pp-info,.infomessage"
1077 - )
1078 - ).forEach(function(el){
1079 - if(!visible(el))return;
751 + var text=normalizeText(el.textContent);
1080 1080  
1081 - el.style.setProperty(
1082 - "border-left",
1083 - "4px solid #21b6d7",
1084 - "important"
1085 - );
1086 - });
1087 - }
753 + if(
754 + text.length<2||
755 + text.length>90
756 + ){
757 + return;
758 + }
1088 1088  
1089 - /* =======================================================
1090 - OVERVIEW SEMANTIC THEME PALETTE
1091 - ======================================================= */
760 + var style=getComputedStyle(el);
1092 1092  
1093 - function smallestThemeHeaders(){
1094 - return Array.from(
1095 - root.querySelectorAll(
1096 - "div,span,p,strong,h3,h4,h5,h6"
1097 - )
1098 - ).filter(function(el){
1099 - if(!visible(el))return false;
1100 - if(!themeFor(el.textContent))return false;
762 + var bg=
763 + style.backgroundColor&&
764 + style.backgroundColor!=="rgba(0, 0, 0, 0)"&&
765 + style.backgroundColor!=="transparent";
1101 1101  
1102 - return !Array.from(
1103 - el.children||[]
1104 - ).some(function(child){
1105 - return !!themeFor(
1106 - child.textContent
1107 - );
1108 - });
1109 - });
1110 - }
1111 -
1112 - function findOverviewCard(header){
1113 - var node=header.parentElement;
1114 - var candidates=[];
1115 -
1116 - while(node&&node!==root){
1117 - var rect=node.getBoundingClientRect();
1118 - var style=getComputedStyle(node);
1119 -
1120 1120   var border=
1121 1121   num(style.borderTopWidth)+
1122 1122   num(style.borderRightWidth)+
... ... @@ -1123,677 +1123,315 @@
1123 1123   num(style.borderBottomWidth)+
1124 1124   num(style.borderLeftWidth);
1125 1125  
1126 - if(
1127 - rect.width>=220&&
1128 - rect.width<=800&&
1129 - rect.height>=120&&
1130 - border>=1
1131 - ){
1132 - candidates.push(node);
1133 - }
773 + var mostlyUpper=
774 + text.length>=3&&
775 + text===text.toUpperCase();
1134 1134  
1135 - node=node.parentElement;
1136 - }
777 + var exact=exactKnownFirstSection(el);
1137 1137  
1138 - if(!candidates.length)return null;
779 + var score=
780 + (exact?20:0)+
781 + (bg?6:0)+
782 + (border>=1?2:0)+
783 + (mostlyUpper?4:0)+
784 + (num(style.fontWeight)>=600?1:0);
1139 1139  
1140 - candidates.sort(function(a,b){
1141 - return (
1142 - b.getBoundingClientRect().height-
1143 - a.getBoundingClientRect().height
1144 - );
786 + if(score>=7){
787 + candidates.push({
788 + el:el,
789 + relativeTop:relativeTop,
790 + width:r.width,
791 + score:score
792 + });
793 + }
1145 1145   });
1146 1146  
1147 - return candidates[0];
1148 - }
796 + if(!candidates.length)return null;
1149 1149  
1150 - function rowCandidates(link,card){
1151 - var result=[];
1152 - var cardRect=
1153 - card.getBoundingClientRect();
1154 -
1155 - var node=link;
1156 -
1157 - while(node&&node!==card){
1158 - if(visible(node)){
1159 - var rect=
1160 - node.getBoundingClientRect();
1161 -
1162 - if(
1163 - rect.height<=105&&
1164 - rect.width>=
1165 - cardRect.width*.50&&
1166 - rect.width<=
1167 - cardRect.width*1.03
1168 - ){
1169 - result.push(node);
1170 - }
798 + candidates.sort(function(a,b){
799 + if(a.score!==b.score)return b.score-a.score;
800 + if(Math.abs(a.relativeTop-b.relativeTop)>3){
801 + return a.relativeTop-b.relativeTop;
1171 1171   }
803 + return b.width-a.width;
804 + });
1172 1172  
1173 - node=node.parentElement;
1174 - }
806 + // For exact known labels always prefer the earliest exact match.
807 + var exacts=candidates.filter(function(c){
808 + return exactKnownFirstSection(c.el);
809 + });
1175 1175  
1176 - return result;
1177 - }
1178 -
1179 - function chooseOuterRow(
1180 - candidates,
1181 - link
1182 - ){
1183 - if(!candidates.length){
1184 - return link;
811 + if(exacts.length){
812 + exacts.sort(function(a,b){
813 + return a.relativeTop-b.relativeTop||b.width-a.width;
814 + });
815 + return exacts[0].el;
1185 1185   }
1186 1186  
1187 - var bordered=
1188 - candidates.filter(function(el){
1189 - return (
1190 - num(
1191 - getComputedStyle(el)
1192 - .borderLeftWidth
1193 - )>=1
1194 - );
1195 - });
818 + // Generic fallback: earliest high-confidence bar.
819 + candidates.sort(function(a,b){
820 + return a.relativeTop-b.relativeTop||b.score-a.score||b.width-a.width;
821 + });
1196 1196  
1197 - var pool=
1198 - bordered.length
1199 - ?bordered
1200 - :candidates;
823 + return candidates[0].el;
824 + }
1201 1201  
1202 - pool.sort(function(a,b){
1203 - var ar=
1204 - a.getBoundingClientRect();
826 + function alignFirstSections(cards){
827 + var rows=
828 + cards.map(function(card){
829 + var bar=
830 + visuallyFirstSectionBar(card);
1205 1205  
1206 - var br=
1207 - b.getBoundingClientRect();
832 + if(!bar)return null;
1208 1208  
1209 - return (
1210 - ar.left-br.left||
1211 - br.width-ar.width
1212 - );
1213 - });
834 + var cardRect=
835 + card.getBoundingClientRect();
1214 1214  
1215 - return pool[0]||link;
1216 - }
837 + var barRect=
838 + bar.getBoundingClientRect();
1217 1217  
1218 - function applyOverviewPalette(){
1219 - if(PAGE_KIND!=="overview"){
1220 - return [];
840 + return {
841 + card:card,
842 + bar:bar,
843 + relativeTop:
844 + barRect.top-cardRect.top,
845 + label:
846 + normalizeText(bar.textContent)
847 + };
848 + });
849 +
850 + // Conservative: only align when every card in the horizontal row
851 + // has a reliable first section bar.
852 + if(
853 + rows.some(function(row){
854 + return !row;
855 + })
856 + ){
857 + return null;
1221 1221   }
1222 1222  
1223 - var headers=
1224 - smallestThemeHeaders()
1225 - .map(function(el){
1226 - return {
1227 - el:el,
1228 - theme:
1229 - themeFor(
1230 - el.textContent
1231 - ),
1232 - card:
1233 - findOverviewCard(
1234 - el
1235 - )
1236 - };
860 + var targetTop=
861 + Math.max.apply(
862 + Math,
863 + rows.map(function(row){
864 + return row.relativeTop;
1237 1237   })
1238 - .filter(function(row){
1239 - return !!row.card;
1240 - });
866 + );
1241 1241  
1242 - var unique=[];
1243 - var seenHeaders=new Set();
868 + rows.forEach(function(row){
869 + var delta=
870 + targetTop-
871 + row.relativeTop;
1244 1244  
1245 - headers.forEach(function(row){
1246 - var key=
1247 - row.theme.name+
1248 - "|"+
1249 - Math.round(
1250 - row.card
1251 - .getBoundingClientRect()
1252 - .left
1253 - )+
1254 - "|"+
1255 - Math.round(
1256 - row.el
1257 - .getBoundingClientRect()
1258 - .top
1259 - );
873 + if(delta<=1)return;
1260 1260  
1261 - if(!seenHeaders.has(key)){
1262 - seenHeaders.add(key);
1263 - unique.push(row);
1264 - }
1265 - });
1266 -
1267 - unique.forEach(function(row){
1268 - var headerRect=
1269 - row.el
1270 - .getBoundingClientRect();
1271 -
1272 - row.el.style.setProperty(
1273 - "background",
1274 - row.theme.bg,
1275 - "important"
875 + saveOriginal(
876 + row.bar,
877 + originalMarginTop,
878 + "margin-top"
1276 1276   );
1277 1277  
1278 - row.el.style.setProperty(
1279 - "color",
1280 - row.theme.text,
1281 - "important"
1282 - );
881 + var currentMargin=
882 + num(
883 + getComputedStyle(
884 + row.bar
885 + ).marginTop
886 + );
1283 1283  
1284 - row.el.style.setProperty(
1285 - "text-align",
1286 - "left",
1287 - "important"
888 + row.bar.style.setProperty(
889 + "margin-top",
890 + (
891 + currentMargin+
892 + delta
893 + )+"px"
1288 1288   );
1289 1289  
1290 - row.el.style.setProperty(
1291 - "word-spacing",
1292 - "normal",
1293 - "important"
896 + row.bar.setAttribute(
897 + "data-sn-first-section-aligned",
898 + "4"
1294 1294   );
1295 1295  
1296 - var later=
1297 - unique
1298 - .filter(function(other){
1299 - return (
1300 - other.card===row.card&&
1301 - other.el
1302 - .getBoundingClientRect()
1303 - .top>
1304 - headerRect.top+2
1305 - );
1306 - })
1307 - .sort(function(a,b){
1308 - return (
1309 - a.el
1310 - .getBoundingClientRect()
1311 - .top-
1312 - b.el
1313 - .getBoundingClientRect()
1314 - .top
1315 - );
1316 - });
1317 -
1318 - var stopTop=
1319 - later.length
1320 - ?later[0].el
1321 - .getBoundingClientRect()
1322 - .top
1323 - :Infinity;
1324 -
1325 - Array.from(
1326 - row.card.querySelectorAll("a")
1327 - ).forEach(function(link){
1328 - if(!visible(link))return;
1329 -
1330 - var rect=
1331 - link.getBoundingClientRect();
1332 -
1333 - if(
1334 - rect.top<=
1335 - headerRect.bottom-2||
1336 - rect.top>=
1337 - stopTop-2
1338 - ){
1339 - return;
1340 - }
1341 -
1342 - var candidates=
1343 - rowCandidates(
1344 - link,
1345 - row.card
1346 - );
1347 -
1348 - var target=
1349 - chooseOuterRow(
1350 - candidates,
1351 - link
1352 - );
1353 -
1354 - candidates.forEach(function(el){
1355 - el.style.setProperty(
1356 - "border-left",
1357 - "0 solid transparent",
1358 - "important"
1359 - );
1360 - });
1361 -
1362 - target.style.setProperty(
1363 - "border-left",
1364 - "3px solid "+
1365 - row.theme.accent,
1366 - "important"
1367 - );
1368 -
1369 - target.style.setProperty(
1370 - "box-sizing",
1371 - "border-box",
1372 - "important"
1373 - );
1374 - });
901 + sectionManaged.add(row.bar);
1375 1375   });
1376 1376  
1377 - return unique;
904 + return {
905 + labels:
906 + rows.map(function(row){
907 + return row.label;
908 + }),
909 + targetRelativeTop:
910 + Math.round(targetTop)
911 + };
1378 1378   }
1379 1379  
1380 - /* =======================================================
1381 - OVERVIEW CARD HEIGHT + FIRST THEMATIC ROW
1382 - ======================================================= */
1383 -
1384 - function alignOverviewCards(headers){
1385 - if(
1386 - PAGE_KIND!=="overview"||
1387 - window.innerWidth<=MOBILE_MAX
1388 - ){
1389 - return;
914 + function applyGroup(group){
915 + if(!validHorizontalGroup(group)){
916 + return null;
1390 1390   }
1391 1391  
1392 1392   var cards=[];
1393 1393   var seen=new Set();
1394 1394  
1395 - headers.forEach(function(row){
1396 - if(!seen.has(row.card)){
1397 - seen.add(row.card);
1398 - cards.push(row.card);
922 + group.entries.forEach(function(entry){
923 + if(!seen.has(entry.target)){
924 + seen.add(entry.target);
925 + cards.push(entry.target);
1399 1399   }
1400 1400   });
1401 1401  
1402 - if(cards.length<2){
1403 - return;
1404 - }
929 + if(cards.length<2)return null;
1405 1405  
1406 - // Group cards by actual top position.
1407 - var groups=[];
931 + var firstSection=
932 + alignFirstSections(cards);
1408 1408  
1409 - cards.forEach(function(card){
1410 - var top=
1411 - card.getBoundingClientRect().top;
934 + // The section alignment can change natural card heights.
935 + // Measure only afterwards.
936 + var maxHeight=0;
1412 1412  
1413 - var group=null;
1414 -
1415 - for(var i=0;i<groups.length;i++){
1416 - if(
1417 - Math.abs(
1418 - groups[i].top-top
1419 - )<=ROW_TOLERANCE
1420 - ){
1421 - group=groups[i];
1422 - break;
1423 - }
1424 - }
1425 -
1426 - if(!group){
1427 - group={
1428 - top:top,
1429 - cards:[]
1430 - };
1431 - groups.push(group);
1432 - }
1433 -
1434 - group.cards.push(card);
938 + cards.forEach(function(card){
939 + maxHeight=Math.max(
940 + maxHeight,
941 + card.getBoundingClientRect().height
942 + );
1435 1435   });
1436 1436  
1437 - groups.forEach(function(group){
1438 - if(group.cards.length<2){
1439 - return;
1440 - }
945 + maxHeight=Math.ceil(maxHeight);
1441 1441  
1442 - var firstHeaders=
1443 - group.cards.map(function(card){
1444 - var candidates=
1445 - headers
1446 - .filter(function(row){
1447 - return row.card===card;
1448 - })
1449 - .sort(function(a,b){
1450 - return (
1451 - a.el
1452 - .getBoundingClientRect()
1453 - .top-
1454 - b.el
1455 - .getBoundingClientRect()
1456 - .top
1457 - );
1458 - });
947 + if(maxHeight<MIN_H)return null;
1459 1459  
1460 - return candidates.length
1461 - ?candidates[0]
1462 - :null;
1463 - });
949 + cards.forEach(function(card){
950 + saveOriginal(
951 + card,
952 + originalMinHeight,
953 + "min-height"
954 + );
1464 1464  
1465 - if(
1466 - !firstHeaders.some(function(row){
1467 - return !row;
1468 - })
1469 - ){
1470 - var targetTop=
1471 - Math.max.apply(
1472 - Math,
1473 - firstHeaders.map(function(row){
1474 - return (
1475 - row.el
1476 - .getBoundingClientRect()
1477 - .top-
1478 - row.card
1479 - .getBoundingClientRect()
1480 - .top
1481 - );
1482 - })
1483 - );
956 + card.style.setProperty(
957 + "min-height",
958 + maxHeight+"px"
959 + );
1484 1484  
1485 - firstHeaders.forEach(function(row){
1486 - var relativeTop=
1487 - row.el
1488 - .getBoundingClientRect()
1489 - .top-
1490 - row.card
1491 - .getBoundingClientRect()
1492 - .top;
961 + card.setAttribute(
962 + "data-sn-equal-height-managed",
963 + "4"
964 + );
1493 1493  
1494 - var delta=
1495 - targetTop-relativeTop;
1496 -
1497 - if(delta>1){
1498 - saveStyle(
1499 - row.el,
1500 - originalMargin,
1501 - "margin-top"
1502 - );
1503 -
1504 - var current=
1505 - num(
1506 - getComputedStyle(
1507 - row.el
1508 - ).marginTop
1509 - );
1510 -
1511 - row.el.style.setProperty(
1512 - "margin-top",
1513 - (
1514 - current+delta
1515 - )+"px"
1516 - );
1517 -
1518 - row.el.setAttribute(
1519 - "data-sn-master-first-row",
1520 - "1"
1521 - );
1522 -
1523 - managedMargin.add(
1524 - row.el
1525 - );
1526 - }
1527 - });
1528 - }
1529 -
1530 - var maxHeight=0;
1531 -
1532 - group.cards.forEach(function(card){
1533 - maxHeight=
1534 - Math.max(
1535 - maxHeight,
1536 - card
1537 - .getBoundingClientRect()
1538 - .height
1539 - );
1540 - });
1541 -
1542 - maxHeight=
1543 - Math.ceil(maxHeight);
1544 -
1545 - group.cards.forEach(function(card){
1546 - saveStyle(
1547 - card,
1548 - originalHeight,
1549 - "min-height"
1550 - );
1551 -
1552 - card.style.setProperty(
1553 - "min-height",
1554 - maxHeight+"px"
1555 - );
1556 -
1557 - card.setAttribute(
1558 - "data-sn-master-equal-height",
1559 - "1"
1560 - );
1561 -
1562 - managedHeight.add(
1563 - card
1564 - );
1565 - });
966 + heightManaged.add(card);
1566 1566   });
968 +
969 + return {
970 + cards:cards.length,
971 + height:maxHeight,
972 + firstSection:firstSection
973 + };
1567 1567   }
1568 1568  
1569 - /* =======================================================
1570 - DETAIL GRID EQUAL HEIGHT, DESKTOP ONLY
1571 - ======================================================= */
976 + function run(){
977 + reset();
1572 1572  
1573 - function equaliseDetailGrids(){
1574 1574   if(
1575 - PAGE_KIND!=="detail"||
1576 1576   window.innerWidth<=MOBILE_MAX
1577 1577   ){
1578 1578   return;
1579 1579   }
1580 1580  
1581 - var selectors=[
1582 - ".arsn-grid",
1583 - ".arsn-grid-2",
1584 - ".arsn-grid-3",
1585 - ".dmp-grid",
1586 - ".ido-grid",
1587 - ".pp-grid"
1588 - ];
1589 -
1590 - selectors.forEach(function(selector){
985 + var parents=
1591 1591   Array.from(
1592 - root.querySelectorAll(selector)
1593 - ).forEach(function(grid){
1594 - var children=
1595 - Array.from(
1596 - grid.children||[]
1597 - ).filter(visible);
987 + root.querySelectorAll("*")
988 + ).filter(function(parent){
989 + return (
990 + visible(parent,MIN_W,MIN_H)&&
991 + parent.children&&
992 + parent.children.length>=2&&
993 + parent.children.length<=MAX_PARENT_CHILDREN
994 + );
995 + });
1598 1598  
1599 - if(children.length<2){
1600 - return;
1601 - }
997 + var touched=new Set();
1602 1602  
1603 - var groups=[];
999 + parents.forEach(function(parent){
1000 + var entries=[];
1604 1604  
1605 - children.forEach(function(child){
1606 - var top=
1607 - child
1608 - .getBoundingClientRect()
1609 - .top;
1002 + Array.from(parent.children).forEach(function(child){
1003 + if(!visible(child,MIN_W,MIN_H))return;
1610 1610  
1611 - var group=null;
1005 + var target=pickTarget(child);
1006 + if(!target)return;
1612 1612  
1613 - for(var i=0;i<groups.length;i++){
1614 - if(
1615 - Math.abs(
1616 - groups[i].top-top
1617 - )<=ROW_TOLERANCE
1618 - ){
1619 - group=groups[i];
1620 - break;
1621 - }
1622 - }
1623 -
1624 - if(!group){
1625 - group={
1626 - top:top,
1627 - items:[]
1628 - };
1629 - groups.push(group);
1630 - }
1631 -
1632 - group.items.push(child);
1008 + entries.push({
1009 + target:target,
1010 + rect:target.getBoundingClientRect()
1633 1633   });
1012 + });
1634 1634  
1635 - groups.forEach(function(group){
1636 - if(group.items.length<2){
1637 - return;
1638 - }
1014 + if(entries.length<2)return;
1639 1639  
1640 - var maxHeight=0;
1016 + groupsByVisualRow(entries).forEach(function(group){
1017 + if(!validHorizontalGroup(group))return;
1641 1641  
1642 - group.items.forEach(function(item){
1643 - maxHeight=
1644 - Math.max(
1645 - maxHeight,
1646 - item
1647 - .getBoundingClientRect()
1648 - .height
1649 - );
1019 + var signature=
1020 + group.entries.map(function(entry){
1021 + return entry.target;
1650 1650   });
1651 1651  
1652 - maxHeight=
1653 - Math.ceil(maxHeight);
1024 + if(
1025 + !signature.some(function(el){
1026 + return !touched.has(el);
1027 + })
1028 + ){
1029 + return;
1030 + }
1654 1654  
1655 - group.items.forEach(function(item){
1656 - saveStyle(
1657 - item,
1658 - originalHeight,
1659 - "min-height"
1660 - );
1032 + var applied=
1033 + applyGroup(group);
1661 1661  
1662 - item.style.setProperty(
1663 - "min-height",
1664 - maxHeight+"px"
1665 - );
1666 -
1667 - item.setAttribute(
1668 - "data-sn-master-equal-height",
1669 - "1"
1670 - );
1671 -
1672 - managedHeight.add(item);
1035 + if(applied){
1036 + signature.forEach(function(el){
1037 + touched.add(el);
1673 1673   });
1674 - });
1039 + }
1675 1675   });
1676 1676   });
1677 1677   }
1678 1678  
1679 - /* =======================================================
1680 - RUN / RESPONSIVE SCHEDULING
1681 - ======================================================= */
1044 + function schedule(){
1045 + if(raf)cancelAnimationFrame(raf);
1682 1682  
1683 - function run(){
1684 - if(running)return;
1685 -
1686 - running=true;
1687 -
1688 - try{
1689 - resetRuntime();
1690 - applyPlaceholderBadge();
1691 - propagateDetailAccents();
1692 -
1693 - var headers=
1694 - applyOverviewPalette();
1695 -
1696 - makeThreeLineAreaLabels();
1697 - makeFilledRedOrangeCTAsBorderless();
1698 -
1699 - if(
1700 - window.innerWidth>
1701 - MOBILE_MAX
1702 - ){
1703 - alignOverviewCards(
1704 - headers
1705 - );
1706 -
1707 - equaliseDetailGrids();
1708 - }
1709 - }finally{
1710 - running=false;
1711 - }
1047 + raf=requestAnimationFrame(function(){
1048 + raf=requestAnimationFrame(function(){
1049 + raf=0;
1050 + run();
1051 + });
1052 + });
1712 1712   }
1713 1713  
1714 - function onResize(){
1715 - if(resizeTimer){
1716 - clearTimeout(
1717 - resizeTimer
1718 - );
1719 - }
1055 + addEventListener("resize",schedule,{passive:true});
1056 + addEventListener("load",schedule,{once:true});
1720 1720  
1721 - resizeTimer=
1722 - setTimeout(
1723 - function(){
1724 - resizeTimer=0;
1725 - run();
1726 - },
1727 - RESIZE_DEBOUNCE
1728 - );
1729 - }
1058 + root.addEventListener(
1059 + "click",
1060 + function(){
1061 + setTimeout(schedule,0);
1062 + },
1063 + true
1064 + );
1730 1730  
1731 - async function waitForReady(){
1732 - if(
1733 - document.readyState!=="complete"
1734 - ){
1735 - await new Promise(function(resolve){
1736 - window.addEventListener(
1737 - "load",
1738 - resolve,
1739 - {once:true}
1740 - );
1741 - });
1066 + Array.from(root.querySelectorAll("img")).forEach(function(img){
1067 + if(!img.complete){
1068 + img.addEventListener("load",schedule,{once:true});
1742 1742   }
1070 + });
1743 1743  
1744 - if(
1745 - document.fonts&&
1746 - document.fonts.ready
1747 - ){
1748 - try{
1749 - await document.fonts.ready;
1750 - }catch(error){}
1751 - }
1752 -
1753 - var images=
1754 - Array.from(
1755 - root.querySelectorAll("img")
1756 - );
1757 -
1758 - await Promise.all(
1759 - images.map(function(img){
1760 - if(img.complete){
1761 - return Promise.resolve();
1762 - }
1763 -
1764 - return new Promise(function(resolve){
1765 - var done=function(){
1766 - resolve();
1767 - };
1768 -
1769 - img.addEventListener(
1770 - "load",
1771 - done,
1772 - {once:true}
1773 - );
1774 -
1775 - img.addEventListener(
1776 - "error",
1777 - done,
1778 - {once:true}
1779 - );
1780 - });
1781 - })
1782 - );
1783 -
1784 - run();
1072 + if(document.fonts&&document.fonts.ready){
1073 + document.fonts.ready.then(schedule);
1785 1785   }
1786 1786  
1787 - window.addEventListener(
1788 - "resize",
1789 - onResize,
1790 - {passive:true}
1791 - );
1792 -
1793 - waitForReady();
1076 + schedule();
1077 + setTimeout(schedule,200);
1078 + setTimeout(schedule,650);
1079 + setTimeout(schedule,1400);
1794 1794  })();
1795 1795  </script>
1796 -
1797 -<!-- SN_SERVICE_NAVIGATOR_MASTER_STYLE_END -->
1082 +<!-- SN_HORIZONTAL_BOX_HARMONIZER_END -->
1798 1798  {{/html}}
1799 1799