1
XA.component.observer=function(n){function u(){typeof Sitecore!="undefined"&&!i&&r.hasClass("on-page-editor")&&(Sitecore.PageModes.ChromeManager.chromesReseted.observe(function(){XA.init()}
2
),i=!0)}
3
var t={}
4
,i=!1,r=n("body");return t.init=function(){u()}
5
,t}
6
(jQuery);XA.register("observer",XA.component.observer);XA.component.partialDesignHighlight=function(n){var t={}
7
,i=!1;return t.init=function(){var u,t,r;if(!Object.prototype.hasOwnProperty.call(window,"Sitecore"))return!1;if(n(".on-page-editor").length>0&&!i){i=!0;u=Sitecore.PageModes.HoverFrame.extend({horizontalSideClassName:function(){return this.base()+" scHilghlightedChrome boldHighlight sxaFrame"}
8
,verticalSideClassName:function(){return this.base()+" scHilghlightedChrome boldHighlight sxaFrame"}
9
,dispose:function(){this.sides&&$sc.each(this.sides,function(){this.remove()}
10
);this.sides=null}
11
,show:function(n){this.base(n);this.top.css("left",this.top.position().left-2+"px").css("width",this.top.width()+4+"px");this.bottom.css("left",this.bottom.position().left-2+"px").css("width",this.bottom.width()+4+"px");this.topRightCorner.css("left",this.topRightCorner.position().left+2+"px");this.bottomRightCorner.css("top",this.bottomRightCorner.position().top+3+"px");this.bottomLeftCorner.css("top",this.bottomLeftCorner.position().top+3+"px");this.left.css("height",this.left.height()+7+"px").css("top",this.left.position().top-2+"px");this.right.css("height",this.right.height()+7+"px").css("left",this.right.position().left-1+"px").css("top",this.right.position().top-2+"px");this.bottom.position().top-this.top.position().top<7&&this.bottom.css("top",this.top.position().top+7+"px")}
12
}
13
);t=function(n){var r,i,t;if(n)for(r=Sitecore.PageModes.ChromeManager.chromes(),i=0;i<r.length;i++)t=r[i],t.data!==undefined&&t.data.custom!==undefined&&n===t.data.custom.sxaSource&&(t._highlight!==undefined&&t._highlight.hide(),t._highlight=new u,t._highlight.show(t))}
14
;r=function(){for(var i=Sitecore.PageModes.ChromeManager.chromes(),t=0;t<i.length;t++)i[t].hideHighlight();n(".sxaFrame").remove()}
15
;n(".on-page-editor").on("mouseover","table[data-zgtype=snippets] tr",function(){t(n(this).attr("id"))}
16
);n(".on-page-editor").on("mouseout","table[data-zgtype=snippets] tr",r);n(".on-page-editor").on("mouseenter",".sc_DropDownItemLink",function(){var i=n(this).data("sc-sxa-item-id");i.length&&(i=i.substring(i.indexOf("{")+1,i.indexOf("}
17
")),i&&t("L"+i.replace(/-/g,"")))}
18
);n(".on-page-editor").on("mouseleave",".sc_DropDownItemLink",function(){n(this).data("sc-sxa-item-id").length>0&&r()}
19
)}
20
}
21
,t}
22
(jQuery,_,document);XA.register("partialDesignHighlight",XA.component.partialDesignHighlight)