define("abc3361f-bb2d-491f-aba3-cd51c19a299b_1.1.2",["@microsoft/decorators","@microsoft/sp-application-base","MegaMenuApplicationCustomizerStrings","@microsoft/sp-http","@microsoft/sp-lodash-subset"],function(e,t,n,r,o){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=5)}([function(e,t,n){"use strict";function r(e,t,n){for(var r=[],o=3;o=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function i(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}u((r=r.apply(e,t||[])).next())})}function a(e,t){function n(e){return function(t){return r([e,t])}}function r(n){if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,i&&(a=2&n[0]?i.return:n[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,n[1])).done)return a;switch(i=0,a&&(n=[2&n[0],a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,i=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]-1?e.substr(0,t):e}function u(e){var t=[],n=["odata.type","odata.editLink","__metadata","odata.metadata"];return Object(y.j)(e,n[0])&&"SP.Web"===e[n[0]]?Object(y.j)(e,n[1])?t.push(e[n[1]]):Object(y.j)(e,n[2])&&t.push(e.__metadata.uri):Object(y.j)(e,n[3])&&Object(y.j)(e,n[1])?t.push(s(e[n[3]]),"_api",e[n[1]]):Object(y.j)(e,n[1])?t.push("_api",e[n[1]]):Object(y.j)(e,n[2])&&t.push(e.__metadata.uri),t.length<1?(b.a.write("No uri information found in ODataEntity parsing, chaining will fail for this object.",2),""):y.d.apply(void 0,t)}function c(e){return new O(e)}function l(e){y.c.extend(e)}function p(e){return new Promise(function(t){if(Object(y.m)(e))return t(e);if(null!==C.baseUrl)return t(Object(y.d)(C.baseUrl,e));if(void 0!==N._spPageContextInfo){if(Object(y.j)(N._spPageContextInfo,"webAbsoluteUrl"))return t(Object(y.d)(N._spPageContextInfo.webAbsoluteUrl,e));if(Object(y.j)(N._spPageContextInfo,"webServerRelativeUrl"))return t(Object(y.d)(N._spPageContextInfo.webServerRelativeUrl,e))}if(void 0!==N.location){var n=N.location.toString().toLowerCase();["/_layouts/","/siteassets/"].forEach(function(r){var o=n.indexOf(r);if(o>0)return t(Object(y.d)(n.substr(0,o),e))})}return t(e)})}function d(e){return{__metadata:{type:e}}}function h(e){return function(t){return function(t){function n(){for(var n=[],r=0;r1&&void 0!==n[1]?n[1]:e)||this}return r(n,t),n}(t)}}function f(e){return e.length<1?1:Math.max.apply(null,e.map(function(e){return e.order}))+1}function g(e){for(var t=0;tt.lastIndexOf("(")){var o=t.lastIndexOf("/");r._parentUrl=t.slice(0,o),n=Object(y.d)(t.slice(o),n),r._url=Object(y.d)(r._parentUrl,n)}else{var o=t.lastIndexOf("(");r._parentUrl=t.slice(0,o),r._url=Object(y.d)(t,n)}else{r.extend(t,n);var i=t.query.get("@target");void 0!==i&&r.query.set("@target",i)}return r}return r(t,e),t.prototype.as=function(e){var t=new e(this._url,null);return Object(y.f)(t,this,!0)},t.prototype.toUrlAndQuery=function(){var e=new Map(this.query),t=this.toUrl().replace(/'!(@.*?)::(.*?)'/gi,function(t,n,r){return b.a.write("Rewriting aliased parameter from match "+t+" to label: "+n+" value: "+r,0),e.set(n,"'"+r+"'"),n});if(e.size>0){t+=""+(t.indexOf("?")>-1?"&":"?")+Array.from(e).map(function(e){return e[0]+"="+e[1]}).join("&")}return t},t.prototype.select=function(){for(var e=[],t=0;t0&&this.query.set("$select",e.join(",")),this},t.prototype.expand=function(){for(var e=[],t=0;t0&&this.query.set("$expand",e.join(",")),this},t.prototype.getParent=function(e,t,n,r){void 0===t&&(t=this.parentUrl);var o=new e(t,n).configureFrom(this),i="@target";return this.query.has(i)&&o.query.set(i,this.query.get(i)),void 0!==r&&(o=o.inBatch(r)),o},t.prototype.clone=function(t,n,r){void 0===r&&(r=!0);var o=e.prototype._clone.call(this,new t(this,n),{includeBatch:r}),i="@target";return this.query.has(i)&&o.query.set(i,this.query.get(i)),o},t.prototype.toRequestContext=function(e,t,n,r){var o=this;void 0===t&&(t={});var i=this.hasBatch?this._batchDependency:function(){};return p(this.toUrlAndQuery()).then(function(a){return Object(y.p)(t,o._options),{batch:o.batch,batchDependency:i,cachingOptions:o._cachingOptions,clientFactory:function(){return new E},isBatched:o.hasBatch,isCached:o._forceCaching||o._useCaching&&/^get$/i.test(e),options:t,parser:n,pipeline:r,requestAbsoluteUrl:a,requestId:Object(y.h)(),verb:e}})},t}(v.h),j=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.filter=function(e){return this.query.set("$filter",e),this},t.prototype.orderBy=function(e,t){void 0===t&&(t=!0);var n="$orderby",r=this.query.has(n)?this.query.get(n).split(","):[];return r.push(e+" "+(t?"asc":"desc")),this.query.set(n,r.join(",")),this},t.prototype.skip=function(e){return this.query.set("$skip",e.toString()),this},t.prototype.top=function(e){return this.query.set("$top",e.toString()),this},t}(x),R=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype._update=function(e,t){var n=this;return function(r){return n.postCore({body:Object(y.n)(Object(y.f)(d(e),r)),headers:{"X-HTTP-Method":"MERGE"}}).then(function(e){return t(e,r)})}},t.prototype._delete=function(){return this.postCore({headers:{"X-HTTP-Method":"DELETE"}})},t.prototype._deleteWithETag=function(e){return void 0===e&&(e="*"),this.postCore({headers:{"IF-Match":e,"X-HTTP-Method":"DELETE"}})},t}(x),A=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}r(t,e),n=t,t.prototype.getById=function(e){return new k(this,"getById("+e+")")},t.prototype.getByEmail=function(e){return new k(this,"getByEmail('"+e+"')")},t.prototype.getByLoginName=function(e){var t=new k(this);return t.concat("('!@v::"+encodeURIComponent(e)+"')"),t},t.prototype.removeById=function(e){return this.clone(n,"removeById("+e+")").postCore()},t.prototype.removeByLoginName=function(e){var t=this.clone(n,"removeByLoginName(@v)");return t.query.set("@v","'"+encodeURIComponent(e)+"'"),t.postCore()},t.prototype.add=function(e){var t=this;return this.clone(n,null).postCore({body:Object(y.n)(Object(y.f)(d("SP.User"),{LoginName:e}))}).then(function(){return t.getByLoginName(e)})};var n;return t=n=o([h("siteusers")],t)}(j),U=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),Object.defineProperty(t.prototype,"groups",{get:function(){return new M(this,"groups")},enumerable:!0,configurable:!0}),t}(R),k=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.update=t._update("SP.User",function(e){return{data:e,user:t}}),t.delete=t._delete,t}return r(t,e),t}(U),L=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t=o([h("currentuser")],t)}(U);!function(e){e[e.None=0]="None",e[e.User=1]="User",e[e.DistributionList=2]="DistributionList",e[e.SecurityGroup=4]="SecurityGroup",e[e.SharePointGroup=8]="SharePointGroup",e[e.All=15]="All"}(m||(m={}));var D,M=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}r(t,e),n=t,t.prototype.getById=function(e){var t=new F(this);return t.concat("("+e+")"),t},t.prototype.add=function(e){var t=this,n=Object(y.n)(Object(y.f)(d("SP.Group"),e));return this.postCore({body:n}).then(function(e){return{data:e,group:t.getById(e.Id)}})},t.prototype.getByName=function(e){return new F(this,"getByName('"+e+"')")},t.prototype.removeById=function(e){return this.clone(n,"removeById('"+e+"')").postCore()},t.prototype.removeByLoginName=function(e){return this.clone(n,"removeByLoginName('"+e+"')").postCore()};var n;return t=n=o([h("sitegroups")],t)}(j),F=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.update=n._update("SP.Group",function(e,r){var o=n;return Object(y.j)(r,"Title")&&(o=n.getParent(t,n.parentUrl,"getByName('"+r.Title+"')")),{data:e,group:o}}),n}return r(t,e),Object.defineProperty(t.prototype,"users",{get:function(){return new A(this,"users")},enumerable:!0,configurable:!0}),t.prototype.setUserAsOwner=function(e){return i(this,void 0,void 0,function(){return a(this,function(n){return[2,this.clone(t,"SetUserAsOwner("+e+")").postCore()]})})},t}(R),B=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}r(t,e),n=t,t.prototype.getById=function(e){var t=new G(this);return t.concat("("+e+")"),t},t.prototype.add=function(e,t){return this.clone(n,"addroleassignment(principalid="+e+", roledefid="+t+")").postCore()},t.prototype.remove=function(e,t){return this.clone(n,"removeroleassignment(principalid="+e+", roledefid="+t+")").postCore()};var n;return t=n=o([h("roleassignments")],t)}(j),G=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.delete=t._delete,t}return r(t,e),Object.defineProperty(t.prototype,"groups",{get:function(){return new M(this,"groups")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bindings",{get:function(){return new W(this)},enumerable:!0,configurable:!0}),t}(R),q=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.getById=function(e){return new H(this,"getById("+e+")")},t.prototype.getByName=function(e){return new H(this,"getbyname('"+e+"')")},t.prototype.getByType=function(e){return new H(this,"getbytype("+e+")")},t.prototype.add=function(e,t,n,r){var o=this,i=Object(y.n)({BasePermissions:{High:r.High.toString(),Low:r.Low.toString()},Description:t,Name:e,Order:n,__metadata:{type:"SP.RoleDefinition"}});return this.postCore({body:i}).then(function(e){return{data:e,definition:o.getById(e.Id)}})},t=o([h("roledefinitions")],t)}(j),H=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.delete=t._delete,t}return r(t,e),t.prototype.update=function(e){var t=this;void 0!==Object(y.j)(e,"BasePermissions")&&(e.BasePermissions=Object(y.f)({__metadata:{type:"SP.BasePermissions"}},{High:e.BasePermissions.High.toString(),Low:e.BasePermissions.Low.toString()}));var n=Object(y.n)(Object(y.f)(d("SP.RoleDefinition"),e));return this.postCore({body:n,headers:{"X-HTTP-Method":"MERGE"}}).then(function(n){var r=t;if(Object(y.j)(e,"Name")){r=t.getParent(q,t.parentUrl,"").getByName(e.Name)}return{data:n,definition:r}})},t}(R),W=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t=o([h("roledefinitionbindings")],t)}(j);!function(e){e[e.Display=1]="Display",e[e.Edit=2]="Edit",e[e.New=3]="New"}(D||(D={}));var K;!function(e){e[e.Invalid=0]="Invalid",e[e.Integer=1]="Integer",e[e.Text=2]="Text",e[e.Note=3]="Note",e[e.DateTime=4]="DateTime",e[e.Counter=5]="Counter",e[e.Choice=6]="Choice",e[e.Lookup=7]="Lookup",e[e.Boolean=8]="Boolean",e[e.Number=9]="Number",e[e.Currency=10]="Currency",e[e.URL=11]="URL",e[e.Computed=12]="Computed",e[e.Threading=13]="Threading",e[e.Guid=14]="Guid",e[e.MultiChoice=15]="MultiChoice",e[e.GridChoice=16]="GridChoice",e[e.Calculated=17]="Calculated",e[e.File=18]="File",e[e.Attachments=19]="Attachments",e[e.User=20]="User",e[e.Recurrence=21]="Recurrence",e[e.CrossProjectLink=22]="CrossProjectLink",e[e.ModStat=23]="ModStat",e[e.Error=24]="Error",e[e.ContentTypeId=25]="ContentTypeId",e[e.PageSeparator=26]="PageSeparator",e[e.ThreadIndex=27]="ThreadIndex",e[e.WorkflowStatus=28]="WorkflowStatus",e[e.AllDayEvent=29]="AllDayEvent",e[e.WorkflowEventType=30]="WorkflowEventType"}(K||(K={}));var V;!function(e){e[e.DateOnly=0]="DateOnly",e[e.DateTime=1]="DateTime"}(V||(V={}));var Q;!function(e){e[e.Unspecified=0]="Unspecified",e[e.Disabled=1]="Disabled",e[e.Relative=2]="Relative"}(Q||(Q={}));var z;!function(e){e[e.DefaultValue=0]="DefaultValue",e[e.AddToDefaultContentType=1]="AddToDefaultContentType",e[e.AddToNoContentType=2]="AddToNoContentType",e[e.AddToAllContentTypes=4]="AddToAllContentTypes",e[e.AddFieldInternalNameHint=8]="AddFieldInternalNameHint",e[e.AddFieldToDefaultView=16]="AddFieldToDefaultView",e[e.AddFieldCheckDisplayName=32]="AddFieldCheckDisplayName"}(z||(z={}));var J;!function(e){e[e.Gregorian=1]="Gregorian",e[e.Japan=3]="Japan",e[e.Taiwan=4]="Taiwan",e[e.Korea=5]="Korea",e[e.Hijri=6]="Hijri",e[e.Thai=7]="Thai",e[e.Hebrew=8]="Hebrew",e[e.GregorianMEFrench=9]="GregorianMEFrench",e[e.GregorianArabic=10]="GregorianArabic",e[e.GregorianXLITEnglish=11]="GregorianXLITEnglish",e[e.GregorianXLITFrench=12]="GregorianXLITFrench",e[e.KoreaJapanLunar=14]="KoreaJapanLunar",e[e.ChineseLunar=15]="ChineseLunar",e[e.SakaEra=16]="SakaEra",e[e.UmAlQura=23]="UmAlQura"}(J||(J={}));var X;!function(e){e[e.Hyperlink=0]="Hyperlink",e[e.Image=1]="Image"}(X||(X={}));var Y;!function(e){e[e.EmptyMask=0]="EmptyMask",e[e.ViewListItems=1]="ViewListItems",e[e.AddListItems=2]="AddListItems",e[e.EditListItems=3]="EditListItems",e[e.DeleteListItems=4]="DeleteListItems",e[e.ApproveItems=5]="ApproveItems",e[e.OpenItems=6]="OpenItems",e[e.ViewVersions=7]="ViewVersions",e[e.DeleteVersions=8]="DeleteVersions",e[e.CancelCheckout=9]="CancelCheckout",e[e.ManagePersonalViews=10]="ManagePersonalViews",e[e.ManageLists=12]="ManageLists",e[e.ViewFormPages=13]="ViewFormPages",e[e.AnonymousSearchAccessList=14]="AnonymousSearchAccessList",e[e.Open=17]="Open",e[e.ViewPages=18]="ViewPages",e[e.AddAndCustomizePages=19]="AddAndCustomizePages",e[e.ApplyThemeAndBorder=20]="ApplyThemeAndBorder",e[e.ApplyStyleSheets=21]="ApplyStyleSheets",e[e.ViewUsageData=22]="ViewUsageData",e[e.CreateSSCSite=23]="CreateSSCSite",e[e.ManageSubwebs=24]="ManageSubwebs",e[e.CreateGroups=25]="CreateGroups",e[e.ManagePermissions=26]="ManagePermissions",e[e.BrowseDirectories=27]="BrowseDirectories",e[e.BrowseUserInfo=28]="BrowseUserInfo",e[e.AddDelPrivateWebParts=29]="AddDelPrivateWebParts",e[e.UpdatePersonalWebParts=30]="UpdatePersonalWebParts",e[e.ManageWeb=31]="ManageWeb",e[e.AnonymousSearchAccessWebLists=32]="AnonymousSearchAccessWebLists",e[e.UseClientIntegration=37]="UseClientIntegration",e[e.UseRemoteAPIs=38]="UseRemoteAPIs",e[e.ManageAlerts=39]="ManageAlerts",e[e.CreateAlerts=40]="CreateAlerts",e[e.EditMyUserInfo=41]="EditMyUserInfo",e[e.EnumeratePermissions=63]="EnumeratePermissions",e[e.FullMask=65]="FullMask"}(Y||(Y={}));var $;!function(e){e[e.None=0]="None",e[e.User=1]="User",e[e.DistributionList=2]="DistributionList",e[e.SecurityGroup=4]="SecurityGroup",e[e.SharePointGroup=8]="SharePointGroup",e[e.All=15]="All"}($||($={}));var Z;!function(e){e[e.None=0]="None",e[e.UserInfoList=1]="UserInfoList",e[e.Windows=2]="Windows",e[e.MembershipProvider=4]="MembershipProvider",e[e.RoleProvider=8]="RoleProvider",e[e.All=15]="All"}(Z||(Z={}));var ee;!function(e){e[e.None=0]="None",e[e.Guest=1]="Guest",e[e.Reader=2]="Reader",e[e.Contributor=3]="Contributor",e[e.WebDesigner=4]="WebDesigner",e[e.Administrator=5]="Administrator"}(ee||(ee={}));var te;!function(e){e[e.Invalid=-1]="Invalid",e[e.DefaultView=0]="DefaultView",e[e.NormalView=1]="NormalView",e[e.DialogView=2]="DialogView",e[e.View=3]="View",e[e.DisplayForm=4]="DisplayForm",e[e.DisplayFormDialog=5]="DisplayFormDialog",e[e.EditForm=6]="EditForm",e[e.EditFormDialog=7]="EditFormDialog",e[e.NewForm=8]="NewForm",e[e.NewFormDialog=9]="NewFormDialog",e[e.SolutionForm=10]="SolutionForm",e[e.PAGE_MAXITEMS=11]="PAGE_MAXITEMS"}(te||(te={}));var ne;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Direct=1]="Direct",e[e.OrganizationView=2]="OrganizationView",e[e.OrganizationEdit=3]="OrganizationEdit",e[e.AnonymousView=4]="AnonymousView",e[e.AnonymousEdit=5]="AnonymousEdit",e[e.Flexible=6]="Flexible"}(ne||(ne={}));var re;!function(e){e[e.None=0]="None",e[e.View=1]="View",e[e.Edit=2]="Edit",e[e.Owner=3]="Owner"}(re||(re={}));var oe;!function(e){e[e.CompletedSuccessfully=0]="CompletedSuccessfully",e[e.AccessRequestsQueued=1]="AccessRequestsQueued",e[e.NoResolvedUsers=-1]="NoResolvedUsers",e[e.AccessDenied=-2]="AccessDenied",e[e.CrossSiteRequestNotSupported=-3]="CrossSiteRequestNotSupported",e[e.UnknowError=-4]="UnknowError",e[e.EmailBodyTooLong=-5]="EmailBodyTooLong",e[e.ListUniqueScopesExceeded=-6]="ListUniqueScopesExceeded",e[e.CapabilityDisabled=-7]="CapabilityDisabled",e[e.ObjectNotSupported=-8]="ObjectNotSupported",e[e.NestedGroupsNotSupported=-9]="NestedGroupsNotSupported"}(oe||(oe={}));var ie;!function(e){e[e.Unknown=0]="Unknown",e[e.File=1]="File",e[e.Folder=2]="Folder",e[e.Item=3]="Item",e[e.List=4]="List",e[e.Web=5]="Web",e[e.Max=6]="Max"}(ie||(ie={}));var ae;!function(e){e[e.None=0]="None",e[e.AllowList=1]="AllowList",e[e.BlockList=2]="BlockList"}(ae||(ae={}));var se;!function(e){e[e.None=0]="None",e[e.ContextInfo=1]="ContextInfo",e[e.ListData=2]="ListData",e[e.ListSchema=4]="ListSchema",e[e.MenuView=8]="MenuView",e[e.ListContentType=16]="ListContentType",e[e.FileSystemItemId=32]="FileSystemItemId",e[e.ClientFormSchema=64]="ClientFormSchema",e[e.QuickLaunch=128]="QuickLaunch",e[e.Spotlight=256]="Spotlight",e[e.Visualization=512]="Visualization",e[e.ViewMetadata=1024]="ViewMetadata",e[e.DisableAutoHyperlink=2048]="DisableAutoHyperlink",e[e.EnableMediaTAUrls=4096]="EnableMediaTAUrls",e[e.ParentInfo=8192]="ParentInfo",e[e.PageContextInfo=16384]="PageContextInfo",e[e.ClientSideComponentManifest=32768]="ClientSideComponentManifest"}(se||(se={}));var ue;!function(e){e[e.PeopleAndGroups=1]="PeopleAndGroups",e[e.PeopleOnly=0]="PeopleOnly"}(ue||(ue={}));var ce;!function(e){e[e.Dropdown=0]="Dropdown",e[e.RadioButtons=1]="RadioButtons"}(ce||(ce={}));var le;!function(e){e[e.DefaultZone=0]="DefaultZone",e[e.Intranet=1]="Intranet",e[e.Internet=2]="Internet",e[e.Custom=3]="Custom",e[e.Extranet=4]="Extranet"}(le||(le={}));var pe,de=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),Object.defineProperty(t.prototype,"roleAssignments",{get:function(){return new B(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"firstUniqueAncestorSecurableObject",{get:function(){return new R(this,"FirstUniqueAncestorSecurableObject")},enumerable:!0,configurable:!0}),t.prototype.getUserEffectivePermissions=function(e){var t=this.clone(x,"getUserEffectivePermissions(@user)");return t.query.set("@user","'"+encodeURIComponent(e)+"'"),t.get().then(function(e){return Object(y.j)(e,"GetUserEffectivePermissions")?e.GetUserEffectivePermissions:e})},t.prototype.getCurrentUserEffectivePermissions=function(){return this.clone(x,"EffectiveBasePermissions").get().then(function(e){return Object(y.j)(e,"EffectiveBasePermissions")?e.EffectiveBasePermissions:e})},t.prototype.breakRoleInheritance=function(e,n){return void 0===e&&(e=!1),void 0===n&&(n=!1),this.clone(t,"breakroleinheritance(copyroleassignments="+e+", clearsubscopes="+n+")").postCore()},t.prototype.resetRoleInheritance=function(){return this.clone(t,"resetroleinheritance").postCore()},t.prototype.userHasPermissions=function(e,t){var n=this;return this.getUserEffectivePermissions(e).then(function(e){return n.hasPermissions(e,t)})},t.prototype.currentUserHasPermissions=function(e){var t=this;return this.getCurrentUserEffectivePermissions().then(function(n){return t.hasPermissions(n,e)})},t.prototype.hasPermissions=function(e,t){if(!t)return!0;if(t===Y.FullMask)return 32767==(32767&e.High)&&65535===e.Low;t-=1;var n=1;return t>=0&&t<32?(n<<=t,0!=(e.Low&n)):t>=32&&t<64&&(n<<=t-32,0!=(e.High&n))},t}(R),he=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.getShareLink=function(e,n){void 0===n&&(n=null);var r=null!==n?n.toISOString():null;return this.clone(t,"shareLink").postCore({body:Object(y.n)({request:{createLink:!0,emailData:null,settings:{expiration:r,linkKind:e}}})})},t.prototype.shareWith=function(e,n,r,o,i){var a=this;void 0===r&&(r=!1),void 0===o&&(o=!1),Array.isArray(e)||(e=[e]);var s=Object(y.n)(e.map(function(e){return{Key:e}})),u=n===re.Edit?ee.Contributor:ee.Reader;return new j("_api/web","roledefinitions").select("Id").filter("RoleTypeKind eq "+u).get().then(function(e){if(!Array.isArray(e)||e.length<1)throw Error("Could not locate a role defintion with RoleTypeKind "+u);var n={includeAnonymousLinkInEmail:r,peoplePickerInput:s,propagateAcl:o,roleValue:"role:"+e[0].Id,useSimplifiedRoles:!0};return void 0!==i&&(n=Object(y.f)(n,{emailBody:i.body,emailSubject:void 0!==i.subject?i.subject:"",sendEmail:!0})),a.clone(t,"shareObject").postCore({body:Object(y.n)(n)})})},t.prototype.shareObject=function(e,t){var n=this;return void 0===t&&(t=!1),t?this.sendShareObjectRequest(e):(e=Object(y.f)(e,{group:null,includeAnonymousLinkInEmail:!1,propagateAcl:!1,useSimplifiedRoles:!0},!0),this.getRoleValue(e.role,e.group).then(function(t){Array.isArray(e.loginNames)||(e.loginNames=[e.loginNames]);var r=Object(y.n)(e.loginNames.map(function(e){return{Key:e}})),o={peoplePickerInput:r,roleValue:t,url:e.url};return void 0!==e.emailData&&null!==e.emailData&&(o=Object(y.f)(o,{emailBody:e.emailData.body,emailSubject:void 0!==e.emailData.subject?e.emailData.subject:"Shared with you.",sendEmail:!0})),n.sendShareObjectRequest(o)}))},t.prototype.unshareObjectWeb=function(e){return this.clone(t,"unshareObject").postCore({body:Object(y.n)({url:e})})},t.prototype.checkPermissions=function(e){return this.clone(t,"checkPermissions").postCore({body:Object(y.n)({recipients:e})})},t.prototype.getSharingInformation=function(e,n){void 0===e&&(e=null);var r=this.clone(t,"getSharingInformation");return r.expand.apply(r,n).postCore({body:Object(y.n)({request:e})})},t.prototype.getObjectSharingSettings=function(e){return void 0===e&&(e=!0),this.clone(t,"getObjectSharingSettings").postCore({body:Object(y.n)({useSimplifiedRoles:e})})},t.prototype.unshareObject=function(){return this.clone(t,"unshareObject").postCore()},t.prototype.deleteLinkByKind=function(e){return this.clone(t,"deleteLinkByKind").postCore({body:Object(y.n)({linkKind:e})})},t.prototype.unshareLink=function(e,n){return void 0===n&&(n="00000000-0000-0000-0000-000000000000"),this.clone(t,"unshareLink").postCore({body:Object(y.n)({linkKind:e,shareId:n})})},t.prototype.getRoleValue=function(e,t){if(void 0===t||null===t){var n=e===re.Edit?ee.Contributor:ee.Reader;return new j("_api/web","roledefinitions").select("Id").top(1).filter("RoleTypeKind eq "+n).get().then(function(e){if(e.length<1)throw Error("Could not locate associated role definition for supplied role. Edit and View are supported");return"role: "+e[0].Id})}switch(t){case ee.Contributor:return new R("_api/web","associatedmembergroup").select("Id").get().then(function(e){return"group: "+e.Id});case ee.Reader:case ee.Guest:return new R("_api/web","associatedvisitorgroup").select("Id").get().then(function(e){return"group: "+e.Id});default:throw Error("Could not determine role value for supplied value. Contributor, Reader, and Guest are supported")}},t.prototype.getShareObjectWeb=function(e){return Promise.resolve(new R(s(e),"/_api/SP.Web.ShareObject"))},t.prototype.sendShareObjectRequest=function(e){return this.getShareObjectWeb(this.toUrl()).then(function(n){return n.expand("UsersWithAccessRequests","GroupsSharedWith").as(t).postCore({body:Object(y.n)(e)})})},t}(x),fe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.shareWith=function(e,t,n){var r=this;void 0===t&&(t=re.View);var o=this.addBatchDependency();return new R(s(this.toUrl()),"/_api/web/url").get().then(function(i){return o(),r.shareObject(Object(y.d)(i,"/_layouts/15/aclinv.aspx?forSharing=1&mbypass=1"),e,t,n)})},t.prototype.shareObject=function(e,t,n,r,o,i,a,s){return void 0===i&&(i=!1),void 0===a&&(a=!1),void 0===s&&(s=!0),this.clone(he,null).shareObject({emailData:r,group:o,includeAnonymousLinkInEmail:a,loginNames:t,propagateAcl:i,role:n,url:e,useSimplifiedRoles:s})},t.prototype.shareObjectRaw=function(e){return this.clone(he,null).shareObject(e,!0)},t.prototype.unshareObject=function(e){return this.clone(he,null).unshareObjectWeb(e)},t}(de),ge=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.getShareLink=function(e,t){return void 0===e&&(e=ne.OrganizationView),void 0===t&&(t=null),this.clone(he,null).getShareLink(e,t)},t.prototype.shareWith=function(e,t,n,r){return void 0===t&&(t=re.View),void 0===n&&(n=!1),this.clone(he,null).shareWith(e,t,n,!1,r)},t.prototype.checkSharingPermissions=function(e){return this.clone(he,null).checkPermissions(e)},t.prototype.getSharingInformation=function(e,t){return void 0===e&&(e=null),this.clone(he,null).getSharingInformation(e,t)},t.prototype.getObjectSharingSettings=function(e){return void 0===e&&(e=!0),this.clone(he,null).getObjectSharingSettings(e)},t.prototype.unshare=function(){return this.clone(he,null).unshareObject()},t.prototype.deleteSharingLinkByKind=function(e){return this.clone(he,null).deleteLinkByKind(e)},t.prototype.unshareLink=function(e,t){return this.clone(he,null).unshareLink(e,t)},t}(de),me=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.getShareLink=function(e,t){void 0===e&&(e=ne.OrganizationView),void 0===t&&(t=null);var n=this.addBatchDependency();return this.getShareable().then(function(r){return n(),r.getShareLink(e,t)})},t.prototype.checkSharingPermissions=function(e){var t=this.addBatchDependency();return this.getShareable().then(function(n){return t(),n.checkPermissions(e)})},t.prototype.getSharingInformation=function(e,t){void 0===e&&(e=null);var n=this.addBatchDependency();return this.getShareable().then(function(r){return n(),r.getSharingInformation(e,t)})},t.prototype.getObjectSharingSettings=function(e){void 0===e&&(e=!0);var t=this.addBatchDependency();return this.getShareable().then(function(n){return t(),n.getObjectSharingSettings(e)})},t.prototype.unshare=function(){var e=this.addBatchDependency();return this.getShareable().then(function(t){return e(),t.unshareObject()})},t.prototype.deleteSharingLinkByKind=function(e){var t=this.addBatchDependency();return this.getShareable().then(function(n){return t(),n.deleteLinkByKind(e)})},t.prototype.unshareLink=function(e,t){var n=this.addBatchDependency();return this.getShareable().then(function(r){return n(),r.unshareLink(e,t)})},t.prototype.getShareable=function(){var e=this;return this.clone(ye,"listItemAllFields",!1).select("odata.id").get().then(function(t){var n=new he(u(t));return e.hasBatch&&(n=n.inBatch(e.batch)),n})},t}(R),ye=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.shareWith=function(e,t,n,r){void 0===t&&(t=re.View),void 0===n&&(n=!1);var o=this.addBatchDependency();return this.getShareable().then(function(i){return o(),i.shareWith(e,t,n,!1,r)})},t}(me),be=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.shareWith=function(e,t,n,r,o){void 0===t&&(t=re.View),void 0===n&&(n=!1),void 0===r&&(r=!1);var i=this.addBatchDependency();return this.getShareable().then(function(a){return i(),a.shareWith(e,t,n,r,o)})},t}(me),ve=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),Object.defineProperty(t.prototype,"webparts",{get:function(){return new Se(this,"webparts")},enumerable:!0,configurable:!0}),t.prototype.export=function(e){return this.clone(t,"ExportWebPart").postCore({body:Object(y.n)({webPartId:e})})},t.prototype.import=function(e){return this.clone(t,"ImportWebPart").postCore({body:Object(y.n)({webPartXml:e})})},t}(x),Se=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.getById=function(e){return new Te(this,"getbyid('"+e+"')")},t.prototype.getByControlId=function(e){return new Te(this,"getByControlId('"+e+"')")},t}(j),Te=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),Object.defineProperty(t.prototype,"webpart",{get:function(){return new Oe(this)},enumerable:!0,configurable:!0}),t.prototype.saveChanges=function(){return this.clone(t,"SaveWebPartChanges").postCore()},t.prototype.moveTo=function(e,n){return this.clone(t,"MoveWebPartTo(zoneID='"+e+"', zoneIndex="+n+")").postCore()},t.prototype.close=function(){return this.clone(t,"CloseWebPart").postCore()},t.prototype.open=function(){return this.clone(t,"OpenWebPart").postCore()},t.prototype.delete=function(){return this.clone(t,"DeleteWebPart").postCore()},t}(R),Oe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t=o([h("webpart")],t)}(R),we=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}r(t,e),n=t,t.prototype.getByName=function(e){var t=new Ce(this);return t.concat("('"+e+"')"),t},t.prototype.add=function(e){var t=this;return this.clone(n,"add('"+e+"')").postCore().then(function(n){return{data:n,folder:t.getByName(e)}})},t.prototype.addUsingPath=function(e,t){var r=this;return void 0===t&&(t=!1),this.clone(n,"addUsingPath(DecodedUrl='"+e+"',overwrite="+t+")").postCore().then(function(t){return{data:t,folder:new Ce(s(r.toUrl()),"_api/web/getFolderByServerRelativePath(decodedUrl='"+e+"')")}})};var n;return t=n=o([h("folders")],t)}(j),Ce=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.update=t._update("SP.Folder",function(e){return{data:e,folder:t}}),t}return r(t,e),Object.defineProperty(t.prototype,"contentTypeOrder",{get:function(){return new j(this,"contentTypeOrder")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"files",{get:function(){return new et(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"folders",{get:function(){return new we(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"listItemAllFields",{get:function(){return new R(this,"listItemAllFields")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentFolder",{get:function(){return new t(this,"parentFolder")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"properties",{get:function(){return new R(this,"properties")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"serverRelativeUrl",{get:function(){return new x(this,"serverRelativeUrl")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"uniqueContentTypeOrder",{get:function(){return new j(this,"uniqueContentTypeOrder")},enumerable:!0,configurable:!0}),t.prototype.delete=function(e){return void 0===e&&(e="*"),this.clone(t,null).postCore({headers:{"IF-Match":e,"X-HTTP-Method":"DELETE"}})},t.prototype.recycle=function(){return this.clone(t,"recycle").postCore()},t.prototype.getItem=function(){for(var e=[],t=0;t0&&r.forEach(function(e,t){return i.query.set(t,e)}),i.postCore({body:Object(y.n)(o)})},t.prototype.renderListFormData=function(e,n,r){return this.clone(t,"renderlistformdata(itemid="+e+", formid='"+n+"', mode='"+r+"')").postCore().then(function(e){return JSON.parse(Object(y.j)(e,"RenderListFormData")?e.RenderListFormData:e)})},t.prototype.reserveListItemId=function(){return this.clone(t,"reservelistitemid").postCore().then(function(e){return Object(y.j)(e,"ReserveListItemId")?e.ReserveListItemId:e})},t.prototype.getListItemEntityTypeFullName=function(){return this.clone(t,null,!1).select("ListItemEntityTypeFullName").get().then(function(e){return e.ListItemEntityTypeFullName})},t.prototype.addValidateUpdateItemUsingPath=function(e,n,r,o){return void 0===r&&(r=!1),this.clone(t,"AddValidateUpdateItemUsingPath()").postCore({body:Object(y.n)({bNewDocumentUpdate:r,checkInComment:o,formValues:e,listItemCreateInfo:{FolderPath:{DecodedUrl:n,__metadata:{type:"SP.ResourcePath"}},__metadata:{type:"SP.ListItemCreationInformationUsingPath"}}})}).then(function(e){return void 0!==e.AddValidateUpdateItemUsingPath?e.AddValidateUpdateItemUsingPath.results:e})},t.prototype.getSiteScript=function(){return i(this,void 0,void 0,function(){var e,n;return a(this,function(r){switch(r.label){case 0:return[4,this.clone(t).rootFolder.select("ServerRelativeUrl").get()];case 1:return e=r.sent(),[4,p(e.ServerRelativeUrl)];case 2:return n=r.sent(),[2,new S.a(this,"").getSiteScriptFromList(n)]}})})},t}(de),We=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}r(t,e),n=t,t.prototype.add=function(e){var t=this;"string"==typeof e&&(e={text:e});var r=Object(y.n)(Object(y.f)(d("Microsoft.SharePoint.Comments.comment"),e));return this.clone(n,null).postCore({body:r}).then(function(e){return Object(y.f)(t.getById(e.id),e)})},t.prototype.getById=function(e){var t=new Ke(this);return t.concat("("+e+")"),t},t.prototype.clear=function(){return this.clone(n,"DeleteAll").postCore()};var n;return t=n=o([h("comments")],t)}(j),Ke=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),Object.defineProperty(t.prototype,"replies",{get:function(){return new Ve(this)},enumerable:!0,configurable:!0}),t.prototype.like=function(){return this.clone(t,"Like").postCore()},t.prototype.unlike=function(){return this.clone(t,"Unlike").postCore()},t.prototype.delete=function(){return this.deleteCore()},t}(R),Ve=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}r(t,e),n=t,t.prototype.add=function(e){"string"==typeof e&&(e={text:e});var t=Object(y.n)(Object(y.f)(d("Microsoft.SharePoint.Comments.comment"),e));return this.clone(n,null).postCore({body:t}).then(function(e){return Object(y.f)(new Ke(u(e)),e)})};var n;return t=n=o([h("replies")],t)}(j),Qe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}r(t,e),n=t,t.prototype.getById=function(e){var t=new ze(this);return t.concat("("+e+")"),t},t.prototype.getItemByStringId=function(e){return new ze(this.parentUrl,"getItemByStringId('"+e+"')")},t.prototype.skip=function(e,t){return void 0===t&&(t=!1),t?this.query.set("$skiptoken",encodeURIComponent("Paged=TRUE&PagedPrev=TRUE&p_ID="+e)):this.query.set("$skiptoken",encodeURIComponent("Paged=TRUE&p_ID="+e)),this},t.prototype.getPaged=function(e){return void 0===e&&(e=new v.f),this.get(new $e(this,e))},t.prototype.getAll=function(e,t){void 0===e&&(e=2e3),void 0===t&&(t="application/json;odata=nometadata"),b.a.write("Calling items.getAll should be done sparingly. Ensure this is the correct choice. If you are unsure, it is not.",2);var r=new n(this,"").top(e).configure({headers:{Accept:t}});return this.query.forEach(function(e,t){/^\$select|filter|top|expand$/i.test(t)&&r.query.set(t,e)}),new Promise(function(e,t){var n=[],o=function(r){[].push.apply(n,r.results),r.hasNext?r.getNext().then(o).catch(t):e(n)};r.getPaged().then(o).catch(t)})},t.prototype.add=function(e,t){var r=this;void 0===e&&(e={}),void 0===t&&(t=null);var o=this.addBatchDependency();return this.ensureListItemEntityTypeName(t).then(function(t){var i=Object(y.n)(Object(y.f)(d(t),e)),a=r.clone(n,"").postCore({body:i}).then(function(e){return{data:e,item:r.getById(e.Id)}});return o(),a})},t.prototype.ensureListItemEntityTypeName=function(e){return e?Promise.resolve(e):this.getParent(He).getListItemEntityTypeFullName()};var n;return t=n=o([h("items")],t)}(j),ze=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.delete=t._deleteWithETag,t}return r(t,e),Object.defineProperty(t.prototype,"attachmentFiles",{get:function(){return new Ne(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"contentType",{get:function(){return new Ie(this,"ContentType")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"comments",{get:function(){return new We(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"effectiveBasePermissions",{get:function(){return new x(this,"EffectiveBasePermissions")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"effectiveBasePermissionsForUI",{get:function(){return new x(this,"EffectiveBasePermissionsForUI")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fieldValuesAsHTML",{get:function(){return new R(this,"FieldValuesAsHTML")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fieldValuesAsText",{get:function(){return new R(this,"FieldValuesAsText")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fieldValuesForEdit",{get:function(){return new R(this,"FieldValuesForEdit")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"folder",{get:function(){return new Ce(this,"folder")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"file",{get:function(){return new tt(this,"file")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"versions",{get:function(){return new Je(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"list",{get:function(){return this.getParent(He,this.parentUrl.substr(0,this.parentUrl.lastIndexOf("/")))},enumerable:!0,configurable:!0}),t.prototype.update=function(e,t,n){var r=this;return void 0===t&&(t="*"),void 0===n&&(n=null),new Promise(function(o,i){var a=r.addBatchDependency();return r.ensureListItemEntityTypeName(n).then(function(n){var i=Object(y.n)(Object(y.f)(d(n),e));return a(),r.postCore({body:i,headers:{"IF-Match":t,"X-HTTP-Method":"MERGE"}},new Ze).then(function(e){o({data:e,item:r})})}).catch(function(e){return i(e)})})},t.prototype.getLikedBy=function(){return this.clone(t,"likedBy").postCore()},t.prototype.like=function(){return this.clone(t,"like").postCore()},t.prototype.unlike=function(){return this.clone(t,"unlike").postCore()},t.prototype.recycle=function(){return this.clone(t,"recycle").postCore()},t.prototype.getWopiFrameUrl=function(e){void 0===e&&(e=0);var n=this.clone(t,"getWOPIFrameUrl(@action)");return n.query.set("@action",e),n.postCore().then(function(e){return Object(y.j)(e,"GetWOPIFrameUrl")?e.GetWOPIFrameUrl:e})},t.prototype.validateUpdateListItem=function(e,n){return void 0===n&&(n=!1),this.clone(t,"validateupdatelistitem").postCore({body:Object(y.n)({formValues:e,bNewDocumentUpdate:n})})},t.prototype.getLikedByInformation=function(){return this.clone(t,"likedByInformation").expand("likedby").getCore()},t.prototype.ensureListItemEntityTypeName=function(e){return e?Promise.resolve(e):this.list.getListItemEntityTypeFullName()},t}(ge),Je=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.getById=function(e){var t=new Xe(this);return t.concat("("+e+")"),t},t=o([h("versions")],t)}(j),Xe=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.delete=t._deleteWithETag,t}return r(t,e),t}(R),Ye=function(){function e(e,t,n,r){this.parent=e,this.nextUrl=t,this.results=n,this.innerParser=r}return Object.defineProperty(e.prototype,"hasNext",{get:function(){return"string"==typeof this.nextUrl&&this.nextUrl.length>0},enumerable:!0,configurable:!0}),e.prototype.getNext=function(){if(this.hasNext){return new Qe(this.nextUrl,null).configureFrom(this.parent).getPaged(this.innerParser)}return new Promise(function(e){return e(null)})},e}(),$e=function(e){function t(t,n){var r=e.call(this)||this;return r._parent=t,r.innerParser=n,r}return r(t,e),t.prototype.parse=function(e){var t=this;return this.innerParser.parse(e).then(function(e){return i(t,void 0,void 0,function(){var t,n;return a(this,function(r){return t=this.innerParser.rawJson,n=Object(y.j)(t,"d")&&Object(y.j)(t.d,"__next")?t.d.__next:t["odata.nextLink"],[2,new Ye(this._parent,n,e,this.innerParser)]})})})},t}(v.g),Ze=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.parse=function(e){return i(this,void 0,void 0,function(){var t=this;return a(this,function(n){return[2,new Promise(function(n,r){t.handleError(e,r)&&n({"odata.etag":e.headers.get("etag")})})]})})},t}(v.g),et=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}r(t,e),n=t,t.prototype.getByName=function(e){var t=new tt(this);return t.concat("('"+e+"')"),t},t.prototype.add=function(e,t,r){var o=this;return void 0===r&&(r=!0),new n(this,"add(overwrite="+r+",url='"+e+"')").postCore({body:t}).then(function(t){return{data:t,file:o.getByName(e)}})},t.prototype.addUsingPath=function(e,t,r){var o=this;void 0===r&&(r={Overwrite:!1});var i=["AddUsingPath(decodedurl='"+e+"'"];return r&&(r.Overwrite&&i.push(",Overwrite=true"),r.AutoCheckoutOnInvalidData&&i.push(",AutoCheckoutOnInvalidData=true"),Object(y.r)(r.XorHash)||i.push(",XorHash="+r.XorHash)),i.push(")"),new n(this,i.join("")).postCore({body:t}).then(function(t){return{data:t,file:o.getByName(e)}})},t.prototype.addChunked=function(e,t,r,o,i){var a=this;return void 0===o&&(o=!0),void 0===i&&(i=10485760),this.clone(n,"add(overwrite = "+o+", url = '"+e+"')",!1).postCore().then(function(){return a.getByName(e)}).then(function(e){return e.setContentChunked(t,r,i)})},t.prototype.addTemplateFile=function(e,t){var r=this;return this.clone(n,"addTemplateFile(urloffile = '"+e+"', templatefiletype = "+t+")",!1).postCore().then(function(t){return{data:t,file:r.getByName(e)}})};var n;return t=n=o([h("files")],t)}(j),tt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),Object.defineProperty(t.prototype,"listItemAllFields",{get:function(){return new R(this,"listItemAllFields")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"versions",{get:function(){return new nt(this)},enumerable:!0,configurable:!0}),t.prototype.approve=function(e){return void 0===e&&(e=""),this.clone(t,"approve(comment = '"+e+"')").postCore()},t.prototype.cancelUpload=function(e){return this.clone(t,"cancelUpload(uploadId = guid'"+e+"')",!1).postCore()},t.prototype.checkin=function(e,n){if(void 0===e&&(e=""),void 0===n&&(n=pe.Major),e.length>1023)throw Error("The maximum comment length is 1023 characters.");return this.clone(t,"checkin(comment = '"+e+"', checkintype = "+n+")").postCore()},t.prototype.checkout=function(){return this.clone(t,"checkout").postCore()},t.prototype.copyTo=function(e,n){return void 0===n&&(n=!0),this.clone(t,"copyTo(strnewurl = '"+e+"', boverwrite = "+n+")").postCore()},t.prototype.delete=function(e){return void 0===e&&(e="*"),this.clone(t,null).postCore({headers:{"IF-Match":e,"X-HTTP-Method":"DELETE"}})},t.prototype.deny=function(e){if(void 0===e&&(e=""),e.length>1023)throw Error("The maximum comment length is 1023 characters.");return this.clone(t,"deny(comment = '"+e+"')").postCore()},t.prototype.getLimitedWebPartManager=function(e){return void 0===e&&(e=ot.Shared),new ve(this,"getLimitedWebPartManager(scope = "+e+")")},t.prototype.moveTo=function(e,n){return void 0===n&&(n=it.Overwrite),this.clone(t,"moveTo(newurl = '"+e+"', flags = "+n+")").postCore()},t.prototype.publish=function(e){if(void 0===e&&(e=""),e.length>1023)throw Error("The maximum comment length is 1023 characters.");return this.clone(t,"publish(comment = '"+e+"')").postCore()},t.prototype.recycle=function(){return this.clone(t,"recycle").postCore()},t.prototype.undoCheckout=function(){return this.clone(t,"undoCheckout").postCore()},t.prototype.unpublish=function(e){if(void 0===e&&(e=""),e.length>1023)throw Error("The maximum comment length is 1023 characters.");return this.clone(t,"unpublish(comment = '"+e+"')").postCore()},t.prototype.getText=function(){return this.clone(t,"$value",!1).get(new v.i,{headers:{binaryStringResponseBody:"true"}})},t.prototype.getBlob=function(){return this.clone(t,"$value",!1).get(new v.a,{headers:{binaryStringResponseBody:"true"}})},t.prototype.getBuffer=function(){return this.clone(t,"$value",!1).get(new v.b,{headers:{binaryStringResponseBody:"true"}})},t.prototype.getJSON=function(){return this.clone(t,"$value",!1).get(new v.d,{headers:{binaryStringResponseBody:"true"}})},t.prototype.setContent=function(e){var n=this;return this.clone(t,"$value",!1).postCore({body:e,headers:{"X-HTTP-Method":"PUT"}}).then(function(e){return new t(n)})},t.prototype.getItem=function(){for(var e=this,t=[],n=0;n0?"tenantappcatalog":"sitecollectionappcatalog";return new t(s(this.toUrl()),"_api/web/"+o+"/add(overwrite="+r+",url='"+e+"')").postCore({body:n}).then(function(e){return{data:e,file:new tt(u(e))}})},t}(j),ct=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.deploy=function(e){return void 0===e&&(e=!1),this.clone(t,"Deploy("+e+")").postCore()},t.prototype.retract=function(){return this.clone(t,"Retract").postCore()},t.prototype.install=function(){return this.clone(t,"Install").postCore()},t.prototype.uninstall=function(){return this.clone(t,"Uninstall").postCore()},t.prototype.upgrade=function(){return this.clone(t,"Upgrade").postCore()},t.prototype.remove=function(){return this.clone(t,"Remove").postCore()},t}(R),lt=function(e){function t(t){var n=e.call(this)||this;return n.baseUrl=t,n}return r(t,e),t.ParseResponse=function(e){return new Promise(function(t,n){for(var r,o,i=[],a=new RegExp("^HTTP/[0-9.]+ +([0-9]+) +(.*)","i"),s=e.split("\n"),u="batch",c=0;c0&&(o.push("--changeset_"+i+"--\n\n"),i=""),o.push("--batch_"+e.batchId+"\n")):(i.length<1&&(i=Object(y.h)(),o.push("--batch_"+e.batchId+"\n"),o.push('Content-Type: multipart/mixed; boundary="changeset_'+i+'"\n\n')),o.push("--changeset_"+i+"\n")),o.push("Content-Type: application/http\n"),o.push("Content-Transfer-Encoding: binary\n\n");var u=new Headers,c=Object(y.m)(s.url)?s.url:Object(y.d)(r,s.url);if(b.a.write("["+e.batchId+"] ("+(new Date).getTime()+") Adding request "+s.method+" "+c+" to batch.",0),"GET"!==s.method){var l=s.method,p=s.options.headers;Object(y.j)(s,"options")&&Object(y.j)(s.options,"headers")&&void 0!==p["X-HTTP-Method"]&&(l=p["X-HTTP-Method"],delete p["X-HTTP-Method"]),o.push(l+" "+c+" HTTP/1.1\n"),u.set("Content-Type","application/json;odata=verbose;charset=utf-8")}else o.push(s.method+" "+c+" HTTP/1.1\n");Object(y.o)(u,C.headers),s.options&&Object(y.o)(u,s.options.headers),u.has("Accept")||u.append("Accept","application/json"),u.has("Content-Type")||u.append("Content-Type","application/json;odata=verbose;charset=utf-8"),u.has("X-ClientService-ClientTag")||u.append("X-ClientService-ClientTag","PnPCoreJS:@pnp-1.3.11"),u.forEach(function(e,t){o.push(t+": "+e+"\n")}),o.push("\n"),s.options.body&&o.push(s.options.body+"\n\n")}i.length>0&&(o.push("--changeset_"+i+"--\n\n"),i=""),o.push("--batch_"+e.batchId+"--\n");var d={body:o.join(""),headers:{"Content-Type":"multipart/mixed; boundary=batch_"+e.batchId},method:"POST"};return b.a.write("["+e.batchId+"] ("+(new Date).getTime()+") Sending batch request.",1),n.fetch(Object(y.d)(r,"/_api/$batch"),d).then(function(e){return e.text()}).then(t.ParseResponse).then(function(t){if(t.length!==e.requests.length)throw Error("Could not properly parse responses to match requests in batch.");return b.a.write("["+e.batchId+"] ("+(new Date).getTime()+") Resolving batched requests.",1),t.reduce(function(t,n,r){var o=e.requests[r];return b.a.write("["+o.id+"] ("+(new Date).getTime()+") Resolving request in batch "+e.batchId+".",1),t.then(function(e){return o.parser.parse(n).then(o.resolve).catch(o.reject)})},Promise.resolve())})})},t}(v.e),pt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}r(t,e),n=t,t.prototype.add=function(e,t){var r=this;return void 0===t&&(t=!1),this.clone(n,"add").postCore({body:Object(y.n)({featdefScope:0,featureId:e,force:t})}).then(function(t){return{data:t,feature:r.getById(e)}})},t.prototype.getById=function(e){var t=new dt(this);return t.concat("('"+e+"')"),t},t.prototype.remove=function(e,t){return void 0===t&&(t=!1),this.clone(n,"remove").postCore({body:Object(y.n)({featureId:e,force:t})})};var n;return t=n=o([h("features")],t)}(j),dt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.deactivate=function(e){var n=this;void 0===e&&(e=!1);var r=this.addBatchDependency();return new t(this).select("DefinitionId").get().then(function(t){var o=n.getParent(pt,n.parentUrl,"",n.batch).remove(t.DefinitionId,e);return r(),o})},t}(R),ht=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}r(t,e),n=t,Object.defineProperty(t.prototype,"rootWeb",{get:function(){return new _t(this,"rootweb")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"features",{get:function(){return new pt(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"userCustomActions",{get:function(){return new Be(this)},enumerable:!0,configurable:!0}),t.prototype.getRootWeb=function(){return this.rootWeb.select("Url").get().then(function(e){return new _t(e.Url)})},t.prototype.getContextInfo=function(){return new n(this.parentUrl,"_api/contextinfo").postCore().then(function(e){if(Object(y.j)(e,"GetContextWebInformation")){var t=e.GetContextWebInformation;return t.SupportedSchemaVersions=t.SupportedSchemaVersions.results,t}return e})},t.prototype.getDocumentLibraries=function(e){var t=new x("","_api/sp.web.getdocumentlibraries(@v)");return t.query.set("@v","'"+e+"'"),t.get().then(function(e){return Object(y.j)(e,"GetDocumentLibraries")?e.GetDocumentLibraries:e})},t.prototype.getWebUrlFromPageUrl=function(e){var t=new x("","_api/sp.web.getweburlfrompageurl(@v)");return t.query.set("@v","'"+e+"'"),t.get().then(function(e){return Object(y.j)(e,"GetWebUrlFromPageUrl")?e.GetWebUrlFromPageUrl:e})},t.prototype.getChanges=function(e){var t=Object(y.n)({query:Object(y.f)({__metadata:{type:"SP.ChangeQuery"}},e)});return this.clone(n,"getchanges").postCore({body:t})},t.prototype.delete=function(){return i(this,void 0,void 0,function(){var e,t;return a(this,function(r){switch(r.label){case 0:return[4,this.clone(n,"").select("Id").get()];case 1:return e=r.sent(),t=new n(this.parentUrl,"_api/SPSiteManager/Delete"),[4,t.postCore({body:Object(y.n)({siteId:e.Id})})];case 2:return r.sent(),[2]}})})},t.prototype.createBatch=function(){return new lt(this.parentUrl)},t.prototype.openWebById=function(e){return this.clone(n,"openWebById('"+e+"')").postCore().then(function(e){return{data:e,web:_t.fromUrl(e["odata.id"]||e.__metadata.uri)}})},t.prototype.joinHubSite=function(e){return this.clone(n,"joinHubSite('"+e+"')").postCore()},t.prototype.registerHubSite=function(){return this.clone(n,"registerHubSite").postCore()},t.prototype.unRegisterHubSite=function(){return this.clone(n,"unRegisterHubSite").postCore()},t.prototype.createCommunicationSite=function(e,t,n,r,o,s,u,c,l){var p=this;void 0===t&&(t=1033),void 0===n&&(n=!1),void 0===o&&(o=""),void 0===s&&(s=""),void 0===u&&(u="00000000-0000-0000-0000-000000000000"),void 0===c&&(c="00000000-0000-0000-0000-000000000000");var d={Classification:s,Description:o,HubSiteId:c,Lcid:t,Owner:l,ShareByEmailEnabled:n,SiteDesignId:u,Title:e,Url:r,WebTemplate:"SITEPAGEPUBLISHING#0",WebTemplateExtensionId:"00000000-0000-0000-0000-000000000000"},h=Object(y.n)({request:Object(y.f)({__metadata:{type:"Microsoft.SharePoint.Portal.SPSiteCreationRequest"}},d)});return this.getRootWeb().then(function(e){return i(p,void 0,void 0,function(){var t,n;return a(this,function(r){return t=new E,n=e.parentUrl+"/_api/SPSiteManager/Create",[2,t.post(n,{body:h,headers:{Accept:"application/json;odata=verbose","Content-Type":"application/json;odata=verbose;charset=utf-8"}}).then(function(e){return e.json()}).then(function(e){if(Object(y.j)(e,"error"))throw e;return Object(y.j)(e,"d")&&Object(y.j)(e.d,"Create")?e.d.Create:e})]})})})},t.prototype.createModernTeamSite=function(e,t,n,r,o,s,u,c,l){var p=this;void 0===n&&(n=!0),void 0===r&&(r=1033),void 0===o&&(o=""),void 0===s&&(s=""),void 0===c&&(c="00000000-0000-0000-0000-000000000000");var d={alias:t,displayName:e,isPublic:n,optionalParams:{Classification:s,CreationOptions:{results:["SPSiteLanguage:"+r,"HubSiteId:"+c]},Description:o,Owners:{results:u||[]}}};return l&&d.optionalParams.CreationOptions.results.push("implicit_formula_292aa8a00786498a87a5ca52d9f4214a_"+l),this.getRootWeb().then(function(e){return i(p,void 0,void 0,function(){var t,n;return a(this,function(r){return t=new E,n=e.parentUrl+"/_api/GroupSiteManager/CreateGroupEx",[2,t.post(n,{body:Object(y.n)(d),headers:{Accept:"application/json;odata=verbose","Content-Type":"application/json;odata=verbose;charset=utf-8"}}).then(function(e){return e.json()})]})})})};var n;return t=n=o([h("_api/site")],t)}(R),ft=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.getById=function(e){var t=new gt(this);return t.concat("("+e+")"),t},t.prototype.add=function(e,n,r){var o=this;void 0===r&&(r=!0);var i=Object(y.n)(Object(y.f)(d("SP.NavigationNode"),{IsVisible:r,Title:e,Url:n}));return this.clone(t,null).postCore({body:i}).then(function(e){return{data:e,node:o.getById(e.Id)}})},t.prototype.moveAfter=function(e,n){var r=Object(y.n)({nodeId:e,previousNodeId:n});return this.clone(t,"MoveAfter").postCore({body:r})},t}(j),gt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),Object.defineProperty(t.prototype,"children",{get:function(){return new ft(this,"Children")},enumerable:!0,configurable:!0}),t.prototype.delete=function(){return e.prototype.deleteCore.call(this)},t.prototype.update=function(e){var t=this,n=Object(y.n)(Object(y.f)({__metadata:{type:"SP.NavigationNode"}},e));return this.postCore({body:n,headers:{"X-HTTP-Method":"MERGE"}}).then(function(e){return{data:e,node:t}})},t}(R),mt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),Object.defineProperty(t.prototype,"quicklaunch",{get:function(){return new ft(this,"quicklaunch")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"topNavigationBar",{get:function(){return new ft(this,"topnavigationbar")},enumerable:!0,configurable:!0}),t=o([h("navigation")],t)}(x),yt=function(e){function t(t,n){return void 0===n&&(n=null),e.call(this,t,n)||this}return r(t,e),t.prototype.getMenuState=function(e,n,r,o){return void 0===e&&(e=null),void 0===n&&(n=10),void 0===r&&(r=null),void 0===o&&(o=null),new t(this,"_api/navigation/MenuState").postCore({body:Object(y.n)({customProperties:o,depth:n,mapProviderName:r,menuNodeKey:e})})},t.prototype.getMenuNodeKey=function(e,n){return void 0===n&&(n=null),new t(this,"_api/navigation/MenuNodeKey").postCore({body:Object(y.n)({currentUrl:e,mapProviderName:n})})},t}(x),bt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}r(t,e),n=t,t.FromUrl=function(e){if(null===e)return new n("");var t=e.indexOf("_api/");return new n(t>-1?e.substr(0,t):e)},t.prototype.getRelatedItems=function(e,t){var r=this.clone(n,null);return r.concat(".GetRelatedItems"),r.postCore({body:Object(y.n)({SourceItemID:t,SourceListName:e})})},t.prototype.getPageOneRelatedItems=function(e,t){var r=this.clone(n,null);return r.concat(".GetPageOneRelatedItems"),r.postCore({body:Object(y.n)({SourceItemID:t,SourceListName:e})})},t.prototype.addSingleLink=function(e,t,r,o,i,a,s){void 0===s&&(s=!1);var u=this.clone(n,null);return u.concat(".AddSingleLink"),u.postCore({body:Object(y.n)({SourceItemID:t,SourceListName:e,SourceWebUrl:r,TargetItemID:i,TargetListName:o,TargetWebUrl:a,TryAddReverseLink:s})})},t.prototype.addSingleLinkToUrl=function(e,t,r,o){void 0===o&&(o=!1);var i=this.clone(n,null);return i.concat(".AddSingleLinkToUrl"),i.postCore({body:Object(y.n)({SourceItemID:t,SourceListName:e,TargetItemUrl:r,TryAddReverseLink:o})})},t.prototype.addSingleLinkFromUrl=function(e,t,r,o){void 0===o&&(o=!1);var i=this.clone(n,null);return i.concat(".AddSingleLinkFromUrl"),i.postCore({body:Object(y.n)({SourceItemUrl:e,TargetItemID:r,TargetListName:t,TryAddReverseLink:o})})},t.prototype.deleteSingleLink=function(e,t,r,o,i,a,s){void 0===s&&(s=!1);var u=this.clone(n,null);return u.concat(".DeleteSingleLink"),u.postCore({body:Object(y.n)({SourceItemID:t,SourceListName:e,SourceWebUrl:r,TargetItemID:i,TargetListName:o,TargetWebUrl:a,TryDeleteReverseLink:s})})};var n;return t=n=o([h("_api/SP.RelatedItemManager")],t)}(x),vt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),Object.defineProperty(t.prototype,"installedLanguages",{get:function(){return new St(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"globalInstalledLanguages",{get:function(){return new St(this,"globalinstalledlanguages")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"timeZone",{get:function(){return new Tt(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"timeZones",{get:function(){return new Ot(this)},enumerable:!0,configurable:!0}),t=o([h("regionalsettings")],t)}(R),St=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t=o([h("installedlanguages")],t)}(j),Tt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}r(t,e),n=t,t.prototype.utcToLocalTime=function(e){var t;return t="string"==typeof e?e:e.toISOString(),this.clone(n,"utctolocaltime('"+t+"')").postCore().then(function(e){return Object(y.j)(e,"UTCToLocalTime")?e.UTCToLocalTime:e})},t.prototype.localTimeToUTC=function(e){var t;return t="string"==typeof e?e:Object(y.e)(e,"minute",-1*e.getTimezoneOffset()).toISOString(),this.clone(n,"localtimetoutc('"+t+"')").postCore().then(function(e){return Object(y.j)(e,"LocalTimeToUTC")?e.LocalTimeToUTC:e})};var n;return t=n=o([h("timezone")],t)}(R),Ot=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}r(t,e),n=t,t.prototype.getById=function(e){return this.clone(n,"GetById("+e+")").postCore({},c(Tt))};var n;return t=n=o([h("timezones")],t)}(j),wt=function(e){function t(n,r){return e.call(this,t.getBaseUrl(n),"_api/Microsoft.Sharepoint.Utilities.WebTemplateExtensions.SiteScriptUtility."+r)||this}return r(t,e),t.getBaseUrl=function(e){if("string"==typeof e)return e;var t=e,n=t.toUrl(),r=n.indexOf("_api/");return r<0?n:n.substr(0,r)},t.prototype.execute=function(e){return this.postCore({body:JSON.stringify(e),headers:{"Content-Type":"application/json;charset=utf-8"}})},t.prototype.createSiteDesign=function(e){return i(this,void 0,void 0,function(){return a(this,function(n){switch(n.label){case 0:return[4,this.clone(t,"CreateSiteDesign").execute({info:e})];case 1:return[2,n.sent()]}})})},t.prototype.applySiteDesign=function(e,n){return i(this,void 0,void 0,function(){return a(this,function(r){switch(r.label){case 0:return[4,this.clone(t,"ApplySiteDesign").execute({siteDesignId:e,webUrl:n})];case 1:return[2,r.sent()]}})})},t.prototype.getSiteDesigns=function(){return i(this,void 0,void 0,function(){return a(this,function(e){switch(e.label){case 0:return[4,this.clone(t,"GetSiteDesigns").execute({})];case 1:return[2,e.sent()]}})})},t.prototype.getSiteDesignMetadata=function(e){return i(this,void 0,void 0,function(){return a(this,function(n){switch(n.label){case 0:return[4,this.clone(t,"GetSiteDesignMetadata").execute({id:e})];case 1:return[2,n.sent()]}})})},t.prototype.updateSiteDesign=function(e){return i(this,void 0,void 0,function(){return a(this,function(n){switch(n.label){case 0:return[4,this.clone(t,"UpdateSiteDesign").execute({updateInfo:e})];case 1:return[2,n.sent()]}})})},t.prototype.deleteSiteDesign=function(e){return i(this,void 0,void 0,function(){return a(this,function(n){switch(n.label){case 0:return[4,this.clone(t,"DeleteSiteDesign").execute({id:e})];case 1:return[2,n.sent()]}})})},t.prototype.getSiteDesignRights=function(e){return i(this,void 0,void 0,function(){return a(this,function(n){switch(n.label){case 0:return[4,this.clone(t,"GetSiteDesignRights").execute({id:e})];case 1:return[2,n.sent()]}})})},t.prototype.grantSiteDesignRights=function(e,n,r){return void 0===r&&(r=1),i(this,void 0,void 0,function(){return a(this,function(o){switch(o.label){case 0:return[4,this.clone(t,"GrantSiteDesignRights").execute({grantedRights:r.toString(),id:e,principalNames:n})];case 1:return[2,o.sent()]}})})},t.prototype.revokeSiteDesignRights=function(e,n){return i(this,void 0,void 0,function(){return a(this,function(r){switch(r.label){case 0:return[4,this.clone(t,"RevokeSiteDesignRights").execute({id:e,principalNames:n})];case 1:return[2,r.sent()]}})})},t.prototype.addSiteDesignTask=function(e,n){return i(this,void 0,void 0,function(){return a(this,function(r){switch(r.label){case 0:return[4,this.clone(t,"AddSiteDesignTask").execute({webUrl:e,siteDesignId:n})];case 1:return[2,r.sent()]}})})},t.prototype.addSiteDesignTaskToCurrentWeb=function(e){return i(this,void 0,void 0,function(){return a(this,function(n){switch(n.label){case 0:return[4,this.clone(t,"AddSiteDesignTaskToCurrentWeb").execute({siteDesignId:e})];case 1:return[2,n.sent()]}})})},t.prototype.getSiteDesignTask=function(e){return i(this,void 0,void 0,function(){var n;return a(this,function(r){switch(r.label){case 0:return[4,this.clone(t,"GetSiteDesignTask").execute({taskId:e})];case 1:return n=r.sent(),[2,Object(y.j)(n,"ID")?n:null]}})})},t.prototype.getSiteDesignRun=function(e,n){return i(this,void 0,void 0,function(){return a(this,function(r){switch(r.label){case 0:return[4,this.clone(t,"GetSiteDesignRun").execute({webUrl:e,siteDesignId:n})];case 1:return[2,r.sent()]}})})},t.prototype.getSiteDesignRunStatus=function(e,n){return i(this,void 0,void 0,function(){return a(this,function(r){switch(r.label){case 0:return[4,this.clone(t,"GetSiteDesignRunStatus").execute({webUrl:e,runId:n})];case 1:return[2,r.sent()]}})})},t}(x),Ct=function(e){function t(n,r){return e.call(this,t.getBaseUrl(n),"_api/Microsoft.Sharepoint.Utilities.WebTemplateExtensions.SiteScriptUtility."+r)||this}return r(t,e),t.getBaseUrl=function(e){if("string"==typeof e)return e;var t=e,n=t.toUrl(),r=n.indexOf("_api/");return r<0?n:n.substr(0,r)},t.prototype.execute=function(e){return this.postCore({body:JSON.stringify(e)})},t.prototype.getSiteScripts=function(){return this.clone(t,"GetSiteScripts",!0).execute({})},t.prototype.createSiteScript=function(e,n,r){return i(this,void 0,void 0,function(){return a(this,function(o){switch(o.label){case 0:return[4,this.clone(t,"CreateSiteScript(Title=@title,Description=@desc)?@title='"+encodeURIComponent(e)+"'&@desc='"+encodeURIComponent(n)+"'").execute(r)];case 1:return[2,o.sent()]}})})},t.prototype.getSiteScriptMetadata=function(e){return i(this,void 0,void 0,function(){return a(this,function(n){switch(n.label){case 0:return[4,this.clone(t,"GetSiteScriptMetadata").execute({id:e})];case 1:return[2,n.sent()]}})})},t.prototype.deleteSiteScript=function(e){return i(this,void 0,void 0,function(){return a(this,function(n){switch(n.label){case 0:return[4,this.clone(t,"DeleteSiteScript").execute({id:e})];case 1:return n.sent(),[2]}})})},t.prototype.updateSiteScript=function(e,n){return i(this,void 0,void 0,function(){return a(this,function(r){switch(r.label){case 0:return n&&(e.Content=JSON.stringify(n)),[4,this.clone(t,"UpdateSiteScript").execute({updateInfo:e})];case 1:return[2,r.sent()]}})})},t.prototype.getSiteScriptFromList=function(e){return i(this,void 0,void 0,function(){return a(this,function(n){switch(n.label){case 0:return[4,this.clone(t,"GetSiteScriptFromList").execute({listUrl:e})];case 1:return[2,n.sent()]}})})},t.prototype.getSiteScriptFromWeb=function(e,n){return i(this,void 0,void 0,function(){return a(this,function(r){switch(r.label){case 0:return[4,this.clone(t,"getSiteScriptFromWeb").execute({webUrl:e,info:n})];case 1:return[2,r.sent()]}})})},t}(x),Pt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}r(t,e),n=t,t.prototype.add=function(e,t,r,o,i,a){void 0===r&&(r=""),void 0===o&&(o="STS"),void 0===i&&(i=1033),void 0===a&&(a=!0);var s={Description:r,Language:i,Title:e,Url:t,UseSamePermissionsAsParentSite:a,WebTemplate:o},c=Object(y.n)({parameters:Object(y.f)({__metadata:{type:"SP.WebCreationInformation"}},s)});return this.clone(n,"add").postCore({body:c}).then(function(e){return{data:e,web:new _t(u(e).replace(/_api\/web\/?/i,""))}})};var n;return t=n=o([h("webs")],t)}(j),It=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t=o([h("webinfos")],t)}(j),_t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}r(t,e),n=t,t.fromUrl=function(e,t){return new n(s(e),t)},Object.defineProperty(t.prototype,"webs",{get:function(){return new Pt(this)},enumerable:!0,configurable:!0}),t.prototype.getParentWeb=function(){var e=this;return this.select("ParentWeb/Id").expand("ParentWeb").get().then(function(t){var n=t.ParentWeb;return n?new ht(e.parentUrl).openWebById(n.Id):null})},t.prototype.getSubwebsFilteredForCurrentUser=function(e,t){return void 0===e&&(e=-1),void 0===t&&(t=-1),this.clone(Pt,"getSubwebsFilteredForCurrentUser(nWebTemplateFilter="+e+",nConfigurationFilter="+t+")")},Object.defineProperty(t.prototype,"allProperties",{get:function(){return this.clone(R,"allproperties")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"webinfos",{get:function(){return new It(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"contentTypes",{get:function(){return new Pe(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lists",{get:function(){return new qe(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fields",{get:function(){return new Ue(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"features",{get:function(){return new pt(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"availablefields",{get:function(){return new Ue(this,"availablefields")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"navigation",{get:function(){return new mt(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"siteUsers",{get:function(){return new A(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"siteGroups",{get:function(){return new M(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"siteUserInfoList",{get:function(){return new He(this,"siteuserinfolist")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"regionalSettings",{get:function(){return new vt(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"currentUser",{get:function(){return new L(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"folders",{get:function(){return new we(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"userCustomActions",{get:function(){return new Be(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"roleDefinitions",{get:function(){return new q(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"relatedItems",{get:function(){return bt.FromUrl(this.toUrl())},enumerable:!0,configurable:!0}),t.prototype.createBatch=function(){return new lt(this.parentUrl)},Object.defineProperty(t.prototype,"rootFolder",{get:function(){return new Ce(this,"rootFolder")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"associatedOwnerGroup",{get:function(){return new F(this,"associatedownergroup")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"associatedMemberGroup",{get:function(){return new F(this,"associatedmembergroup")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"associatedVisitorGroup",{get:function(){return new F(this,"associatedvisitorgroup")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"defaultDocumentLibrary",{get:function(){return new He(this,"DefaultDocumentLibrary")},enumerable:!0,configurable:!0}),t.prototype.getFolderById=function(e){return new Ce(this,"getFolderById('"+e+"')")},t.prototype.getFolderByServerRelativeUrl=function(e){return new Ce(this,"getFolderByServerRelativeUrl('"+e+"')")},t.prototype.getFolderByServerRelativePath=function(e){return new Ce(this,"getFolderByServerRelativePath(decodedUrl='"+e+"')")},t.prototype.getFileById=function(e){return new tt(this,"getFileById('"+e+"')")},t.prototype.getFileByServerRelativeUrl=function(e){return new tt(this,"getFileByServerRelativeUrl('"+e+"')")},t.prototype.getFileByServerRelativePath=function(e){return new tt(this,"getFileByServerRelativePath(decodedUrl='"+e+"')")},t.prototype.getList=function(e){return new He(this,"getList('"+e+"')")},t.prototype.update=function(e){var t=this,n=Object(y.n)(Object(y.f)({__metadata:{type:"SP.Web"}},e));return this.postCore({body:n,headers:{"X-HTTP-Method":"MERGE"}}).then(function(e){return{data:e,web:t}})},t.prototype.delete=function(){return e.prototype.deleteCore.call(this)},t.prototype.applyTheme=function(e,t,r,o){var i=Object(y.n)({backgroundImageUrl:r,colorPaletteUrl:e,fontSchemeUrl:t,shareGenerated:o});return this.clone(n,"applytheme").postCore({body:i})},t.prototype.applyWebTemplate=function(e){var t=this.clone(n,"applywebtemplate");return t.concat("(@t)"),t.query.set("@t",e),t.postCore()},t.prototype.ensureUser=function(e){var t=Object(y.n)({logonName:e});return this.clone(n,"ensureuser").postCore({body:t}).then(function(e){return{data:e,user:new k(u(e))}})},t.prototype.availableWebTemplates=function(e,t){return void 0===e&&(e=1033),void 0===t&&(t=!0),new j(this,"getavailablewebtemplates(lcid="+e+", doincludecrosslanguage="+t+")")},t.prototype.getCatalog=function(e){return this.clone(n,"getcatalog("+e+")").select("Id").get().then(function(e){return new He(u(e))})},t.prototype.getChanges=function(e){var t=Object(y.n)({query:Object(y.f)({__metadata:{type:"SP.ChangeQuery"}},e)});return this.clone(n,"getchanges").postCore({body:t})},Object.defineProperty(t.prototype,"customListTemplate",{get:function(){return new j(this,"getcustomlisttemplates")},enumerable:!0,configurable:!0}),t.prototype.getUserById=function(e){return new k(this,"getUserById("+e+")")},t.prototype.mapToIcon=function(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=""),this.clone(n,"maptoicon(filename='"+e+"', progid='"+r+"', size="+t+")").get()},t.prototype.getStorageEntity=function(e){return this.clone(n,"getStorageEntity('"+e+"')").get()},t.prototype.setStorageEntity=function(e,t,r,o){return void 0===r&&(r=""),void 0===o&&(o=""),this.clone(n,"setStorageEntity").postCore({body:Object(y.n)({comments:o,description:r,key:e,value:t})})},t.prototype.removeStorageEntity=function(e){return this.clone(n,"removeStorageEntity('"+e+"')").postCore()},t.prototype.getAppCatalog=function(e){return new ut(e||this)},t.prototype.getSiteCollectionAppCatalog=function(e){return new ut(e||this,"_api/web/sitecollectionappcatalog/AvailableApps")},t.prototype.getClientSideWebParts=function(){return this.clone(j,"GetClientSideWebParts").get()},t.prototype.addClientSidePage=function(e,t){return void 0===t&&(t=e.replace(/\.[^\/.]+$/,"")),Nt.create(this,e,t)},t.prototype.addClientSidePageByPath=function(e,t){return void 0===t&&(t=e.replace(/\.[^\/.]+$/,"")),Nt.create(this,e,t)},t.prototype.createDefaultAssociatedGroups=function(e,t,r){var o=this.clone(n,"createDefaultAssociatedGroups(userLogin=@u,userLogin2=@v,groupNameSeed=@s)");return o.query.set("@u","'"+encodeURIComponent(e||"")+"'"),o.query.set("@v","'"+encodeURIComponent(t||"")+"'"),o.query.set("@s","'"+encodeURIComponent(r||"")+"'"),o.postCore()},t.prototype.hubSiteData=function(e){return void 0===e&&(e=!1),i(this,void 0,void 0,function(){return a(this,function(t){return[2,this.clone(n,"hubSiteData("+e+")").get().then(function(e){return JSON.parse(e)})]})})},t.prototype.syncHubSiteTheme=function(){return this.clone(n,"syncHubSiteTheme").postCore()},t.prototype.getSiteDesignRuns=function(e){return new wt(this,"").getSiteDesignRun(void 0,e)},t.prototype.getSiteScript=function(e){return new Ct(this,"").getSiteScriptFromWeb(void 0,e)},t.prototype.addSiteDesignTask=function(e){return new wt(this,"").addSiteDesignTaskToCurrentWeb(e)},t.prototype.getSiteDesignRunStatus=function(e){return new wt(this,"").getSiteDesignRunStatus(void 0,e)};var n;return t=n=o([h("_api/web")],t)}(fe);!function(e){e[e.NotPromoted=0]="NotPromoted",e[e.PromoteOnPublish=1]="PromoteOnPublish",e[e.Promoted=2]="Promoted"}(st||(st={}));var Et,Nt=function(e){function t(n,r,o,i,a,u){void 0===i&&(i=!1),void 0===a&&(a=[]),void 0===u&&(u=!1);var c=e.call(this,n,r)||this;return c.json=o,c.sections=a,c.commentsDisabled=u,c._bannerImageDirty=!1,"string"==typeof n?(c._parentUrl="",c._url=Object(y.d)(s(n),r)):c.extend(t.initFrom(n,null),r),c._pageSettings={controlType:0,pageSettingsSlice:{isDefaultDescription:!0,isDefaultThumbnail:!0}},c._layoutPart=t.getDefaultLayoutPart(),void 0===o||i||c.fromJSON(o),c}return r(t,e),t.create=function(e,n,r,o,s){return void 0===o&&(o="Article"),void 0===s&&(s=0),i(this,void 0,void 0,function(){var i,u;return a(this,function(a){switch(a.label){case 0:return n=n.replace(/\.aspx$/i,""),[4,t.initFrom(e,"_api/sitepages/pages").postCore({body:Object(y.n)(Object.assign(d("SP.Publishing.SitePage"),{PageLayoutType:o,PromotedState:s}))})];case 1:return i=a.sent(),u=new t(e,"",i),u.title=n,[4,u.save(!1)];case 2:return a.sent(),u.title=r,[2,u]}})})},t.fromFile=function(e){return e.getItem().then(function(n){return new t(s(e.toUrl()),"",{Id:n.Id},!0).configureFrom(e).load()})},t.getDefaultLayoutPart=function(){return{dataVersion:"1.4",description:"Title Region Description",id:"cbe7b0a9-3504-44dd-a3a3-0e5cacd07788",instanceId:"cbe7b0a9-3504-44dd-a3a3-0e5cacd07788",properties:{authors:[],layoutType:"FullWidthImage",showPublishDate:!1,showTopicHeader:!1,textAlignment:"Left",title:"",topicHeader:""},serverProcessedContent:{htmlStrings:{},searchablePlainTexts:{},imageSources:{},links:{}},title:"Title area"}},t.initFrom=function(e,n){return new t(s(e.toUrl()),n).configureFrom(e)},Object.defineProperty(t.prototype,"pageLayout",{get:function(){return this.json.PageLayoutType},set:function(e){this.json.PageLayoutType=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bannerImageUrl",{get:function(){return this.json.BannerImageUrl},set:function(e){this.json.BannerImageUrl=e,this._bannerImageDirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bannerImageSourceType",{get:function(){return this._layoutPart.properties.imageSourceType},set:function(e){this._layoutPart.properties.imageSourceType=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"topicHeader",{get:function(){return Object(y.q)(this.json.TopicHeader)?this.json.TopicHeader:""},set:function(e){this.json.TopicHeader=e,this._layoutPart.properties.topicHeader=e,Object(y.r)(e)&&(this.showTopicHeader=!1)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"title",{get:function(){return this._layoutPart.properties.title},set:function(e){this.json.Title=e,this._layoutPart.properties.title=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"layoutType",{get:function(){return this._layoutPart.properties.layoutType},set:function(e){this._layoutPart.properties.layoutType=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"headerTextAlignment",{get:function(){return this._layoutPart.properties.textAlignment},set:function(e){this._layoutPart.properties.textAlignment=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"showTopicHeader",{get:function(){return this._layoutPart.properties.showTopicHeader},set:function(e){this._layoutPart.properties.showTopicHeader=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"showPublishDate",{get:function(){return this._layoutPart.properties.showPublishDate},set:function(e){this._layoutPart.properties.showPublishDate=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasVerticalSection",{get:function(){return this.sections.findIndex(function(e){return 2===e.layoutIndex})>-1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"verticalSection",{get:function(){return this.hasVerticalSection?this.addVerticalSection():null},enumerable:!0,configurable:!0}),t.prototype.addSection=function(){var e=new xt(this,f(this.sections),1);return this.sections.push(e),e},t.prototype.addVerticalSection=function(){var e=this.sections.findIndex(function(e){return 2===e.layoutIndex});if(e>-1)return this.sections[e];var t=new xt(this,f(this.sections),2);return this.sections.push(t),t},t.prototype.fromJSON=function(e){this.json=e;var t=JSON.parse(e.CanvasContent1),n=JSON.parse(e.LayoutWebpartsContent);return n&&n.length>0&&(this._layoutPart=n[0]),this.setControls(t),this},t.prototype.load=function(){var e=this;return this.getItem("Id","CommentsDisabled").then(function(t){return new x(e,"_api/sitepages/pages("+t.Id+")").get().then(function(n){return e.commentsDisabled=t.CommentsDisabled,e.fromJSON(n)})})},t.prototype.save=function(e){var n=this;if(void 0===e&&(e=!0),null===this.json.Id)throw Error("The id for this page is null. If you want to create a new page, please use ClientSidePage.Create");var r=Promise.resolve({});return this._bannerImageDirty&&(r=r.then(function(e){return new Promise(function(e,t){var r=n.json.BannerImageUrl;Object(y.m)(r)&&(r=r.replace(/^https?:\/\/[a-z0-9\.]*?\.[a-z]{2,3}\//i,"/"));var o=new ht(s(n.toUrl())),i=new _t(s(n.toUrl())),a=i.getFileByServerRelativePath(r),u="",c="",l="",p="",d="";Promise.all([o.select("Id","Url").get().then(function(e){return u=e.Id}),i.select("Id","Url").get().then(function(e){c=e.Id,d=e.Url}),a.listItemAllFields.select("UniqueId","ParentList/Id").expand("ParentList").get().then(function(e){l=e.UniqueId,p=e.ParentList.Id})]).then(function(){var t=new x(d,"_layouts/15/getpreview.ashx");t.query.set("guidSite",""+u),t.query.set("guidWeb",""+c),t.query.set("guidFile",""+l),n.bannerImageUrl=t.toUrlAndQuery(),Object(y.q)(n._layoutPart.serverProcessedContent)||(n._layoutPart.serverProcessedContent={}),n._layoutPart.serverProcessedContent.imageSources={imageSource:r},Object(y.q)(n._layoutPart.serverProcessedContent.customMetadata)||(n._layoutPart.serverProcessedContent.customMetadata={}),n._layoutPart.serverProcessedContent.customMetadata.imageSource={listId:p,siteId:u,uniqueId:l,webId:c},n._layoutPart.properties.webId=c,n._layoutPart.properties.siteId=u,n._layoutPart.properties.listId=p,n._layoutPart.properties.uniqueId=l,e()}).catch(t)})})),this.json.IsPageCheckedOutToCurrentUser||(r=r.then(function(e){return t.initFrom(n,"_api/sitepages/pages("+n.json.Id+")/checkoutpage").postCore()})),r=r.then(function(e){var r=Object.assign(d("SP.Publishing.SitePage"),{AuthorByline:n.json.AuthorByline||[],BannerImageUrl:n.bannerImageUrl,CanvasContent1:n.getCanvasContent1(),LayoutWebpartsContent:n.getLayoutWebpartsContent(),Title:n.title,TopicHeader:n.topicHeader}),o=t.initFrom(n,"_api/sitepages/pages("+n.json.Id+")/savepage");return o.configure({headers:{"if-match":"*"}}),o.postCore({body:Object(y.n)(r)})}),e&&(r=r.then(function(e){return t.initFrom(n,"_api/sitepages/pages("+n.json.Id+")/publish").postCore()}).then(function(e){e&&(n.json.IsPageCheckedOutToCurrentUser=!1)})),r=r.then(function(e){n._bannerImageDirty=!1})},t.prototype.discardPageCheckout=function(){return i(this,void 0,void 0,function(){var e;return a(this,function(n){switch(n.label){case 0:if(null===this.json.Id)throw Error("The id for this page is null. If you want to create a new page, please use ClientSidePage.Create");return[4,t.initFrom(this,"_api/sitepages/pages("+this.json.Id+")/discardPage").postCore({body:Object(y.n)(d("SP.Publishing.SitePage"))})];case 1:return e=n.sent(),this.fromJSON(e),[2]}})})},t.prototype.promoteToNews=function(){return i(this,void 0,void 0,function(){return a(this,function(e){return[2,this.promoteNewsImpl("promoteToNews")]})})},t.prototype.enableComments=function(){var e=this;return this.setCommentsOn(!0).then(function(t){return e.commentsDisabled=!1,t})},t.prototype.disableComments=function(){var e=this;return this.setCommentsOn(!1).then(function(t){return e.commentsDisabled=!0,t})},t.prototype.findControlById=function(e){return this.findControl(function(t){return t.id===e})},t.prototype.findControl=function(e){for(var t=0;t3?{}:{zoneEmphasis:e}},t.prototype.setCommentsOn=function(e){return this.getItem().then(function(t){return new ze(t,"SetCommentsDisabled("+!e+")").update({})})},t.prototype.promoteNewsImpl=function(e){return i(this,void 0,void 0,function(){var n,r;return a(this,function(o){switch(o.label){case 0:return Object(y.r)(this.json.VersionInfo.LastVersionCreatedBy)?(n=new Date(this.json.VersionInfo.LastVersionCreated),n.getFullYear()<2e3?[4,this.save(!0)]:[3,2]):[3,2];case 1:o.sent(),o.label=2;case 2:if(null===this.json.Id)throw Error("The id for this page is null. If you want to create a new page, please use ClientSidePage.Create");return[4,t.initFrom(this,"_api/sitepages/pages("+this.json.Id+")/"+e).postCore({body:Object(y.n)(d("SP.Publishing.SitePage"))})];case 3:return r=o.sent(),[2,r]}})})},t.prototype.mergePartToTree=function(e,t){var n=null,r=12,o=0,i=0,a=1;t&&(Object(y.j)(t,"zoneIndex")&&(i=t.zoneIndex),Object(y.j)(t,"sectionIndex")&&(o=t.sectionIndex),Object(y.j)(t,"sectionFactor")&&(r=t.sectionFactor),Object(y.j)(t,"layoutIndex")&&(a=t.layoutIndex));var s=e.data&&e.data.emphasis&&e.data.emphasis.zoneEmphasis?e.data.emphasis.zoneEmphasis:0,u=this.getOrCreateSection(i,a,s),c=u.columns.filter(function(e){return e.order===o});n=c.length<1?u.addColumn(r,a):c[0],e.column=n,n.addControl(e)},t.prototype.mergeColumnToTree=function(e){var t=Object(y.j)(e.data,"position")&&Object(y.j)(e.data.position,"zoneIndex")?e.data.position.zoneIndex:0,n=Object(y.j)(e.data,"position")&&Object(y.j)(e.data.position,"layoutIndex")?e.data.position.layoutIndex:1,r=this.getOrCreateSection(t,n,e.data.emphasis.zoneEmphasis||0);e.section=r,r.columns.push(e)},t.prototype.getOrCreateSection=function(e,t,n){var r=null,o=this.sections.filter(function(n){return n.order===e&&n.layoutIndex===t});return o.length<1?(r=2===t?this.addVerticalSection():this.addSection(),r.order=e,r.emphasis=n):r=o[0],r},t.prototype.getItem=function(){for(var e=this,n=[],r=0;r")||(e="

"+e+"

"),this.data.innerHTML=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"order",{get:function(){return this.data.position.controlIndex},set:function(e){this.data.position.controlIndex=e},enumerable:!0,configurable:!0}),t.prototype.onColumnChange=function(e){this.data.position.sectionFactor=e.factor,this.data.position.controlIndex=f(e.controls),this.data.position.zoneIndex=e.data.position.zoneIndex,this.data.position.sectionIndex=e.order,this.data.position.layoutIndex=e.data.position.layoutIndex},t.Default={addedFromPersistedData:!1,anchorComponentId:"",controlType:4,displayMode:2,editorType:"CKEditor",emphasis:{},id:"",innerHTML:"",position:{controlIndex:1,layoutIndex:1,sectionFactor:12,sectionIndex:1,zoneIndex:1}},t}(Rt),Ut=function(e){function t(n){return void 0===n&&(n=JSON.parse(JSON.stringify(t.Default))),e.call(this,n)||this}return r(t,e),t.fromComponentDef=function(e){var n=new t;return n.import(e),n},Object.defineProperty(t.prototype,"title",{get:function(){return this.data.webPartData.title},set:function(e){this.data.webPartData.title=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"description",{get:function(){return this.data.webPartData.description},set:function(e){this.data.webPartData.description=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"order",{get:function(){return this.data.position.controlIndex},set:function(e){this.data.position.controlIndex=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.data.reservedHeight},set:function(e){this.data.reservedHeight=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.data.reservedWidth},set:function(e){this.data.reservedWidth=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dataVersion",{get:function(){return this.data.webPartData.dataVersion},set:function(e){this.data.webPartData.dataVersion=e},enumerable:!0,configurable:!0}),t.prototype.setProperties=function(e){return this.data.webPartData.properties=Object(y.f)(this.data.webPartData.properties,e),this},t.prototype.getProperties=function(){return this.data.webPartData.properties},t.prototype.onColumnChange=function(e){this.data.position={controlIndex:f(e.controls),layoutIndex:e.data.position.layoutIndex,sectionFactor:e.factor,sectionIndex:e.data.position.sectionIndex,zoneIndex:e.data.position.zoneIndex}},t.prototype.import=function(e){var t=Object(y.h)(),n=e.Id.replace(/^\{|\}$/g,"").toLowerCase(),r=JSON.parse(e.Manifest),o=r.preconfiguredEntries[0];this.setData(Object.assign({},this.data,{id:t,webPartData:{dataVersion:"1.0",description:o.description.default,id:n,instanceId:t,properties:o.properties,title:o.title.default},webPartId:n}))},t.Default={addedFromPersistedData:!1,controlType:3,displayMode:2,emphasis:{},id:null,position:{controlIndex:1,layoutIndex:1,sectionFactor:12,sectionIndex:1,zoneIndex:1},reservedHeight:500,reservedWidth:500,webPartData:null,webPartId:null},t}(Rt),kt=(new Map([["text","Querytext"],["template","QueryTemplate"],["sourceId","SourceId"],["trimDuplicatesIncludeId",""],["startRow",""],["rowLimit",""],["rankingModelId",""],["rowsPerPage",""],["selectProperties",""],["culture",""],["timeZoneId",""],["refinementFilters",""],["refiners",""],["hiddenConstraints",""],["sortList",""],["timeout",""],["hithighlightedProperties",""],["clientType",""],["personalizationData",""],["resultsURL",""],["queryTag",""],["properties",""],["queryTemplatePropertiesUrl",""],["reorderingRules",""],["hitHighlightedMultivaluePropertyLimit",""],["collapseSpecification",""],["uiLanguage",""],["desiredSnippetLength",""],["maxSnippetLength",""],["summaryLength",""]]),new Map([]),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.execute=function(e){var t=this,n=this.parseQuery(e),r=Object(y.n)({request:Object(y.f)(d("Microsoft.Office.Server.Search.REST.SearchRequest"),Object.assign({},n,{HitHighlightedProperties:this.fixArrProp(n.HitHighlightedProperties),Properties:this.fixArrProp(n.Properties),RefinementFilters:this.fixArrProp(n.RefinementFilters),ReorderingRules:this.fixArrProp(n.ReorderingRules),SelectProperties:this.fixArrProp(n.SelectProperties),SortList:this.fixArrProp(n.SortList)}))});if(this._useCaching){this._forceCaching=!0;var o="PnPjs.SearchWithCaching("+Object(y.i)(r)+")";Object(y.q)(this._cachingOptions)?/\/_api\/search\/postquery$/i.test(this._cachingOptions.key)&&(this._cachingOptions.key=o):this._cachingOptions=new v.c(o)}return this.postCore({body:r}).then(function(e){return new Lt(e,t.toUrl(),n)})},t.prototype.fixArrProp=function(e){return void 0===e?{results:[]}:(e=Object(y.k)(e)?e:[e],Object(y.j)(e,"results")?e:{results:e})},t.prototype.parseQuery=function(e){return"string"==typeof e?{Querytext:e}:e.toSearchQuery?e.toSearchQuery():e},t=o([h("_api/search/postquery")],t)}(R)),Lt=function(){function e(e,t,n,r,o){void 0===r&&(r=null),void 0===o&&(o=null),this._url=t,this._query=n,this._raw=r,this._primary=o,this._raw=e.postquery?e.postquery:e}return Object.defineProperty(e.prototype,"ElapsedTime",{get:function(){return this.RawSearchResults.ElapsedTime},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"RowCount",{get:function(){return this.RawSearchResults.PrimaryQueryResult.RelevantResults.RowCount},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"TotalRows",{get:function(){return this.RawSearchResults.PrimaryQueryResult.RelevantResults.TotalRows},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"TotalRowsIncludingDuplicates",{get:function(){return this.RawSearchResults.PrimaryQueryResult.RelevantResults.TotalRowsIncludingDuplicates},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"RawSearchResults",{get:function(){return this._raw},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"PrimarySearchResults",{get:function(){return null===this._primary&&(this._primary=this.formatSearchResults(this._raw.PrimaryQueryResult.RelevantResults.Table.Rows)),this._primary},enumerable:!0,configurable:!0}),e.prototype.getPage=function(e,t){if(this.TotalRowsthis.TotalRows?Promise.resolve(null):new kt(this._url,null).execute(r)},e.prototype.formatSearchResults=function(e){for(var t=new Array,n=e.results?e.results:e,r=0,o=n;r0&&(n.properties=Object(y.f)(n.properties,{To:{results:e.To}})),e.CC&&e.CC.length>0&&(n.properties=Object(y.f)(n.properties,{CC:{results:e.CC}})),e.BCC&&e.BCC.length>0&&(n.properties=Object(y.f)(n.properties,{BCC:{results:e.BCC}})),e.AdditionalHeaders&&(n.properties=Object(y.f)(n.properties,{AdditionalHeaders:e.AdditionalHeaders})),this.clone(t,"SendEmail",!0).excute(n)},t.prototype.getCurrentUserEmailAddresses=function(){return this.clone(t,"GetCurrentUserEmailAddresses",!0).excute({}).then(function(e){return Object(y.j)(e,"GetCurrentUserEmailAddresses")?e.GetCurrentUserEmailAddresses:e})},t.prototype.resolvePrincipal=function(e,n,r,o,i,a){void 0===a&&(a=!1);var s={addToUserInfoList:i,input:e,inputIsEmailOnly:o,matchUserInfoList:a,scopes:n,sources:r};return this.clone(t,"ResolvePrincipalInCurrentContext",!0).excute(s).then(function(e){return Object(y.j)(e,"ResolvePrincipalInCurrentContext")?e.ResolvePrincipalInCurrentContext:e})},t.prototype.searchPrincipals=function(e,n,r,o,i){var a={groupName:o,input:e,maxCount:i,scopes:n,sources:r};return this.clone(t,"SearchPrincipalsUsingContextWeb",!0).excute(a).then(function(e){return Object(y.j)(e,"SearchPrincipalsUsingContextWeb")?e.SearchPrincipalsUsingContextWeb:e})},t.prototype.createEmailBodyForInvitation=function(e){var n={pageAddress:e};return this.clone(t,"CreateEmailBodyForInvitation",!0).excute(n).then(function(e){return Object(y.j)(e,"CreateEmailBodyForInvitation")?e.CreateEmailBodyForInvitation:e})},t.prototype.expandGroupsToPrincipals=function(e,n){void 0===n&&(n=30);var r={inputs:e,maxCount:n};return this.clone(t,"ExpandGroupsToPrincipals",!0).excute(r).then(function(e){return Object(y.j)(e,"ExpandGroupsToPrincipals")?e.ExpandGroupsToPrincipals:e})},t.prototype.createWikiPage=function(e){return this.clone(t,"CreateWikiPageInContextWeb",!0).excute({parameters:e}).then(function(e){return{data:Object(y.j)(e,"CreateWikiPageInContextWeb")?e.CreateWikiPageInContextWeb:e,file:new tt(u(e))}})},t.prototype.containsInvalidFileFolderChars=function(e,n){return void 0===n&&(n=!1),n?(t.InvalidFileFolderNameCharsOnPremiseRegex.lastIndex=0,t.InvalidFileFolderNameCharsOnPremiseRegex.test(e)):(t.InvalidFileFolderNameCharsOnlineRegex.lastIndex=0,t.InvalidFileFolderNameCharsOnlineRegex.test(e))},t.prototype.stripInvalidFileFolderChars=function(e,n,r){return void 0===n&&(n=""),void 0===r&&(r=!1),r?e.replace(t.InvalidFileFolderNameCharsOnPremiseRegex,n):e.replace(t.InvalidFileFolderNameCharsOnlineRegex,n)},t.InvalidFileFolderNameCharsOnlineRegex=/["*:<>?\/\\|\x00-\x1f\x7f-\x9f]/g,t.InvalidFileFolderNameCharsOnPremiseRegex=/["#%*:<>?\/\\|\x00-\x1f\x7f-\x9f]/g,t}(x),Xt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.getById=function(e){return new Yt(this,"GetById?hubSiteId='"+e+"'")},t=o([h("_api/hubsites")],t)}(j),Yt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t}(R),$t=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t=""),this._options=e,this._baseUrl=t}return e.prototype.configure=function(t,n){return void 0===n&&(n=""),new e(t,n)},e.prototype.setup=function(e){l(e)},e.prototype.searchSuggest=function(e){var t;return t="string"==typeof e?{querytext:e}:e,this.create(Bt).execute(t)},e.prototype.search=function(e){return this.create(kt).execute(e)},e.prototype.searchWithCaching=function(e,t){return this.create(kt).usingCaching(t).execute(e)},Object.defineProperty(e.prototype,"site",{get:function(){return this.create(ht)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"web",{get:function(){return this.create(_t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"profiles",{get:function(){return this.create(Gt)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"social",{get:function(){return this.create(Wt)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"navigation",{get:function(){return this.create(yt)},enumerable:!0,configurable:!0}),e.prototype.createBatch=function(){return this.web.createBatch()},Object.defineProperty(e.prototype,"utility",{get:function(){return this.create(Jt,"")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"siteScripts",{get:function(){return this.create(Ct,"")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"siteDesigns",{get:function(){return this.create(wt,"")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hubSites",{get:function(){return this.create(Xt)},enumerable:!0,configurable:!0}),e.prototype.getTenantAppCatalogWeb=function(){var e=this;return this.create(_t,"_api/SP_TenantSettings_Current").get().then(function(t){return new _t(t.CorporateCatalogUrl).configure(e._options)})},e.prototype.create=function(e,t){return new e(this._baseUrl,t).configure(this._options)},e}(),Zt=new $t}).call(t,n(1))},function(e,t,n){"use strict";(function(e){function r(e,t){function n(){this.constructor=e}w(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function o(e,t){for(var n=[],r=2;r0&&(n=60*this.defaultTimeoutMinutes),t=i(new Date,"second",n)}return f({pnp:1,expiration:t,value:e})},e.prototype.cacheExpirationHandler=function(){var e=this;this.deleteExpired().then(function(t){setTimeout(o(e,e.cacheExpirationHandler),R.cacheExpirationIntervalMilliseconds)}).catch(function(e){console.error(e)})},e}(),U=function(){function e(e){void 0===e&&(e=new Map),this._store=e}return Object.defineProperty(e.prototype,"length",{get:function(){return this._store.size},enumerable:!0,configurable:!0}),e.prototype.clear=function(){this._store.clear()},e.prototype.getItem=function(e){return this._store.get(e)},e.prototype.key=function(e){return Array.from(this._store)[e][0]},e.prototype.removeItem=function(e){this._store.delete(e)},e.prototype.setItem=function(e,t){this._store.set(e,t)},e}(),k=function(){function e(e,t){void 0===e&&(e=null),void 0===t&&(t=null),this._local=e,this._session=t}return Object.defineProperty(e.prototype,"local",{get:function(){return null===this._local&&(this._local=this.getStore("local")),this._local},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"session",{get:function(){return null===this._session&&(this._session=this.getStore("session")),this._session},enumerable:!0,configurable:!0}),e.prototype.getStore=function(e){return new A("local"===e?"undefined"==typeof localStorage?new U:localStorage:"undefined"==typeof sessionStorage?new U:sessionStorage)},e}()}).call(t,n(1))},function(e,t,n){"use strict";n.d(t,"a",function(){return o});/** * @license * v1.3.11 * MIT (https://github.com/pnp/pnpjs/blob/master/LICENSE) * Copyright (c) 2020 Microsoft * docs: https://pnp.github.io/pnpjs/ * source: https://github.com/pnp/pnpjs * bugs: https://github.com/pnp/pnpjs/issues */ var r,o=function(){function e(){}return Object.defineProperty(e,"activeLogLevel",{get:function(){return e.instance.activeLogLevel},set:function(t){e.instance.activeLogLevel=t},enumerable:!0,configurable:!0}),Object.defineProperty(e,"instance",{get:function(){return void 0!==e._instance&&null!==e._instance||(e._instance=new i),e._instance},enumerable:!0,configurable:!0}),e.subscribe=function(){for(var t=[],n=0;n=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},p=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}u((r=r.apply(e,t||[])).next())})},d=this&&this.__generator||function(e,t){function n(e){return function(t){return r([e,t])}}function r(n){if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,i&&(a=i[2&n[0]?"return":n[0]?"throw":"next"])&&!(a=a.call(i,n[1])).done)return a;switch(i=0,a&&(n=[0,a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,i=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]-1},n.prototype.getCachedToken=function(e){if(!this._hasResource(e))return null;var t=this._getItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+e),n=this._getItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+e),r=this.config.expireOffsetSeconds||300;return n&&n>this._now()+r?t:(this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+e,""),this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+e,0),null)},n.prototype.getCachedUser=function(){if(this._user)return this._user;var e=this._getItem(this.CONSTANTS.STORAGE.IDTOKEN);return this._user=this._createUser(e),this._user},n.prototype.registerCallback=function(e,t,n){this._activeRenewals[t]=e,this._callBacksMappedToRenewStates[e]||(this._callBacksMappedToRenewStates[e]=[]);var r=this;this._callBacksMappedToRenewStates[e].push(n),this._callBackMappedToRenewStates[e]||(this._callBackMappedToRenewStates[e]=function(n,o,i,a){r._activeRenewals[t]=null;for(var s=0;s-1)){var t=this._user.profile.upn.split("@");e+="&domain_hint="+encodeURIComponent(t[t.length-1])}return e},n.prototype._createUser=function(e){var t=null,n=this._extractIdToken(e);return n&&n.hasOwnProperty("aud")&&(n.aud.toLowerCase()===this.config.clientId.toLowerCase()?(t={userName:"",profile:n},n.hasOwnProperty("upn")?t.userName=n.upn:n.hasOwnProperty("email")&&(t.userName=n.email)):this.warn("IdToken has invalid aud field")),t},n.prototype._getHash=function(e){return e.indexOf("#/")>-1?e=e.substring(e.indexOf("#/")+2):e.indexOf("#")>-1&&(e=e.substring(1)),e},n.prototype.isCallback=function(e){e=this._getHash(e);var t=this._deserialize(e);return t.hasOwnProperty(this.CONSTANTS.ERROR_DESCRIPTION)||t.hasOwnProperty(this.CONSTANTS.ACCESS_TOKEN)||t.hasOwnProperty(this.CONSTANTS.ID_TOKEN)},n.prototype.getLoginError=function(){return this._getItem(this.CONSTANTS.STORAGE.LOGIN_ERROR)},n.prototype.getRequestInfo=function(e){e=this._getHash(e);var t=this._deserialize(e),n={valid:!1,parameters:{},stateMatch:!1,stateResponse:"",requestType:this.REQUEST_TYPE.UNKNOWN};if(t&&(n.parameters=t,t.hasOwnProperty(this.CONSTANTS.ERROR_DESCRIPTION)||t.hasOwnProperty(this.CONSTANTS.ACCESS_TOKEN)||t.hasOwnProperty(this.CONSTANTS.ID_TOKEN))){n.valid=!0;var r="";if(!t.hasOwnProperty("state"))return this.warn("No state returned"),n;if(this.verbose("State: "+t.state),r=t.state,n.stateResponse=r,this._matchState(n))return n;if(!n.stateMatch&&window.parent){n.requestType=this._requestType;for(var o=this._renewStates,i=0;i-1&&t+1-1)return null;if(this.config&&this.config.endpoints)for(var n in this.config.endpoints)if(e.indexOf(n)>-1)return this.config.endpoints[n];return e.indexOf("http://")>-1||e.indexOf("https://")>-1?this._getHostFromUri(e)===this._getHostFromUri(this.config.redirectUri)?this.config.loginResource:null:this.config.loginResource},n.prototype._getHostFromUri=function(e){var t=String(e).replace(/^(https?:)\/\//,"");return t=t.split("/")[0]},n.prototype.handleWindowCallback=function(e){if(null==e&&(e=window.location.hash),this.isCallback(e)){var t=null,n=!1;this._openedWindows.length>0&&this._openedWindows[this._openedWindows.length-1].opener&&this._openedWindows[this._openedWindows.length-1].opener._adalInstance?(t=this._openedWindows[this._openedWindows.length-1].opener._adalInstance,n=!0):window.parent&&window.parent._adalInstance&&(t=window.parent._adalInstance);var r,o,i=t.getRequestInfo(e),a=null;o=n||window.parent!==window?t._callBackMappedToRenewStates[i.stateResponse]:t.callback,t.info("Returned from redirect url"),t.saveTokenFromHash(i),i.requestType===this.REQUEST_TYPE.RENEW_TOKEN&&window.parent?(window.parent!==window?t.verbose("Window is in iframe, acquiring token silently"):t.verbose("acquiring token interactive in progress"),r=i.parameters[t.CONSTANTS.ACCESS_TOKEN]||i.parameters[t.CONSTANTS.ID_TOKEN],a=t.CONSTANTS.ACCESS_TOKEN):i.requestType===this.REQUEST_TYPE.LOGIN&&(r=i.parameters[t.CONSTANTS.ID_TOKEN],a=t.CONSTANTS.ID_TOKEN);var s=i.parameters[t.CONSTANTS.ERROR_DESCRIPTION],u=i.parameters[t.CONSTANTS.ERROR];try{o&&o(s,r,u,a)}catch(e){t.error("Error occurred in user defined callback function: "+e)}window.parent!==window||n||(t.config.navigateToLoginRequestUrl?window.location.href=t._getItem(t.CONSTANTS.STORAGE.LOGIN_REQUEST):window.location.hash="")}},n.prototype._getNavigateUrl=function(e,t){var n="common";this.config.tenant&&(n=this.config.tenant);var r=this.instance+n+"/oauth2/authorize"+this._serialize(e,this.config,t)+this._addLibMetadata();return this.info("Navigate url:"+r),r},n.prototype._extractIdToken=function(e){var t=this._decodeJwt(e);if(!t)return null;try{var n=t.JWSPayload,r=this._base64DecodeStringUrlSafe(n);return r?JSON.parse(r):(this.info("The returned id_token could not be base64 url safe decoded."),null)}catch(e){this.error("The returned id_token could not be decoded",e)}return null},n.prototype._base64DecodeStringUrlSafe=function(e){return e=e.replace(/-/g,"+").replace(/_/g,"/"),window.atob?decodeURIComponent(escape(window.atob(e))):decodeURIComponent(escape(this._decode(e)))},n.prototype._decode=function(e){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";e=String(e).replace(/=+$/,"");var n=e.length;if(n%4==1)throw new Error("The token to be decoded is not correctly encoded.");for(var r,o,i,a,s,u,c,l,p="",d=0;d>16&255,c=s>>8&255,p+=String.fromCharCode(u,c);break}if(d+1===n-1){s=r<<18|o<<12,u=s>>16&255,p+=String.fromCharCode(u);break}s=r<<18|o<<12|i<<6|a,u=s>>16&255,c=s>>8&255,l=255&s,p+=String.fromCharCode(u,c,l)}return p},n.prototype._decodeJwt=function(e){if(this._isEmpty(e))return null;var t=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/,n=t.exec(e);return!n||n.length<4?(this.warn("The returned id_token is not parseable."),null):{header:n[1],JWSPayload:n[2],JWSSig:n[3]}},n.prototype._convertUrlSafeToRegularBase64EncodedString=function(e){return e.replace("-","+").replace("_","/")},n.prototype._serialize=function(e,t,n){var r=[];if(null!==t){r.push("?response_type="+e),r.push("client_id="+encodeURIComponent(t.clientId)),n&&r.push("resource="+encodeURIComponent(n)),r.push("redirect_uri="+encodeURIComponent(t.redirectUri)),r.push("state="+encodeURIComponent(t.state)),t.hasOwnProperty("slice")&&r.push("slice="+encodeURIComponent(t.slice)),t.hasOwnProperty("extraQueryParameter")&&r.push(t.extraQueryParameter);var o=t.correlationId?t.correlationId:this._guid();r.push("client-request-id="+encodeURIComponent(o))}return r.join("&")},n.prototype._deserialize=function(e){var t,n=/\+/g,r=/([^&=]+)=([^&]*)/g,o=function(e){return decodeURIComponent(e.replace(n," "))},i={};for(t=r.exec(e);t;)i[o(t[1])]=o(t[2]),t=r.exec(e);return i},n.prototype._decimalToHex=function(e){for(var t=e.toString(16);t.length<2;)t="0"+t;return t},n.prototype._guid=function(){var e=window.crypto||window.msCrypto;if(e&&e.getRandomValues){var t=new Uint8Array(16);return e.getRandomValues(t),t[6]|=64,t[6]&=79,t[8]|=128,t[8]&=191,this._decimalToHex(t[0])+this._decimalToHex(t[1])+this._decimalToHex(t[2])+this._decimalToHex(t[3])+"-"+this._decimalToHex(t[4])+this._decimalToHex(t[5])+"-"+this._decimalToHex(t[6])+this._decimalToHex(t[7])+"-"+this._decimalToHex(t[8])+this._decimalToHex(t[9])+"-"+this._decimalToHex(t[10])+this._decimalToHex(t[11])+this._decimalToHex(t[12])+this._decimalToHex(t[13])+this._decimalToHex(t[14])+this._decimalToHex(t[15])}for(var n="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx",r="0123456789abcdef",o=0,i="",a=0;a<36;a++)"-"!==n[a]&&"4"!==n[a]&&(o=16*Math.random()|0),"x"===n[a]?i+=r[o]:"y"===n[a]?(o&=3,o|=8,i+=r[o]):i+=n[a];return i},n.prototype._expiresIn=function(e){return e||(e=3599),this._now()+parseInt(e,10)},n.prototype._now=function(){return Math.round((new Date).getTime()/1e3)},n.prototype._addAdalFrame=function(e){if(void 0!==e){this.info("Add adal frame to document:"+e);var t=document.getElementById(e);if(!t){if(document.createElement&&document.documentElement&&(window.opera||-1===window.navigator.userAgent.indexOf("MSIE 5.0"))){var n=document.createElement("iframe");n.setAttribute("id",e),n.setAttribute("aria-hidden","true"),n.style.visibility="hidden",n.style.position="absolute",n.style.width=n.style.height=n.borderWidth="0px",t=document.getElementsByTagName("body")[0].appendChild(n)}else document.body&&document.body.insertAdjacentHTML&&document.body.insertAdjacentHTML("beforeEnd",'');window.frames&&window.frames[e]&&(t=window.frames[e])}return t}},n.prototype._saveItem=function(e,t,n){if(this.config&&this.config.cacheLocation&&"localStorage"===this.config.cacheLocation){if(!this._supportsLocalStorage())return this.info("Local storage is not supported"),!1;if(n){var r=this._getItem(e)||"";localStorage.setItem(e,r+t+this.CONSTANTS.CACHE_DELIMETER)}else localStorage.setItem(e,t);return!0}return this._supportsSessionStorage()?(sessionStorage.setItem(e,t),!0):(this.info("Session storage is not supported"),!1)},n.prototype._getItem=function(e){return this.config&&this.config.cacheLocation&&"localStorage"===this.config.cacheLocation?this._supportsLocalStorage()?localStorage.getItem(e):(this.info("Local storage is not supported"),null):this._supportsSessionStorage()?sessionStorage.getItem(e):(this.info("Session storage is not supported"),null)},n.prototype._supportsLocalStorage=function(){try{return!!window.localStorage&&(window.localStorage.setItem("storageTest","A"),"A"==window.localStorage.getItem("storageTest")&&(window.localStorage.removeItem("storageTest"),!window.localStorage.getItem("storageTest")))}catch(e){return!1}},n.prototype._supportsSessionStorage=function(){try{return!!window.sessionStorage&&(window.sessionStorage.setItem("storageTest","A"),"A"==window.sessionStorage.getItem("storageTest")&&(window.sessionStorage.removeItem("storageTest"),!window.sessionStorage.getItem("storageTest")))}catch(e){return!1}},n.prototype._cloneConfig=function(e){if(null===e||"object"!=typeof e)return e;var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},n.prototype._addLibMetadata=function(){return"&x-client-SKU=Js&x-client-Ver="+this._libVersion()},n.prototype.log=function(e,t,n,r){if(e<=Logging.level){if(!Logging.piiLoggingEnabled&&r)return;var o=(new Date).toUTCString(),i="";i=this.config.correlationId?o+":"+this.config.correlationId+"-"+this._libVersion()+"-"+this.CONSTANTS.LEVEL_STRING_MAP[e]+" "+t:o+":"+this._libVersion()+"-"+this.CONSTANTS.LEVEL_STRING_MAP[e]+" "+t,n&&(i+="\nstack:\n"+n.stack),Logging.log(i)}},n.prototype.error=function(e,t){this.log(this.CONSTANTS.LOGGING_LEVEL.ERROR,e,t)},n.prototype.warn=function(e){this.log(this.CONSTANTS.LOGGING_LEVEL.WARN,e,null)},n.prototype.info=function(e){this.log(this.CONSTANTS.LOGGING_LEVEL.INFO,e,null)},n.prototype.verbose=function(e){this.log(this.CONSTANTS.LOGGING_LEVEL.VERBOSE,e,null)},n.prototype.errorPii=function(e,t){this.log(this.CONSTANTS.LOGGING_LEVEL.ERROR,e,t,!0)},n.prototype.warnPii=function(e){this.log(this.CONSTANTS.LOGGING_LEVEL.WARN,e,null,!0)},n.prototype.infoPii=function(e){this.log(this.CONSTANTS.LOGGING_LEVEL.INFO,e,null,!0)},n.prototype.verbosePii=function(e){this.log(this.CONSTANTS.LOGGING_LEVEL.VERBOSE,e,null,!0)},n.prototype._libVersion=function(){return"1.0.17"},void 0!==e&&e.exports&&(e.exports=n,e.exports.inject=function(e){return new n(e)}),n}()},function(e,t,n){"use strict";function r(e,t){function n(){this.constructor=e}g(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function o(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function i(e){return d.a.log({data:0===d.a.activeLogLevel?e.result:{},level:1,message:"["+e.requestId+"] ("+(new Date).getTime()+") Returning result from pipeline. Set logging to verbose to see data."}),Promise.resolve(e.result)}function a(e,t){return new Promise(function(n){e.result=t,e.hasResult=!0,n(e)})}function s(e){return e.pipeline.length>0?e.pipeline.shift()(e):Promise.resolve(e)}function u(e){e.pipeline.length<1&&d.a.write("["+e.requestId+"] ("+(new Date).getTime()+") Request pipeline contains no methods!",2);var t=s(e).then(function(e){return i(e)}).catch(function(e){throw d.a.error(e),e});return e.isBatched&&e.batch.addResolveBatchDependency(t),t}function c(e){return void 0===e&&(e=!1),function(t,n,r){var o=r.value;r.value=function(){for(var r=[],i=0;i0&&Object(p.j)(r[0],"hasResult")&&r[0].hasResult?(d.a.write("["+r[0].requestId+"] ("+(new Date).getTime()+") Skipping request pipeline method "+n+", existing result in pipeline.",0),Promise.resolve(r[0])):(d.a.write("["+r[0].requestId+"] ("+(new Date).getTime()+") Calling request pipeline method "+n+".",0),o.apply(t,r).then(function(e){return s(e)}))}}}function l(){return[w.logStart,w.caching,w.send,w.logEnd].slice(0)}n.d(t,"c",function(){return h}),n.d(t,"g",function(){return y}),n.d(t,"f",function(){return b}),n.d(t,"i",function(){return v}),n.d(t,"a",function(){return S}),n.d(t,"d",function(){return T}),n.d(t,"b",function(){return O}),n.d(t,"h",function(){return P}),n.d(t,"e",function(){return I});var p=n(3),d=n(4),h=function(){function e(e){this.key=e,this.expiration=Object(p.e)(new Date,"second",p.c.defaultCachingTimeoutSeconds),this.storeName=p.c.defaultCachingStore}return Object.defineProperty(e.prototype,"store",{get:function(){return"local"===this.storeName?e.storage.local:e.storage.session},enumerable:!0,configurable:!0}),e.storage=new p.b,e}(),f=function(){function e(e,t){this.parser=e,this.cacheOptions=t}return e.prototype.parse=function(e){var t=this;return this.parser.parse(e).then(function(e){return t.cacheData(e)})},e.prototype.cacheData=function(e){return null!==this.cacheOptions.store&&this.cacheOptions.store.put(this.cacheOptions.key,e,this.cacheOptions.expiration),e},e}(),g=function(e,t){return(g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},m=function(e){function t(t,n,r,o){void 0===r&&(r=n.status),void 0===o&&(o=n.statusText);var i=e.call(this,t)||this;return i.response=n,i.status=r,i.statusText=o,i.isHttpRequestError=!0,i}return r(t,e),t.init=function(e){return e.clone().text().then(function(n){return new t("Error making HttpClient request in queryable ["+e.status+"] "+e.statusText+" ::> "+n,e.clone())})},t}(Error),y=function(){function e(){this.rawJson={}}return e.prototype.parse=function(e){var t=this;return new Promise(function(n,r){t.handleError(e,r)&&t.parseImpl(e,n,r)})},e.prototype.parseImpl=function(e,t,n){var r=this;e.headers.has("Content-Length")&&0===parseFloat(e.headers.get("Content-Length"))||204===e.status?t({}):e.text().then(function(e){return e.replace(/\s/gi,"").length>0?JSON.parse(e):{}}).then(function(e){return t(r.parseODataJSON(e))}).catch(function(e){return n(e)})},e.prototype.handleError=function(e,t){return e.ok||m.init(e).then(t),e.ok},e.prototype.parseODataJSON=function(e){this.rawJson=e;var t=e;return Object(p.j)(e,"d")?t=Object(p.j)(e.d,"results")?e.d.results:e.d:Object(p.j)(e,"value")&&(t=e.value),t},e}(),b=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t}(y),v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.parseImpl=function(e,t){e.text().then(t)},t}(y),S=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.parseImpl=function(e,t){e.blob().then(t)},t}(y),T=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.parseImpl=function(e,t){e.json().then(t)},t}(y),O=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.parseImpl=function(e,t){Object(p.l)(e.arrayBuffer)?e.arrayBuffer().then(t):e.buffer().then(t)},t}(y),w=(function(e){function t(t){var n=e.call(this)||this;return n.parser=t,n}r(t,e),t.prototype.parseImpl=function(e,t){this.parser(e).then(t)}}(y),function(){function e(){}return e.logStart=function(e){return new Promise(function(t){d.a.log({data:1===d.a.activeLogLevel?{}:e,level:1,message:"["+e.requestId+"] ("+(new Date).getTime()+") Beginning "+e.verb+" request ("+e.requestAbsoluteUrl+")"}),t(e)})},e.caching=function(e){return new Promise(function(t){if(e.isCached){d.a.write("["+e.requestId+"] ("+(new Date).getTime()+") Caching is enabled for request, checking cache...",1);var n=new h(e.requestAbsoluteUrl.toLowerCase());if(void 0!==e.cachingOptions&&(n=Object(p.f)(n,e.cachingOptions)),null!==n.store){var r=n.store.get(n.key);if(null!==r)return d.a.log({data:1===d.a.activeLogLevel?{}:r,level:1,message:"["+e.requestId+"] ("+(new Date).getTime()+") Value returned from cache."}),Object(p.l)(e.batchDependency)&&e.batchDependency(),Object(p.j)(e.parser,"hydrate")&&(r=e.parser.hydrate(r)),a(e,r).then(function(e){return t(e)})}d.a.write("["+e.requestId+"] ("+(new Date).getTime()+") Value not found in cache.",1),e.parser=new f(e.parser,n)}return t(e)})},e.send=function(e){return new Promise(function(t,n){if(e.isBatched){var r=e.batch.add(e.requestAbsoluteUrl,e.verb,e.options,e.parser,e.requestId);Object(p.l)(e.batchDependency)&&e.batchDependency(),d.a.write("["+e.requestId+"] ("+(new Date).getTime()+") Batching request in batch "+e.batch.batchId+".",1),t(a(e,r))}else{d.a.write("["+e.requestId+"] ("+(new Date).getTime()+") Sending request.",1);var o=e.clientFactory(),i=Object(p.f)(e.options||{},{method:e.verb});o.fetch(e.requestAbsoluteUrl,i).then(function(t){return e.parser.parse(t)}).then(function(t){return a(e,t)}).then(function(e){return t(e)}).catch(function(e){return n(e)})}})},e.logEnd=function(e){return new Promise(function(t){e.isBatched?d.a.log({data:1===d.a.activeLogLevel?{}:e,level:1,message:"["+e.requestId+"] ("+(new Date).getTime()+") "+e.verb+" request will complete in batch "+e.batch.batchId+"."}):d.a.log({data:1===d.a.activeLogLevel?{}:e,level:1,message:"["+e.requestId+"] ("+(new Date).getTime()+") Completing "+e.verb+" request."}),t(e)})},o([c(!0)],e,"logStart",null),o([c()],e,"caching",null),o([c()],e,"send",null),o([c(!0)],e,"logEnd",null),e}()),C=function(){function e(){this._query=new Map,this._options={},this._url="",this._parentUrl="",this._useCaching=!1,this._cachingOptions=null,this._cloneParentWasCaching=!1,this._cloneParentCacheOptions=null,this._requestPipeline=null}return e.prototype.toUrl=function(){return this._url},e.prototype.concat=function(e){return this._url+=e,this},Object.defineProperty(e.prototype,"query",{get:function(){return this._query},enumerable:!0,configurable:!0}),e.prototype.configure=function(e){return Object(p.p)(this._options,e),this},e.prototype.configureFrom=function(e){return Object(p.p)(this._options,e._options),this},e.prototype.usingCaching=function(e){return p.c.globalCacheDisable||(this._useCaching=!0,void 0!==e&&(this._cachingOptions=e)),this},e.prototype.withPipeline=function(e){return this._requestPipeline=e.slice(0),this},e.prototype.getCore=function(e,t){return void 0===e&&(e=new T),void 0===t&&(t={}),this._cloneParentWasCaching&&this.usingCaching(this._cloneParentCacheOptions),this.reqImpl("GET",t,e)},e.prototype.postCore=function(e,t){return void 0===e&&(e={}),void 0===t&&(t=new T),this.reqImpl("POST",e,t)},e.prototype.patchCore=function(e,t){return void 0===e&&(e={}),void 0===t&&(t=new T),this.reqImpl("PATCH",e,t)},e.prototype.deleteCore=function(e,t){return void 0===e&&(e={}),void 0===t&&(t=new T),this.reqImpl("DELETE",e,t)},e.prototype.putCore=function(e,t){return void 0===e&&(e={}),void 0===t&&(t=new T),this.reqImpl("PUT",e,t)},e.prototype.reqImpl=function(e,t,n){var r=this;return void 0===t&&(t={}),this.getRequestPipeline(e,t,n).then(function(o){return r.toRequestContext(e,t,n,o)}).then(function(e){return u(e)})},e.prototype.append=function(e){this._url=Object(p.d)(this._url,e)},Object.defineProperty(e.prototype,"parentUrl",{get:function(){return this._parentUrl},enumerable:!0,configurable:!0}),e.prototype.extend=function(e,t){this._parentUrl=e._url,this._url=Object(p.d)(this._parentUrl,t||""),this.configureFrom(e)},e.prototype._clone=function(e,t){return e.configureFrom(this),this._useCaching&&(e._cloneParentWasCaching=!0,e._cloneParentCacheOptions=this._cachingOptions),e},e.prototype.getRequestPipeline=function(e,t,n){var r=this;return void 0===t&&(t={}),new Promise(function(e){e(Object(p.q)(r._requestPipeline)&&Object(p.k)(r._requestPipeline)?r._requestPipeline:l())})},e}(),P=function(e){function t(){var t=e.call(this)||this;return t._batch=null,t._batchDependency=null,t}return r(t,e),t.prototype.inBatch=function(e){if(null!==this.batch)throw Error("This query is already part of a batch.");return Object(p.q)(e)&&(this._batch=e),this},t.prototype.toUrl=function(){return this._url},t.prototype.get=function(e,t){return void 0===e&&(e=new b),void 0===t&&(t={}),this.getCore(e,t)},t.prototype.getCore=function(t,n){return void 0===t&&(t=new b),void 0===n&&(n={}),e.prototype.getCore.call(this,t,n)},t.prototype.postCore=function(t,n){return void 0===t&&(t={}),void 0===n&&(n=new b),e.prototype.postCore.call(this,t,n)},t.prototype.patchCore=function(t,n){return void 0===t&&(t={}),void 0===n&&(n=new b),e.prototype.patchCore.call(this,t,n)},t.prototype.deleteCore=function(t,n){return void 0===t&&(t={}),void 0===n&&(n=new b),e.prototype.deleteCore.call(this,t,n)},t.prototype.putCore=function(t,n){return void 0===t&&(t={}),void 0===n&&(n=new b),e.prototype.putCore.call(this,t,n)},t.prototype.reqImpl=function(t,n,r){return void 0===n&&(n={}),this.hasBatch&&(this._batchDependency=this.addBatchDependency()),e.prototype.reqImpl.call(this,t,n,r)},t.prototype.addBatchDependency=function(){return null!==this._batch?this._batch.addDependency():function(){return null}},Object.defineProperty(t.prototype,"hasBatch",{get:function(){return Object(p.q)(this._batch)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"batch",{get:function(){return this.hasBatch?this._batch:null},enumerable:!0,configurable:!0}),t.prototype._clone=function(t,n){return t=e.prototype._clone.call(this,t,n),n.includeBatch&&(t=t.inBatch(this._batch)),t},t}(C),I=function(){function e(e){void 0===e&&(e=Object(p.h)()),this._batchId=e,this._reqs=[],this._deps=[],this._rDeps=[]}return Object.defineProperty(e.prototype,"batchId",{get:function(){return this._batchId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"requests",{get:function(){return this._reqs},enumerable:!0,configurable:!0}),e.prototype.add=function(e,t,n,r,o){var i={id:o,method:t.toUpperCase(),options:n,parser:r,reject:null,resolve:null,url:e},a=new Promise(function(e,t){i.resolve=e,i.reject=t});return this._reqs.push(i),a},e.prototype.addDependency=function(){var e=function(){};return this._deps.push(new Promise(function(t){e=t})),e},e.prototype.addResolveBatchDependency=function(e){this._rDeps.push(e)},e.prototype.execute=function(){var e=this;return Promise.all(this._deps).then(function(){return Promise.all(e._deps)}).then(function(){return e.executeImpl()}).then(function(){return Promise.all(e._rDeps)}).then(function(){})},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r=function(){function e(e,t,n){this.level=t,this.id=e.Id,this.label=e.Name,this.hoverText=e.LocalCustomProperties._Sys_Nav_HoverText,this.pathDepth=e.PathDepth;var r=e.LocalCustomProperties._Sys_Nav_SimpleLinkUrl||e.LocalCustomProperties._Sys_Nav_TargetUrl;r&&(this.url=n&&0===r.indexOf("~sitecollection")?n+r.substring("~sitecollection".length):r),this.items=[]}return e.prototype.hasChildren=function(){return this.items&&this.items.length>0},e.prototype.command=function(){this.url&&(window.location.href=this.url)},e}()},function(e,t,n){"use strict";var r=n(14),o=(n.n(r),n(15)),i=(n.n(o),n(0)),a=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}u((r=r.apply(e,t||[])).next())})},s=this&&this.__generator||function(e,t){function n(e){return function(t){return r([e,t])}}function r(n){if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,i&&(a=i[2&n[0]?"return":n[0]?"throw":"next"])&&!(a=a.call(i,n[1])).done)return a;switch(i=0,a&&(n=[0,a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,i=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]",o=new Headers,o.append("accept","application/json"),o.append("content-type","application/xml"),a={headers:o,body:n},[4,this.context.spHttpClient.post(this.clientServiceUrl,r.SPHttpClient.configurations.v1,a)];case 2:return u=s.sent(),this.ensureSuccessfulResponse(u,"Term labels"),[4,u.json()];case 3:return c=s.sent(),l=c.find(function(e){return"SP.Taxonomy.Term"===e._ObjectType_}),l&&l.Labels&&l.Labels._Child_Items_&&(t=l.Labels._Child_Items_.map(function(e){return e.Value})),[3,5];case 4:return p=s.sent(),t=null,Object(i.a)(this.debug,"SPTermStorePickerService","Error reading term labels.",p),[3,5];case 5:return[2,t]}})})},e.prototype.getTermStores=function(){var e=this,t=new Headers;t.append("accept","application/json"),t.append("content-type","application/xml");var n={headers:t,body:''};return this.context.spHttpClient.post(this.clientServiceUrl,r.SPHttpClient.configurations.v1,n).then(function(t){return e.ensureSuccessfulResponse(t,"Term stores"),t.json().then(function(t){var n=t.filter(function(e){return"SP.Taxonomy.TermStore"===e._ObjectType_});return n.length>0?e.props.termsetNameOrID?n.map(function(t){var n=t.Groups._Child_Items_;if(e.props.termsetNameOrID){var r=e.props.termsetNameOrID;n=n.map(function(t){return t.TermSets._Child_Items_=t.TermSets._Child_Items_.filter(function(t){return t.Name===r||e.cleanGuid(t.Id).toLowerCase()===e.cleanGuid(r).toLowerCase()}),t})}return n=n.filter(function(e){return!e.IsSystemGroup}),n=n.filter(function(e){return e.TermSets._Child_Items_.length>0}),t.Groups._Child_Items_=n,t}):n:[]})})},e.prototype.getTermSet=function(){return a(this,void 0,void 0,function(){var e;return s(this,function(t){switch(t.label){case 0:return[4,this.getTermStores()];case 1:return e=t.sent(),[2,this.getTermSetId(e,this.props.termsetNameOrID)]}})})},e.prototype.getAllTerms=function(e,t,n,o,i){return void 0===o&&(o=!0),void 0===i&&(i=15),a(this,void 0,void 0,function(){var a,u,c,l,p,d,h,f=this;return s(this,function(s){switch(s.label){case 0:return a=e,this.isGuid(e)?[3,2]:[4,this.getTermStores()];case 1:if(u=s.sent(),!(c=this.getTermSetId(u,e)))return[2,null];a=this.cleanGuid(c.Id),s.label=2;case 2:return(l=this.getCachedTermSet(a,o))?[2,l]:(p=''+a+'',d=new Headers,d.append("accept","application/json"),d.append("content-type","application/xml"),h={headers:d,body:p},[2,this.context.spHttpClient.post(this.clientServiceUrl,r.SPHttpClient.configurations.v1,h).then(function(e){return f.ensureSuccessfulResponse(e,"Terms"),e.json().then(function(e){if(!Array.isArray(e))throw new Error("The taxonomy service returned an unexpected response.");var r=e.filter(function(e){return"SP.Taxonomy.TermSet"===e._ObjectType_});if(r.length>0){var s=r[0];s.Terms=[];var u=e.filter(function(e){return"SP.Taxonomy.TermCollection"===e._ObjectType_});if(u.length>0){var c=u[0]._Child_Items_;!0===t&&(c=c.filter(function(e){return!1===e.IsDeprecated})),!0===n&&(c=c.filter(function(e){return!0===e.IsAvailableForTagging})),c=c.map(function(e){return e.IsRoot?e.CustomSortOrderIndex=s.CustomSortOrder?s.CustomSortOrder.split(":").indexOf(f.cleanGuid(e.Id)):-1:e.CustomSortOrderIndex=e.Parent.CustomSortOrder?e.Parent.CustomSortOrder.split(":").indexOf(f.cleanGuid(e.Id)):-1,e.Id=f.cleanGuid(e.Id),e.PathDepth=e.PathOfTerm.split(";").length,e.TermSet={Id:f.cleanGuid(s.Id),Name:s.Name},e.Parent&&(e.ParentId=f.cleanGuid(e.Parent.Id)),e}),c.length>0&&(c=f.sortTerms(c),s.Terms=c)}try{if(o&&window.sessionStorage){var l=f.normalizeCacheMinutes(i),p={expiresAt:Date.now()+60*l*1e3,value:s};window.sessionStorage.setItem("MegaMenu:TermSet:v2:"+a,JSON.stringify(p))}}catch(e){}return s}return null})})])}})})},e.prototype.searchTermsByName=function(e){return this.searchTermsByTermSet(e)},e.prototype.searchTermsByTermId=function(e,t){return a(this,void 0,void 0,function(){var n,r,o,i,a,u,c;return s(this,function(s){switch(s.label){case 0:return n=this.props.useSessionStorage,r=this.getCachedPickerTerms(t,n),r?[2,this.searchTermsBySearchText(r,e)]:[3,1];case 1:return o=this.props,i=o.termsetNameOrID,a=o.hideDeprecatedTags,u=o.hideTagsNotAvailableForTagging,[4,this.getAllTermsByAnchorId(i,t,a,u,n)];case 2:if(c=s.sent())return[2,this.searchTermsBySearchText(c,e)];s.label=3;case 3:return[2,null]}})})},e.prototype.getAllTermsByAnchorId=function(e,t,n,r,o){return void 0===o&&(o=!0),a(this,void 0,void 0,function(){var i,a,u,c,l,p,d,h,f=this;return s(this,function(s){switch(s.label){case 0:return i=[],a=this.getCachedPickerTerms(t,o),a?[2,a]:[4,this.getAllTerms(e,n,r,o,this.props.cacheMinutes)];case 1:if(u=s.sent(),c=u.Terms,t){if(l=c.filter(function(e){return e.Id.toLowerCase()===t.toLowerCase()}).shift()){p=l.PathOfTerm+";",d=c.filter(function(e){return e.PathOfTerm.substring(0,p.length)===p&&e.Id!==l.Id}),d.forEach(function(e){i.push(f.convertTermToPickerTerm(e))});try{o&&window.sessionStorage&&(h={expiresAt:Date.now()+60*this.normalizeCacheMinutes(this.props.cacheMinutes)*1e3,value:i},window.sessionStorage.setItem("MegaMenu:PickerTerms:v2:"+t,JSON.stringify(h)))}catch(e){}}}else c.forEach(function(e){i.push(f.convertTermToPickerTerm(e))});return[2,i]}})})},e.prototype.cleanGuid=function(e){return void 0!==e?e.replace("/Guid(","").replace("/","").replace(")",""):""},e.prototype.getTermSetId=function(e,t){if(e&&e.length>0&&t){var n=e[0];if(n.Groups&&n.Groups._Child_Items_)for(var r=0,o=n.Groups._Child_Items_;r-1}):[]},e.prototype.searchTermsByTermSet=function(e){var t=this;return new Promise(function(n){t.getTermStores().then(function(o){var i=t.props.termsetNameOrID;if(!t.isGuid(i)){var a=t.getTermSetId(o,i);if(!a)return void n(null);i=t.cleanGuid(a.Id)}if(void 0===o||0===o.length)return void n(null);var s="de-de"===t.context.pageContext.cultureInfo.currentUICultureName?1031:1033,c={start:e,lcid:0!==s?s:t.context.pageContext.web.language,sspList:t.cleanGuid(o[0].Id),termSetList:i,anchorId:t.props.anchorId?t.props.anchorId:u,isSpanTermStores:!1,isSpanTermSets:!1,isIncludeUnavailable:!0===t.props.hideTagsNotAvailableForTagging,isIncludeDeprecated:!0===t.props.hideDeprecatedTags,isAddTerms:!1,isIncludePathData:!1,excludeKeyword:!1,excludedTermset:u},l=new Headers;l.append("accept","application/json"),l.append("content-type","application/json");var p={headers:l,body:JSON.stringify(c)};return t.context.spHttpClient.post(t.suggestionServiceUrl,r.SPHttpClient.configurations.v1,p).then(function(e){return e.json().then(function(e){var r=e.d.Groups;if(r&&r.length>0){var o=r[0].Suggestions;if(o.length>0){var i=o.map(function(e){return t.convertSuggestTermToPickerTerm(e)});return void n(i)}}n([])})})})})},e.prototype.isGuid=function(e){return/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(e)},e.prototype.sortTerms=function(e){for(var t=[],n=!0,r=1;n;){var i=e.filter(function(e){return e.PathDepth===r});if(i&&i.length>0){if(i=i.sort(this.sortTermByPath),1!==r){i=i.reverse();for(var a=0,s=i;at.PathOfTerm.toLowerCase()?1:0:e.CustomSortOrderIndext.CustomSortOrderIndex?1:0},e.prototype.convertTermToPickerTerm=function(e){return{key:this.cleanGuid(e.Id),name:e.Name,path:e.PathOfTerm,termSet:this.cleanGuid(e.TermSet.Id),termSetName:e.TermSet.Name}},e.prototype.convertSuggestTermToPickerTerm=function(e){var t="",n="";if(e.Paths&&e.Paths.length>0){var r=e.Paths[0].replace(/^\[/,"").replace(/\]$/,""),o=r.split(":");t=o.join(";")+";"+e.DefaultLabel,n=o[0]}return{key:this.cleanGuid(e.Id),name:e.DefaultLabel,path:t,termSet:u,termSetName:n}},e}();t.a=c},function(e,t){e.exports=r},function(e,t){e.exports=o},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r=function(){function e(){}return e.prototype.Get=function(e){return this[e]},e.prototype.Add=function(e,t){this[e]=t},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var r=n(0),o="MegaMenuRenderer",i=function(){function e(e,t){void 0===t&&(t=!1),this.menuItems=e,this.debug=t}return e.prototype.render=function(e){var t=this;this.dispose(),this._container=e,e.innerHTML="",e.id="CustomNavigation";var n=document.createElement("nav");n.id="Mega-Menu",n.className="mega-menu-main",n.setAttribute("aria-label","Hauptnavigation");var r=document.createElement("ul");r.className="mega-menu-top-level",this.menuItems.forEach(function(e){var n=t.createTopLevelItem(e);r.appendChild(n)}),n.appendChild(r),e.appendChild(n),this.attachEventListeners(),this.createScreenReaderAnnouncer()},e.prototype.dispose=function(){this._documentKeydownHandler&&(document.removeEventListener("keydown",this._documentKeydownHandler),this._documentKeydownHandler=void 0),this._documentClickHandler&&(document.removeEventListener("click",this._documentClickHandler),this._documentClickHandler=void 0),this._announcer&&this._announcer.parentElement&&this._announcer.parentElement.removeChild(this._announcer),this._announcer=void 0,this._container&&(this._container.innerHTML=""),this._container=void 0},e.prototype.createTopLevelItem=function(e){var t=document.createElement("li"),n=e.hasChildren()&&e.items&&e.items.length>0,r=this.isItemActive(e),o=this.isCurrentUrl(e.url);t.className=this.joinClasses("mega-menu-top-item",n?"has-children":void 0,r?"is-active":void 0,o?"is-current":void 0);var i=this.createTopLevelElement(e,n,r,o);if(t.appendChild(i),n){var a=this.createMegaMenu(e);t.appendChild(a)}return t},e.prototype.createTopLevelElement=function(e,t,n,r){var o;return e.url?(o=document.createElement("a"),o.href=e.url,o.className="menu-item-link"):(o=document.createElement("span"),o.className="menu-item-text",o.setAttribute("tabindex","0")),o.textContent=e.label,o.className=this.joinClasses(o.className,t?"menu-item-has-children":void 0,n?"is-active":void 0,r?"is-current":void 0),t&&(o.setAttribute("aria-haspopup","true"),o.setAttribute("aria-expanded","false")),r&&e.url&&o.setAttribute("aria-current","page"),e.hoverText&&(o.title=e.hoverText),o},e.prototype.createMegaMenu=function(e){var t=this,n=document.createElement("div");n.className="mega-menu",n.setAttribute("aria-expanded","false"),n.setAttribute("aria-label",e.label+" Unterkategorien");var r=document.createElement("div");return r.className="mega-menu-grid",r.style.setProperty("--megaMenuColumnCount",this.getColumnCount(e.items)),e.items&&e.items.forEach(function(e){var n=t.createCategorySection(e);r.appendChild(n)}),n.appendChild(r),n},e.prototype.createCategorySection=function(e){var t=this,n=document.createElement("div"),r=this.isItemActive(e),o=this.isCurrentUrl(e.url);n.className=this.joinClasses("mega-menu-category",r?"is-active":void 0,o?"is-current":void 0);var i=document.createElement("h3");if(i.className="mega-menu-category-title",e.url){var a=document.createElement("a");a.href=e.url,a.textContent=e.label,a.className=this.joinClasses(r?"is-active":void 0,o?"is-current":void 0),o&&a.setAttribute("aria-current","page"),e.hoverText&&(a.title=e.hoverText),i.appendChild(a)}else{var s=document.createElement("span");s.textContent=e.label,s.className=this.joinClasses(r?"is-active":void 0),e.hoverText&&(s.title=e.hoverText),i.appendChild(s)}if(n.appendChild(i),e.hasChildren()&&e.items&&e.items.length>0){var u=document.createElement("ul");u.className="mega-menu-links",e.items.forEach(function(e){var n=document.createElement("li"),r=document.createElement("a"),o=t.isItemActive(e),i=t.isCurrentUrl(e.url);n.className=t.joinClasses(o?"is-active":void 0,i?"is-current":void 0),r.href=e.url||"#",r.textContent=e.label,r.className=t.joinClasses(o?"is-active":void 0,i?"is-current":void 0),i&&e.url&&r.setAttribute("aria-current","page"),e.hoverText&&(r.title=e.hoverText),n.appendChild(r),u.appendChild(n)}),n.appendChild(u)}return n},e.prototype.attachEventListeners=function(){for(var e=document.querySelectorAll("#Mega-Menu > ul > li > a, #Mega-Menu > ul > li > .menu-item-text"),t=0;t ul > li > a, #Mega-Menu > ul > li > span");a||s||u||c||(Object(r.b)(n.debug,o,"Closing menu because focus left the navigation."),n.closeMegaMenu(e,t))},150)})},e.prototype.attachGlobalKeyboardNavigation=function(){var e=this;this._documentKeydownHandler=function(t){var n=document.activeElement;if("Escape"===t.key){var r=document.querySelector('.mega-menu[aria-expanded="true"]');if(r){var o=r.previousElementSibling;e.closeMegaMenu(o,r),o.focus()}}if("Tab"===t.key){if(!t.shiftKey){var i=n.closest("#Mega-Menu > ul > li > a, #Mega-Menu > ul > li > span");if(i){var a=i.closest("li"),s=a.querySelector(".mega-menu.js-open");if(s){t.preventDefault();var u=s.querySelector("a");return void(u&&u.focus())}}}if(t.shiftKey){var s=n.closest(".mega-menu");if(s&&s.classList.contains("js-open")){if(n===s.querySelectorAll("a")[0]){t.preventDefault();return void s.previousElementSibling.focus()}}}}},document.addEventListener("keydown",this._documentKeydownHandler)},e.prototype.attachGlobalClickOutsideHandler=function(){var e=this;this._documentClickHandler=function(t){var n=t.target;n&&"function"==typeof n.closest&&n.closest("#CustomNavigation")||document.querySelector(".mega-menu.js-open")&&(Object(r.b)(e.debug,o,"Closing menu because of outside click."),e.closeAllMegaMenus())},document.addEventListener("click",this._documentClickHandler)},e.prototype.openMegaMenu=function(e,t){this.closeAllMegaMenus(t),e.setAttribute("aria-expanded","true"),t.setAttribute("aria-expanded","true"),t.classList.add("js-open"),this.announce((e.textContent||"")+" geƶffnet"),Object(r.b)(this.debug,o,"Menu opened:",e.textContent)},e.prototype.closeMegaMenu=function(e,t){e.setAttribute("aria-expanded","false"),t.setAttribute("aria-expanded","false"),t.classList.remove("js-open"),this.announce((e.textContent||"")+" geschlossen"),Object(r.b)(this.debug,o,"Menu closed:",e.textContent)},e.prototype.toggleMegaMenu=function(e,t){"true"===e.getAttribute("aria-expanded")?this.closeMegaMenu(e,t):this.openMegaMenu(e,t)},e.prototype.closeAllMegaMenus=function(e){for(var t=document.querySelectorAll('#Mega-Menu > ul > li > a[aria-expanded="true"], #Mega-Menu > ul > li > span[aria-expanded="true"]'),n=0;nul,.mega-menu-top-level{margin:0 auto;max-width:var(--megaMenuPanelWidth,1280px);background-color:inherit;width:100%;box-sizing:border-box;list-style:none;padding:0 var(--megaMenuNavInlinePadding,8px);padding-inline-start:var(--megaMenuNavInlinePadding,8px);display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch;-ms-flex-pack:start;justify-content:flex-start;gap:0}.mega-menu-main>ul>li,.mega-menu-top-item{position:static;display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch;-ms-flex:0 0 auto;flex:0 0 auto;border-right:1px solid var(--megaMenuNavDividerColor,hsla(0,0%,100%,.22))}.mega-menu-main>ul>li:last-child,.mega-menu-top-item:last-child{border-right:0}.mega-menu-main>ul>li>.menu-item-text,.mega-menu-main>ul>li>a,.menu-item-link,.menu-item-text{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-height:var(--megaMenuTopNavHeight,34px);padding:0 var(--megaMenuItemInlinePadding,12px);color:var(--megaMenuNavTextColor,#fff);font-size:12px;font-weight:400;line-height:1;text-decoration:none;background:0 0;border:0;transition:background-color .14s ease,color .14s ease;outline:0;white-space:nowrap}.menu-item-text{cursor:pointer}.menu-item-has-children:after{content:"";width:5px;height:5px;margin-left:8px;border-right:1px solid currentColor;border-bottom:1px solid currentColor;transform:translateY(-1px) rotate(45deg);transition:transform .14s ease}.menu-item-has-children[aria-expanded=true]:after{transform:translateY(1px) rotate(-135deg)}.mega-menu-top-item.is-active>a,.mega-menu-top-item.is-active>span,.menu-item-link.is-active,.menu-item-text.is-active{background:var(--megaMenuNavOpenBackground,#728388)}.mega-menu-top-item.is-current>a,.mega-menu-top-item.is-current>span,.menu-item-link.is-current,.menu-item-text.is-current{font-weight:600}.mega-menu-main>ul>li:hover>.menu-item-text,.mega-menu-main>ul>li:hover>a,.mega-menu-main>ul>li>a[aria-expanded=true],.mega-menu-main>ul>li>span[aria-expanded=true],.menu-item-link:hover,.menu-item-text:hover{color:var(--megaMenuNavTextColor,#fff);background:var(--megaMenuNavHoverBackground,#6f8085)}.mega-menu-main>ul>li>a[aria-expanded=true],.mega-menu-main>ul>li>span[aria-expanded=true]{background:var(--megaMenuNavOpenBackground,#728388)}.mega-menu-main>ul>li>.menu-item-text:focus,.mega-menu-main>ul>li>a:focus,.menu-item-link:focus,.menu-item-text:focus{color:var(--megaMenuNavTextColor,#fff);background:var(--megaMenuNavOpenBackground,#728388);box-shadow:inset 0 0 0 2px hsla(0,0%,100%,.65)}.mega-menu{position:absolute;left:0;right:0;top:100%;display:none;visibility:hidden;opacity:0;mix-blend-mode:normal;border:1px solid var(--neutralLight,[theme:neutralLight,default:#eaeaea]);border-top:0;box-shadow:var(--megaMenuPanelShadow,0 14px 28px rgba(0,0,0,.18));max-height:calc(100vh - var(--megaMenuTopNavHeight,34px));isolation:isolate;overflow-y:auto;overflow-x:hidden;z-index:calc(var(--megaMenuZIndex,6000) + 1);transition:opacity .16s ease,visibility .16s ease}.mega-menu,.mega-menu-main>ul>li:hover .mega-menu,.mega-menu.js-open{background-color:#fff;background-color:var(--white,[theme:#fff,default:#fff]);background-image:none}.mega-menu-main>ul>li:hover .mega-menu,.mega-menu.js-open{visibility:visible;opacity:1;display:block}.mega-menu-grid{max-width:var(--megaMenuPanelWidth,1280px);background-color:inherit;margin:0 auto;display:-ms-grid;display:grid;-ms-grid-columns:(minmax(0,1fr)) [var];grid-template-columns:repeat(var(--megaMenuColumnCount,4),minmax(0,1fr));gap:0;-ms-grid-row-align:start;align-items:start}.mega-menu-category{min-width:0;padding:var(--megaMenuColumnPaddingY,16px) var(--megaMenuColumnPaddingX,18px) 14px;border-right:1px solid var(--neutralQuaternaryAlt,[theme:neutralQuaternaryAlt,default:#dadada])}.mega-menu-grid>.mega-menu-category:last-child{border-right:0}.mega-menu-category-title,.mega-menu-category>h3{margin:0 0 10px;padding:0;border:0}.mega-menu-category>h3>a,.mega-menu-category>h3>span{display:block;font-size:13px;font-weight:600;line-height:18px;text-decoration:none}.mega-menu-category.is-active>h3>a,.mega-menu-category.is-active>h3>span,.mega-menu-category>h3>a,.mega-menu-category>h3>a.is-active,.mega-menu-category>h3>span,.mega-menu-category>h3>span.is-active{color:var(--neutralPrimary,[theme:neutralPrimary,default:#333])}.mega-menu-category.is-current>h3>a,.mega-menu-category>h3>a.is-current{text-decoration:underline}.mega-menu-category>h3>a:hover{text-decoration:underline}.mega-menu-category>h3>a:focus,.mega-menu-category>h3>a:hover{color:var(--neutralPrimary,[theme:neutralPrimary,default:#333])}.mega-menu-category>h3>a:focus{background:var(--themeLighterAlt,[theme:themeLighterAlt,default:#eff6fc]);border-radius:2px;box-shadow:0 0 0 2px var(--themePrimary,[theme:themePrimary,default:#0078d7]);padding:1px 4px;margin:-1px -4px}.mega-menu-category ul,.mega-menu-links{list-style:none;margin:0;padding-inline-start:0}.mega-menu-category ul li,.mega-menu-links li{margin:0 0 6px}.mega-menu-category ul li:last-child,.mega-menu-links li:last-child{margin-bottom:0}.mega-menu-category ul li a,.mega-menu-links li a{display:block;margin:0;padding:1px 2px;border-radius:var(--megaMenuLinkRadius,2px);color:var(--neutralSecondary,[theme:neutralSecondary,default:#666]);font-size:12px;font-weight:400;line-height:18px;text-decoration:none;transition:background-color .14s ease,color .14s ease,box-shadow .14s ease}.mega-menu-category ul li.is-active>a,.mega-menu-category ul li a.is-active,.mega-menu-links li.is-active>a,.mega-menu-links li a.is-active{color:var(--neutralPrimary,[theme:neutralPrimary,default:#333])}.mega-menu-category ul li.is-current>a,.mega-menu-category ul li a.is-current,.mega-menu-links li.is-current>a,.mega-menu-links li a.is-current{color:var(--neutralPrimary,[theme:neutralPrimary,default:#333]);font-weight:600;text-decoration:underline}.mega-menu-category ul li a:hover,.mega-menu-links li a:hover{background:0 0;color:var(--neutralPrimary,[theme:neutralPrimary,default:#333]);text-decoration:underline}.mega-menu-category ul li a:focus,.mega-menu-links li a:focus{background:var(--themeLighterAlt,[theme:themeLighterAlt,default:#eff6fc]);color:var(--neutralPrimary,[theme:neutralPrimary,default:#333]);box-shadow:0 0 0 2px var(--themePrimary,[theme:themePrimary,default:#0078d7]);outline:0}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media (max-width:1024px){.mega-menu-grid{-ms-grid-columns:(minmax(200px,1fr)) [auto-fit];grid-template-columns:repeat(auto-fit,minmax(200px,1fr))}.mega-menu-category{padding:14px 16px 12px}}@media (max-width:767px){.mega-menu-main>ul,.mega-menu-top-level{padding:0 6px;padding-inline-start:6px;-ms-flex-wrap:wrap;flex-wrap:wrap}.mega-menu-main>ul>li,.mega-menu-top-item{border-right:0}.mega-menu-main>ul>li>.menu-item-text,.mega-menu-main>ul>li>a,.menu-item-link,.menu-item-text{min-height:36px;padding:0 10px;font-size:12px}.mega-menu{border-left:0;border-right:0}.mega-menu-grid{-ms-grid-columns:1fr;grid-template-columns:1fr}.mega-menu-category{padding:14px 12px;border-right:0;border-bottom:1px solid var(--neutralQuaternaryAlt,[theme:neutralQuaternaryAlt,default:#dadada])}.mega-menu-grid>.mega-menu-category:last-child{border-bottom:0}}@media (prefers-reduced-motion:reduce){.mega-menu,.mega-menu-category ul li a,.mega-menu-links li a,.mega-menu-main>ul>li>.menu-item-text,.mega-menu-main>ul>li>a,.menu-item-has-children:after,.menu-item-link,.menu-item-text,.skip-link{transition:none}}@media (prefers-contrast:high){.mega-menu-category>h3>a:focus,.mega-menu-category ul li a:focus,.mega-menu-links li a:focus,.mega-menu-main>ul>li>.menu-item-text:focus,.mega-menu-main>ul>li>a:focus,.menu-item-link:focus,.menu-item-text:focus{outline:2px solid;outline-offset:2px;box-shadow:none}}',""])},function(e,t){function n(e,t){var n=e[1]||"",o=e[3];if(!o)return n;if(t&&"function"==typeof btoa){var i=r(o);return[n].concat(o.sources.map(function(e){return"/*# sourceURL="+o.sourceRoot+e+" */"})).concat([i]).join("\n")}return[n].join("\n")}function r(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var r=n(t,e);return t[2]?"@media "+t[2]+"{"+r+"}":r}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},o=0;o0&&u(t)})}function s(){return setTimeout(function(){O.runState.flushTimer=0,a()},0)}function u(e,t){O.loadStyles?O.loadStyles(f(e).styleString,e):S?y(e,t):m(e)}function c(e){O.theme=e,d()}function l(e){void 0===e&&(e=3),3!==e&&2!==e||(p(O.registeredStyles),O.registeredStyles=[]),3!==e&&1!==e||(p(O.registeredThemableStyles),O.registeredThemableStyles=[])}function p(e){e.forEach(function(e){var t=e&&e.styleElement;t&&t.parentElement&&t.parentElement.removeChild(t)})}function d(){if(O.theme){for(var e=[],t=0,n=O.registeredThemableStyles;t0&&(l(1),u([].concat.apply([],e)))}}function h(e){return e&&(e=f(g(e)).styleString),e}function f(e){var t=O.theme,n=!1;return{styleString:(e||[]).map(function(e){var r=e.theme;if(r){n=!0;var o=t?t[r]:void 0,i=e.defaultValue||"inherit";return t&&!o&&console,o||i}return e.rawString}).join(""),themable:n}}function g(e){var t=[];if(e){for(var n=0,r=void 0;r=w.exec(e);){var o=r.index;o>n&&t.push({rawString:e.substring(n,o)}),t.push({theme:r[1],defaultValue:r[2]}),n=w.lastIndex}t.push({rawString:e.substring(n)})}return t}function m(e){var t=document.getElementsByTagName("head")[0],n=document.createElement("style"),r=f(e),o=r.styleString,i=r.themable;n.type="text/css",n.appendChild(document.createTextNode(o)),O.perf.count++,t.appendChild(n);var a={styleElement:n,themableStyle:e};i?O.registeredThemableStyles.push(a):O.registeredStyles.push(a)}function y(e,t){var n=document.getElementsByTagName("head")[0],r=O.registeredStyles,o=O.lastStyleElement,i=o?o.styleSheet:void 0,a=i?i.cssText:"",s=r[r.length-1],u=f(e).styleString;(!o||a.length+u.length>C)&&(o=document.createElement("style"),o.type="text/css",t?(n.replaceChild(o,t.styleElement),t.styleElement=o):n.appendChild(o),t||(s={styleElement:o,themableStyle:e},r.push(s))),o.styleSheet.cssText+=h(u),Array.prototype.push.apply(s.themableStyle,e),O.lastStyleElement=o}function b(){var e=!1;if("undefined"!=typeof document){var t=document.createElement("style");t.type="text/css",e=!!t.styleSheet}return e}var v=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n