Änderungen von Dokument Get Started

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

Von Version 2.8
bearbeitet von Veronika Kocher
am Donnerstag, 03 Sep. 2026 13:04
Änderungskommentar: Es gibt keinen Kommentar für diese Version
Auf Version 2.5
bearbeitet von Veronika Kocher
am Donnerstag, 03 Sep. 2026 9:18
Änderungskommentar: Es gibt keinen Kommentar für diese Version

Zusammenfassung

Details

Seiteneigenschaften
Inhalt
... ... @@ -388,100 +388,21 @@
388 388  {{/html}}
389 389  
390 390  {{html clean="false"}}
391 -<!-- SN_SERVICE_NAVIGATOR_MASTER_STYLE_START -->
392 -
393 -<style data-sn-service-navigator-master="1">
394 -/* =========================================================
395 - MASTER TYPOGRAPHY
396 - ========================================================= */
397 -#xwikicontent h1,
398 -#xwikicontent h2,
399 -#xwikicontent h3,
400 -#xwikicontent h4,
401 -#xwikicontent h5,
402 -#xwikicontent h6,
403 -#xwikicontent .box-title,
404 -#xwikicontent [role="heading"],
405 -#xwikicontent h1 a,
406 -#xwikicontent h2 a,
407 -#xwikicontent h3 a,
408 -#xwikicontent h4 a,
409 -#xwikicontent h5 a,
410 -#xwikicontent h6 a,
411 -#xwikicontent .box-title a,
412 -#xwikicontent [role="heading"] a{
413 - text-align:left!important;
414 - text-justify:auto!important;
415 - word-spacing:normal!important;
391 +<!-- SN_HORIZONTAL_BOX_HARMONIZER_START -->
392 +<style data-sn-horizontal-box-harmonizer="1">
393 +[data-sn-equal-height-managed="1"]{box-sizing:border-box}
394 +@media(max-width:767px){
395 + [data-sn-equal-height-managed="1"]{min-height:0!important}
416 416  }
417 -
418 -/* =========================================================
419 - COMING SOON / IN VORBEREITUNG
420 - ========================================================= */
421 -.sn-coming-soon-badge{
422 - display:inline-block;
423 - vertical-align:middle;
424 - margin-left:10px;
425 - padding:4px 8px;
426 - border-radius:14px;
427 - border:1px solid #efd9cc;
428 - background:#fff4ee;
429 - color:#8a4d36;
430 - font-size:11px;
431 - font-weight:700;
432 - letter-spacing:.055em;
433 - line-height:1.2;
434 - white-space:nowrap;
435 -}
436 -
437 -/* =========================================================
438 - NATIVE / DETAIL CALLOUT GEOMETRY
439 - Preserve existing backgrounds.
440 - ========================================================= */
441 -#xwikicontent .arsn-info,
442 -#xwikicontent .dmp-info,
443 -#xwikicontent .ido-info,
444 -#xwikicontent .pp-info,
445 -#xwikicontent .infomessage{
446 - box-sizing:border-box!important;
447 - border-left:4px solid #21b6d7!important;
448 - border-radius:8px;
449 - text-align:left!important;
450 - word-spacing:normal!important;
451 -}
452 -
453 -#xwikicontent .arsn-warn,
454 -#xwikicontent .dmp-warn,
455 -#xwikicontent .ido-warn,
456 -#xwikicontent .pp-warn,
457 -#xwikicontent .warn,
458 -#xwikicontent .warning,
459 -#xwikicontent .warningmessage,
460 -#xwikicontent .errormessage{
461 - box-sizing:border-box!important;
462 - border-left:4px solid #e94b13!important;
463 - border-radius:8px;
464 - text-align:left!important;
465 - word-spacing:normal!important;
466 -}
467 -
468 -[data-sn-master-equal-height],
469 -[data-sn-master-first-row]{
470 - box-sizing:border-box;
471 -}
472 472  </style>
473 -
474 -<script data-sn-service-navigator-master="1">
398 +<script data-sn-horizontal-box-harmonizer="1">
475 475  (function(){
476 476   "use strict";
477 477  
478 - var PAGE_KIND="detail";
479 - var PLACEHOLDER=false;
480 - var PLACEHOLDER_LABEL="IN VORBEREITUNG";
481 -
482 482   var MOBILE_MAX=767;
483 - var ROW_TOLERANCE=6;
484 - var RESIZE_DEBOUNCE=220;
403 + var ROW_TOLERANCE=4;
404 + var MIN_W=150;
405 + var MIN_H=36;
485 485  
486 486   var root=
487 487   document.getElementById("xwikicontent")||
... ... @@ -491,1044 +491,212 @@
491 491  
492 492   if(!root)return;
493 493  
494 - var managedHeight=new Set();
495 - var managedMargin=new Set();
496 - var originalHeight=new WeakMap();
497 - var originalMargin=new WeakMap();
415 + var managed=new Set();
416 + var raf=0;
498 498  
499 - var resizeTimer=0;
500 - var running=false;
501 -
502 - var THEMES=[
503 - {
504 - name:"BLUE",
505 - accent:"#21b6d7",
506 - bg:"#eaf7fb",
507 - text:"#315d68",
508 - labels:[
509 - "HIER STARTEN",
510 - "ENTSCHEIDEN",
511 - "ÜBERPRÜFEN & ANPASSEN",
512 - "START HERE",
513 - "DECIDE",
514 - "REVIEW & ADAPT"
515 - ]
516 - },
517 - {
518 - name:"RED",
519 - accent:"#e94b13",
520 - bg:"#fff1ec",
521 - text:"#8a4d36",
522 - labels:[
523 - "PLANEN & ORGANISIEREN",
524 - "ORGANISIEREN & DOKUMENTIEREN",
525 - "PUBLIZIEREN & PRÄSENTIEREN",
526 - "PLAN & ORGANISE",
527 - "PLAN & ORGANIZE",
528 - "ORGANISE & DOCUMENT",
529 - "ORGANIZE & DOCUMENT",
530 - "PUBLISH & PRESENT"
531 - ]
532 - },
533 - {
534 - name:"YELLOW",
535 - accent:"#f0aa00",
536 - bg:"#fff8e7",
537 - text:"#785b17",
538 - labels:[
539 - "SCHÜTZEN & KLÄREN",
540 - "STANDARDISIEREN & IDENTIFIZIEREN",
541 - "ÖFFNEN, NACHNUTZEN & AUFFINDBAR MACHEN",
542 - "PROTECT & CLARIFY",
543 - "STANDARDISE & IDENTIFY",
544 - "STANDARDIZE & IDENTIFY",
545 - "OPEN, REUSE & MAKE FINDABLE"
546 - ]
547 - },
548 - {
549 - name:"GREEN",
550 - accent:"#38b76a",
551 - bg:"#edf9f1",
552 - text:"#3f7451",
553 - labels:[
554 - "INFRASTRUKTUR EINRICHTEN",
555 - "INFRASTRUKTUR & ZUSAMMENARBEIT EINRICHTEN",
556 - "SPEICHERN & ZUGRIFF STEUERN",
557 - "REPOSITORIUM, ERHALTEN & ÜBERGEBEN",
558 - "SET UP INFRASTRUCTURE",
559 - "SET UP INFRASTRUCTURE & COLLABORATION",
560 - "STORE & CONTROL ACCESS",
561 - "REPOSITORY, PRESERVE & HAND OVER"
562 - ]
563 - }
564 - ];
565 -
566 - function num(value){
567 - var n=parseFloat(value);
418 + function num(v){
419 + var n=parseFloat(v);
568 568   return Number.isFinite(n)?n:0;
569 569   }
570 570  
571 - function norm(value){
572 - return String(value||"")
573 - .replace(/\s+/g," ")
574 - .trim()
575 - .toUpperCase();
576 - }
577 -
578 578   function visible(el){
579 579   if(!el||el.nodeType!==1)return false;
580 -
581 - var style=getComputedStyle(el);
582 - var rect=el.getBoundingClientRect();
583 -
584 - return (
585 - style.display!=="none"&&
586 - style.visibility!=="hidden"&&
587 - rect.width>20&&
588 - rect.height>4
589 - );
425 + var s=getComputedStyle(el);
426 + if(s.display==="none"||s.visibility==="hidden"||Number(s.opacity)===0)return false;
427 + var r=el.getBoundingClientRect();
428 + return r.width>=MIN_W&&r.height>=MIN_H;
590 590   }
591 591  
592 - function saveStyle(el,map,property){
593 - if(map.has(el))return;
594 -
595 - map.set(el,{
596 - value:el.style.getPropertyValue(property),
597 - priority:el.style.getPropertyPriority(property)
598 - });
599 - }
600 -
601 - function restoreStyle(el,map,property){
602 - var original=map.get(el);
603 -
604 - if(original&&original.value){
605 - el.style.setProperty(
606 - property,
607 - original.value,
608 - original.priority||""
609 - );
610 - }else{
611 - el.style.removeProperty(property);
612 - }
613 - }
614 -
615 - function resetRuntime(){
616 - managedHeight.forEach(function(el){
617 - restoreStyle(
618 - el,
619 - originalHeight,
620 - "min-height"
621 - );
622 - el.removeAttribute(
623 - "data-sn-master-equal-height"
624 - );
625 - });
626 -
627 - managedMargin.forEach(function(el){
628 - restoreStyle(
629 - el,
630 - originalMargin,
631 - "margin-top"
632 - );
633 - el.removeAttribute(
634 - "data-sn-master-first-row"
635 - );
636 - });
637 -
638 - managedHeight.clear();
639 - managedMargin.clear();
640 - }
641 -
642 - function themeFor(text){
643 - var value=norm(text);
644 -
645 - for(var i=0;i<THEMES.length;i++){
646 - for(var j=0;j<THEMES[i].labels.length;j++){
647 - var label=THEMES[i].labels[j];
648 -
649 - if(
650 - value===label||
651 - value.indexOf(label+" ")===0||
652 - value.indexOf(label+" -")===0||
653 - value.indexOf(label+" ·")===0
654 - ){
655 - return THEMES[i];
656 - }
657 - }
658 - }
659 -
660 - return null;
661 - }
662 -
663 - /* =======================================================
664 - PLACEHOLDER BADGE
665 - ======================================================= */
666 -
667 - function applyPlaceholderBadge(){
668 - if(!PLACEHOLDER)return;
669 -
670 - if(
671 - document.querySelector(
672 - ".sn-coming-soon-badge"
673 - )
674 - ){
675 - return;
676 - }
677 -
678 - var title=
679 - document.querySelector(
680 - "#document-title"
681 - )||
682 - document.querySelector(
683 - "h1"
684 - );
685 -
686 - if(!title)return;
687 -
688 - var badge=
689 - document.createElement(
690 - "span"
691 - );
692 -
693 - badge.className=
694 - "sn-coming-soon-badge";
695 -
696 - badge.textContent=
697 - PLACEHOLDER_LABEL;
698 -
699 - badge.setAttribute(
700 - "aria-label",
701 - PLACEHOLDER_LABEL
431 + function excluded(el){
432 + return !el.matches||el.matches(
433 + "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]"
702 702   );
703 -
704 - title.appendChild(
705 - badge
706 - );
707 707   }
708 708  
709 - /* =======================================================
710 - DETAIL PAGE OWN-ACCENT PROPAGATION
711 - ======================================================= */
712 -
713 - function parseRGB(value){
714 - var match=String(value||"").match(
715 - /rgba?\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)/i
716 - );
717 -
718 - if(!match)return null;
719 -
720 - return [
721 - Number(match[1]),
722 - Number(match[2]),
723 - Number(match[3])
724 - ];
437 + function namedLikeBox(el){
438 + var c=typeof el.className==="string"?el.className:"";
439 + return /(^|[\s_-])(box|card|tile|panel|role|check|service|source|call|area|detail|resource|topic|warn|info)([\s_-]|$)/i.test(c);
725 725   }
726 726  
727 - function distance(a,b){
728 - return Math.sqrt(
729 - Math.pow(a[0]-b[0],2)+
730 - Math.pow(a[1]-b[1],2)+
731 - Math.pow(a[2]-b[2],2)
442 + function boxLike(el){
443 + if(!visible(el)||excluded(el))return false;
444 + var s=getComputedStyle(el);
445 + var r=el.getBoundingClientRect();
446 + var border=
447 + num(s.borderTopWidth)+num(s.borderRightWidth)+
448 + num(s.borderBottomWidth)+num(s.borderLeftWidth);
449 + var radius=Math.max(
450 + num(s.borderTopLeftRadius),num(s.borderTopRightRadius),
451 + num(s.borderBottomLeftRadius),num(s.borderBottomRightRadius)
732 732   );
453 + var bg=s.backgroundColor&&s.backgroundColor!=="rgba(0, 0, 0, 0)"&&s.backgroundColor!=="transparent";
454 + var shadow=s.boxShadow&&s.boxShadow!=="none";
455 + return namedLikeBox(el)||border>=1||(bg&&radius>=3)||(shadow&&r.width>=180);
733 733   }
734 734  
735 - function paletteMatch(cssColor){
736 - var rgb=parseRGB(cssColor);
458 + function pickTarget(child){
459 + if(!visible(child))return null;
460 + if(boxLike(child))return child;
737 737  
738 - if(!rgb)return null;
739 -
740 - var palette=[
741 - {hex:"#21b6d7",rgb:[33,182,215]},
742 - {hex:"#e94b13",rgb:[233,75,19]},
743 - {hex:"#f0aa00",rgb:[240,170,0]},
744 - {hex:"#38b76a",rgb:[56,183,106]}
745 - ];
746 -
747 - var best=null;
748 - var bestDistance=Infinity;
749 -
750 - palette.forEach(function(item){
751 - var d=distance(rgb,item.rgb);
752 -
753 - if(d<bestDistance){
754 - best=item;
755 - bestDistance=d;
756 - }
462 + var cr=child.getBoundingClientRect();
463 + var q=[];
464 + Array.from(child.children||[]).forEach(function(el){
465 + q.push({el:el,depth:1});
757 757   });
758 758  
759 - return bestDistance<=30
760 - ?best
761 - :null;
762 - }
468 + var best=null,bestScore=-1;
763 763  
764 - function propagateDetailAccents(){
765 - if(PAGE_KIND!=="detail")return;
470 + while(q.length){
471 + var item=q.shift();
472 + var el=item.el;
473 + if(!visible(el))continue;
766 766  
767 - Array.from(
768 - root.querySelectorAll(
769 - ".arsn-call,.dmp-call,.ido-call,.pp-call,"+
770 - ".arsn-source,.dmp-source,.ido-source,.pp-source"
771 - )
772 - ).forEach(function(el){
773 - if(!visible(el))return;
475 + var r=el.getBoundingClientRect();
774 774  
775 - var style=getComputedStyle(el);
776 -
777 - if(
778 - num(style.borderTopWidth)>=2
779 - ){
780 - var match=
781 - paletteMatch(
782 - style.borderTopColor
783 - );
784 -
785 - if(match){
786 - el.style.setProperty(
787 - "border-left",
788 - "4px solid "+match.hex,
789 - "important"
790 - );
477 + if(r.width>=cr.width*.72&&boxLike(el)){
478 + var widthFit=1-Math.min(1,Math.abs(cr.width-r.width)/Math.max(1,cr.width));
479 + var topFit=1-Math.min(1,Math.abs(cr.top-r.top)/80);
480 + var score=widthFit*5+topFit*2+Math.min(r.height,600)/600;
481 + if(score>bestScore){
482 + best=el;
483 + bestScore=score;
791 791   }
792 792   }
793 - });
794 794  
795 - // Warning families: explicit safety override.
796 - Array.from(
797 - root.querySelectorAll(
798 - ".arsn-warn,.dmp-warn,.ido-warn,.pp-warn,"+
799 - ".warn,.warning,.warningmessage,.errormessage"
800 - )
801 - ).forEach(function(el){
802 - if(!visible(el))return;
803 -
804 - el.style.setProperty(
805 - "border-left",
806 - "4px solid #e94b13",
807 - "important"
808 - );
809 - });
810 -
811 - // Info families: explicit orientation override.
812 - Array.from(
813 - root.querySelectorAll(
814 - ".arsn-info,.dmp-info,.ido-info,.pp-info,.infomessage"
815 - )
816 - ).forEach(function(el){
817 - if(!visible(el))return;
818 -
819 - el.style.setProperty(
820 - "border-left",
821 - "4px solid #21b6d7",
822 - "important"
823 - );
824 - });
825 - }
826 -
827 - /* =======================================================
828 - OVERVIEW SEMANTIC THEME PALETTE
829 - ======================================================= */
830 -
831 - function smallestThemeHeaders(){
832 - return Array.from(
833 - root.querySelectorAll(
834 - "div,span,p,strong,h3,h4,h5,h6"
835 - )
836 - ).filter(function(el){
837 - if(!visible(el))return false;
838 - if(!themeFor(el.textContent))return false;
839 -
840 - return !Array.from(
841 - el.children||[]
842 - ).some(function(child){
843 - return !!themeFor(
844 - child.textContent
845 - );
846 - });
847 - });
848 - }
849 -
850 - function findOverviewCard(header){
851 - var node=header.parentElement;
852 - var candidates=[];
853 -
854 - while(node&&node!==root){
855 - var rect=node.getBoundingClientRect();
856 - var style=getComputedStyle(node);
857 -
858 - var border=
859 - num(style.borderTopWidth)+
860 - num(style.borderRightWidth)+
861 - num(style.borderBottomWidth)+
862 - num(style.borderLeftWidth);
863 -
864 - if(
865 - rect.width>=220&&
866 - rect.width<=800&&
867 - rect.height>=120&&
868 - border>=1
869 - ){
870 - candidates.push(node);
487 + if(item.depth<3){
488 + Array.from(el.children||[]).forEach(function(next){
489 + q.push({el:next,depth:item.depth+1});
490 + });
871 871   }
872 -
873 - node=node.parentElement;
874 874   }
875 875  
876 - if(!candidates.length)return null;
877 -
878 - candidates.sort(function(a,b){
879 - return (
880 - b.getBoundingClientRect().height-
881 - a.getBoundingClientRect().height
882 - );
883 - });
884 -
885 - return candidates[0];
494 + return best;
886 886   }
887 887  
888 - function rowCandidates(link,card){
889 - var result=[];
890 - var cardRect=
891 - card.getBoundingClientRect();
892 -
893 - var node=link;
894 -
895 - while(node&&node!==card){
896 - if(visible(node)){
897 - var rect=
898 - node.getBoundingClientRect();
899 -
900 - if(
901 - rect.height<=105&&
902 - rect.width>=
903 - cardRect.width*.50&&
904 - rect.width<=
905 - cardRect.width*1.03
906 - ){
907 - result.push(node);
908 - }
909 - }
910 -
911 - node=node.parentElement;
912 - }
913 -
914 - return result;
915 - }
916 -
917 - function chooseOuterRow(
918 - candidates,
919 - link
920 - ){
921 - if(!candidates.length){
922 - return link;
923 - }
924 -
925 - var bordered=
926 - candidates.filter(function(el){
927 - return (
928 - num(
929 - getComputedStyle(el)
930 - .borderLeftWidth
931 - )>=1
932 - );
933 - });
934 -
935 - var pool=
936 - bordered.length
937 - ?bordered
938 - :candidates;
939 -
940 - pool.sort(function(a,b){
941 - var ar=
942 - a.getBoundingClientRect();
943 -
944 - var br=
945 - b.getBoundingClientRect();
946 -
947 - return (
948 - ar.left-br.left||
949 - br.width-ar.width
950 - );
497 + function reset(){
498 + managed.forEach(function(el){
499 + el.style.removeProperty("min-height");
500 + el.removeAttribute("data-sn-equal-height-managed");
951 951   });
952 -
953 - return pool[0]||link;
502 + managed.clear();
954 954   }
955 955  
956 - function applyOverviewPalette(){
957 - if(PAGE_KIND!=="overview"){
958 - return [];
505 + function horizontalLayout(parent){
506 + if(!visible(parent))return false;
507 + var s=getComputedStyle(parent);
508 + if(s.display==="grid"||s.display==="inline-grid")return true;
509 + if(s.display==="flex"||s.display==="inline-flex"){
510 + return s.flexDirection==="row"||s.flexDirection==="row-reverse";
959 959   }
960 -
961 - var headers=
962 - smallestThemeHeaders()
963 - .map(function(el){
964 - return {
965 - el:el,
966 - theme:
967 - themeFor(
968 - el.textContent
969 - ),
970 - card:
971 - findOverviewCard(
972 - el
973 - )
974 - };
975 - })
976 - .filter(function(row){
977 - return !!row.card;
978 - });
979 -
980 - var unique=[];
981 - var seenHeaders=new Set();
982 -
983 - headers.forEach(function(row){
984 - var key=
985 - row.theme.name+
986 - "|"+
987 - Math.round(
988 - row.card
989 - .getBoundingClientRect()
990 - .left
991 - )+
992 - "|"+
993 - Math.round(
994 - row.el
995 - .getBoundingClientRect()
996 - .top
997 - );
998 -
999 - if(!seenHeaders.has(key)){
1000 - seenHeaders.add(key);
1001 - unique.push(row);
1002 - }
1003 - });
1004 -
1005 - unique.forEach(function(row){
1006 - var headerRect=
1007 - row.el
1008 - .getBoundingClientRect();
1009 -
1010 - row.el.style.setProperty(
1011 - "background",
1012 - row.theme.bg,
1013 - "important"
1014 - );
1015 -
1016 - row.el.style.setProperty(
1017 - "color",
1018 - row.theme.text,
1019 - "important"
1020 - );
1021 -
1022 - row.el.style.setProperty(
1023 - "text-align",
1024 - "left",
1025 - "important"
1026 - );
1027 -
1028 - row.el.style.setProperty(
1029 - "word-spacing",
1030 - "normal",
1031 - "important"
1032 - );
1033 -
1034 - var later=
1035 - unique
1036 - .filter(function(other){
1037 - return (
1038 - other.card===row.card&&
1039 - other.el
1040 - .getBoundingClientRect()
1041 - .top>
1042 - headerRect.top+2
1043 - );
1044 - })
1045 - .sort(function(a,b){
1046 - return (
1047 - a.el
1048 - .getBoundingClientRect()
1049 - .top-
1050 - b.el
1051 - .getBoundingClientRect()
1052 - .top
1053 - );
1054 - });
1055 -
1056 - var stopTop=
1057 - later.length
1058 - ?later[0].el
1059 - .getBoundingClientRect()
1060 - .top
1061 - :Infinity;
1062 -
1063 - Array.from(
1064 - row.card.querySelectorAll("a")
1065 - ).forEach(function(link){
1066 - if(!visible(link))return;
1067 -
1068 - var rect=
1069 - link.getBoundingClientRect();
1070 -
1071 - if(
1072 - rect.top<=
1073 - headerRect.bottom-2||
1074 - rect.top>=
1075 - stopTop-2
1076 - ){
1077 - return;
1078 - }
1079 -
1080 - var candidates=
1081 - rowCandidates(
1082 - link,
1083 - row.card
1084 - );
1085 -
1086 - var target=
1087 - chooseOuterRow(
1088 - candidates,
1089 - link
1090 - );
1091 -
1092 - candidates.forEach(function(el){
1093 - el.style.setProperty(
1094 - "border-left",
1095 - "0 solid transparent",
1096 - "important"
1097 - );
1098 - });
1099 -
1100 - target.style.setProperty(
1101 - "border-left",
1102 - "3px solid "+
1103 - row.theme.accent,
1104 - "important"
1105 - );
1106 -
1107 - target.style.setProperty(
1108 - "box-sizing",
1109 - "border-box",
1110 - "important"
1111 - );
1112 - });
1113 - });
1114 -
1115 - return unique;
512 + return false;
1116 1116   }
1117 1117  
1118 - /* =======================================================
1119 - OVERVIEW CARD HEIGHT + FIRST THEMATIC ROW
1120 - ======================================================= */
1121 -
1122 - function alignOverviewCards(headers){
1123 - if(
1124 - PAGE_KIND!=="overview"||
1125 - window.innerWidth<=MOBILE_MAX
1126 - ){
1127 - return;
1128 - }
1129 -
1130 - var cards=[];
1131 - var seen=new Set();
1132 -
1133 - headers.forEach(function(row){
1134 - if(!seen.has(row.card)){
1135 - seen.add(row.card);
1136 - cards.push(row.card);
1137 - }
1138 - });
1139 -
1140 - if(cards.length<2){
1141 - return;
1142 - }
1143 -
1144 - // Group cards by actual top position.
515 + function rowGroups(entries){
1145 1145   var groups=[];
1146 -
1147 - cards.forEach(function(card){
1148 - var top=
1149 - card.getBoundingClientRect().top;
1150 -
517 + entries.slice().sort(function(a,b){
518 + return a.rect.top-b.rect.top||a.rect.left-b.rect.left;
519 + }).forEach(function(entry){
1151 1151   var group=null;
1152 -
1153 1153   for(var i=0;i<groups.length;i++){
1154 - if(
1155 - Math.abs(
1156 - groups[i].top-top
1157 - )<=ROW_TOLERANCE
1158 - ){
522 + if(Math.abs(groups[i].top-entry.rect.top)<=ROW_TOLERANCE){
1159 1159   group=groups[i];
1160 1160   break;
1161 1161   }
1162 1162   }
1163 -
1164 1164   if(!group){
1165 - group={
1166 - top:top,
1167 - cards:[]
1168 - };
528 + group={top:entry.rect.top,entries:[]};
1169 1169   groups.push(group);
1170 1170   }
1171 -
1172 - group.cards.push(card);
531 + group.entries.push(entry);
1173 1173   });
533 + return groups;
534 + }
1174 1174  
1175 - groups.forEach(function(group){
1176 - if(group.cards.length<2){
1177 - return;
1178 - }
536 + function run(){
537 + reset();
1179 1179  
1180 - var firstHeaders=
1181 - group.cards.map(function(card){
1182 - var candidates=
1183 - headers
1184 - .filter(function(row){
1185 - return row.card===card;
1186 - })
1187 - .sort(function(a,b){
1188 - return (
1189 - a.el
1190 - .getBoundingClientRect()
1191 - .top-
1192 - b.el
1193 - .getBoundingClientRect()
1194 - .top
1195 - );
1196 - });
539 + if(window.innerWidth<=MOBILE_MAX)return;
1197 1197  
1198 - return candidates.length
1199 - ?candidates[0]
1200 - :null;
1201 - });
541 + var parents=Array.from(root.querySelectorAll("*")).filter(function(el){
542 + return el.children&&el.children.length>=2&&horizontalLayout(el);
543 + });
1202 1202  
1203 - if(
1204 - !firstHeaders.some(function(row){
1205 - return !row;
1206 - })
1207 - ){
1208 - var targetTop=
1209 - Math.max.apply(
1210 - Math,
1211 - firstHeaders.map(function(row){
1212 - return (
1213 - row.el
1214 - .getBoundingClientRect()
1215 - .top-
1216 - row.card
1217 - .getBoundingClientRect()
1218 - .top
1219 - );
1220 - })
1221 - );
545 + parents.forEach(function(parent){
546 + var entries=[];
1222 1222  
1223 - firstHeaders.forEach(function(row){
1224 - var relativeTop=
1225 - row.el
1226 - .getBoundingClientRect()
1227 - .top-
1228 - row.card
1229 - .getBoundingClientRect()
1230 - .top;
1231 -
1232 - var delta=
1233 - targetTop-relativeTop;
1234 -
1235 - if(delta>1){
1236 - saveStyle(
1237 - row.el,
1238 - originalMargin,
1239 - "margin-top"
1240 - );
1241 -
1242 - var current=
1243 - num(
1244 - getComputedStyle(
1245 - row.el
1246 - ).marginTop
1247 - );
1248 -
1249 - row.el.style.setProperty(
1250 - "margin-top",
1251 - (
1252 - current+delta
1253 - )+"px"
1254 - );
1255 -
1256 - row.el.setAttribute(
1257 - "data-sn-master-first-row",
1258 - "1"
1259 - );
1260 -
1261 - managedMargin.add(
1262 - row.el
1263 - );
1264 - }
548 + Array.from(parent.children).forEach(function(child){
549 + if(!visible(child))return;
550 + var target=pickTarget(child);
551 + if(!target)return;
552 + entries.push({
553 + target:target,
554 + rect:target.getBoundingClientRect()
1265 1265   });
1266 - }
1267 -
1268 - var maxHeight=0;
1269 -
1270 - group.cards.forEach(function(card){
1271 - maxHeight=
1272 - Math.max(
1273 - maxHeight,
1274 - card
1275 - .getBoundingClientRect()
1276 - .height
1277 - );
1278 1278   });
1279 1279  
1280 - maxHeight=
1281 - Math.ceil(maxHeight);
558 + if(entries.length<2)return;
1282 1282  
1283 - group.cards.forEach(function(card){
1284 - saveStyle(
1285 - card,
1286 - originalHeight,
1287 - "min-height"
1288 - );
560 + rowGroups(entries).forEach(function(group){
561 + if(group.entries.length<2)return;
1289 1289  
1290 - card.style.setProperty(
1291 - "min-height",
1292 - maxHeight+"px"
1293 - );
563 + var lefts=group.entries.map(function(e){return e.rect.left;}).sort(function(a,b){return a-b;});
564 + if(lefts[lefts.length-1]-lefts[0]<80)return;
1294 1294  
1295 - card.setAttribute(
1296 - "data-sn-master-equal-height",
1297 - "1"
1298 - );
566 + var targets=[];
567 + var seen=new Set();
1299 1299  
1300 - managedHeight.add(
1301 - card
1302 - );
1303 - });
1304 - });
1305 - }
1306 -
1307 - /* =======================================================
1308 - DETAIL GRID EQUAL HEIGHT, DESKTOP ONLY
1309 - ======================================================= */
1310 -
1311 - function equaliseDetailGrids(){
1312 - if(
1313 - PAGE_KIND!=="detail"||
1314 - window.innerWidth<=MOBILE_MAX
1315 - ){
1316 - return;
1317 - }
1318 -
1319 - var selectors=[
1320 - ".arsn-grid",
1321 - ".arsn-grid-2",
1322 - ".arsn-grid-3",
1323 - ".dmp-grid",
1324 - ".ido-grid",
1325 - ".pp-grid"
1326 - ];
1327 -
1328 - selectors.forEach(function(selector){
1329 - Array.from(
1330 - root.querySelectorAll(selector)
1331 - ).forEach(function(grid){
1332 - var children=
1333 - Array.from(
1334 - grid.children||[]
1335 - ).filter(visible);
1336 -
1337 - if(children.length<2){
1338 - return;
1339 - }
1340 -
1341 - var groups=[];
1342 -
1343 - children.forEach(function(child){
1344 - var top=
1345 - child
1346 - .getBoundingClientRect()
1347 - .top;
1348 -
1349 - var group=null;
1350 -
1351 - for(var i=0;i<groups.length;i++){
1352 - if(
1353 - Math.abs(
1354 - groups[i].top-top
1355 - )<=ROW_TOLERANCE
1356 - ){
1357 - group=groups[i];
1358 - break;
1359 - }
569 + group.entries.forEach(function(e){
570 + if(!seen.has(e.target)){
571 + seen.add(e.target);
572 + targets.push(e.target);
1360 1360   }
574 + });
1361 1361  
1362 - if(!group){
1363 - group={
1364 - top:top,
1365 - items:[]
1366 - };
1367 - groups.push(group);
1368 - }
576 + if(targets.length<2)return;
1369 1369  
1370 - group.items.push(child);
578 + var max=0;
579 + targets.forEach(function(el){
580 + max=Math.max(max,el.getBoundingClientRect().height);
1371 1371   });
1372 1372  
1373 - groups.forEach(function(group){
1374 - if(group.items.length<2){
1375 - return;
1376 - }
583 + max=Math.ceil(max);
584 + if(max<MIN_H)return;
1377 1377  
1378 - var maxHeight=0;
1379 -
1380 - group.items.forEach(function(item){
1381 - maxHeight=
1382 - Math.max(
1383 - maxHeight,
1384 - item
1385 - .getBoundingClientRect()
1386 - .height
1387 - );
1388 - });
1389 -
1390 - maxHeight=
1391 - Math.ceil(maxHeight);
1392 -
1393 - group.items.forEach(function(item){
1394 - saveStyle(
1395 - item,
1396 - originalHeight,
1397 - "min-height"
1398 - );
1399 -
1400 - item.style.setProperty(
1401 - "min-height",
1402 - maxHeight+"px"
1403 - );
1404 -
1405 - item.setAttribute(
1406 - "data-sn-master-equal-height",
1407 - "1"
1408 - );
1409 -
1410 - managedHeight.add(item);
1411 - });
586 + targets.forEach(function(el){
587 + el.style.setProperty("min-height",max+"px");
588 + el.setAttribute("data-sn-equal-height-managed","1");
589 + managed.add(el);
1412 1412   });
1413 1413   });
1414 1414   });
1415 1415   }
1416 1416  
1417 - /* =======================================================
1418 - RUN / RESPONSIVE SCHEDULING
1419 - ======================================================= */
1420 -
1421 - function run(){
1422 - if(running)return;
1423 -
1424 - running=true;
1425 -
1426 - try{
1427 - resetRuntime();
1428 - applyPlaceholderBadge();
1429 - propagateDetailAccents();
1430 -
1431 - var headers=
1432 - applyOverviewPalette();
1433 -
1434 - if(
1435 - window.innerWidth>
1436 - MOBILE_MAX
1437 - ){
1438 - alignOverviewCards(
1439 - headers
1440 - );
1441 -
1442 - equaliseDetailGrids();
1443 - }
1444 - }finally{
1445 - running=false;
1446 - }
595 + function schedule(){
596 + if(raf)cancelAnimationFrame(raf);
597 + raf=requestAnimationFrame(function(){
598 + raf=requestAnimationFrame(function(){
599 + raf=0;
600 + run();
601 + });
602 + });
1447 1447   }
1448 1448  
1449 - function onResize(){
1450 - if(resizeTimer){
1451 - clearTimeout(
1452 - resizeTimer
1453 - );
1454 - }
605 + addEventListener("resize",schedule,{passive:true});
606 + addEventListener("load",schedule,{once:true});
1455 1455  
1456 - resizeTimer=
1457 - setTimeout(
1458 - function(){
1459 - resizeTimer=0;
1460 - run();
1461 - },
1462 - RESIZE_DEBOUNCE
1463 - );
1464 - }
608 + root.addEventListener("click",function(){
609 + setTimeout(schedule,0);
610 + },true);
1465 1465  
1466 - async function waitForReady(){
1467 - if(
1468 - document.readyState!=="complete"
1469 - ){
1470 - await new Promise(function(resolve){
1471 - window.addEventListener(
1472 - "load",
1473 - resolve,
1474 - {once:true}
1475 - );
1476 - });
1477 - }
1478 -
1479 - if(
1480 - document.fonts&&
1481 - document.fonts.ready
1482 - ){
1483 - try{
1484 - await document.fonts.ready;
1485 - }catch(error){}
1486 - }
1487 -
1488 - var images=
1489 - Array.from(
1490 - root.querySelectorAll("img")
1491 - );
1492 -
1493 - await Promise.all(
1494 - images.map(function(img){
1495 - if(img.complete){
1496 - return Promise.resolve();
1497 - }
1498 -
1499 - return new Promise(function(resolve){
1500 - var done=function(){
1501 - resolve();
1502 - };
1503 -
1504 - img.addEventListener(
1505 - "load",
1506 - done,
1507 - {once:true}
1508 - );
1509 -
1510 - img.addEventListener(
1511 - "error",
1512 - done,
1513 - {once:true}
1514 - );
1515 - });
1516 - })
1517 - );
1518 -
1519 - run();
612 + if(document.fonts&&document.fonts.ready){
613 + document.fonts.ready.then(schedule);
1520 1520   }
1521 1521  
1522 - window.addEventListener(
1523 - "resize",
1524 - onResize,
1525 - {passive:true}
1526 - );
1527 -
1528 - waitForReady();
616 + schedule();
617 + setTimeout(schedule,250);
618 + setTimeout(schedule,900);
1529 1529  })();
1530 1530  </script>
1531 -
1532 -<!-- SN_SERVICE_NAVIGATOR_MASTER_STYLE_END -->
621 +<!-- SN_HORIZONTAL_BOX_HARMONIZER_END -->
1533 1533  {{/html}}
1534 1534