diff --git a/dist/abc3361f-bb2d-491f-aba3-cd51c19a299b.manifest.json b/dist/abc3361f-bb2d-491f-aba3-cd51c19a299b.manifest.json deleted file mode 100644 index cce262c..0000000 --- a/dist/abc3361f-bb2d-491f-aba3-cd51c19a299b.manifest.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "id": "abc3361f-bb2d-491f-aba3-cd51c19a299b", - "alias": "MegaMenuApplicationCustomizer", - "componentType": "Extension", - "extensionType": "ApplicationCustomizer", - "version": "1.1.2", - "manifestVersion": 2, - "requiresCustomScript": false, - "loaderConfig": { - "entryModuleId": "mega-menu-application-customizer", - "internalModuleBaseUrls": [ - "https://localhost:4321/" - ], - "scriptResources": { - "mega-menu-application-customizer": { - "type": "path", - "path": "dist/mega-menu-application-customizer.js" - }, - "MegaMenuApplicationCustomizerStrings": { - "defaultPath": "lib/extensions/megaMenu/loc/en-us.js", - "type": "localizedPath", - "paths": { - "de-DE": "lib/extensions/megaMenu/loc/de-de.js", - "en-US": "lib/extensions/megaMenu/loc/en-us.js" - } - }, - "@microsoft/decorators": { - "type": "component", - "version": "1.4.1", - "id": "f97266fb-ccb7-430e-9384-4124d05295d3" - }, - "@microsoft/sp-application-base": { - "type": "component", - "version": "1.4.1", - "id": "4df9bb86-ab0a-4aab-ab5f-48bf167048fb" - }, - "@microsoft/sp-http": { - "type": "component", - "version": "1.4.1", - "id": "c07208f0-ea3b-4c1a-9965-ac1b825211a6" - }, - "@microsoft/sp-lodash-subset": { - "type": "component", - "version": "1.4.1", - "id": "73e1dc6c-8441-42cc-ad47-4bd3659f8a3a" - } - } - } -} \ No newline at end of file diff --git a/dist/mega-menu-application-customizer.js b/dist/mega-menu-application-customizer.js deleted file mode 100644 index bbfa882..0000000 --- a/dist/mega-menu-application-customizer.js +++ /dev/null @@ -1,11 +0,0 @@ -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;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, rgba(255, 255, 255, .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 rgba(255, 255, 255, .65) -} - -.mega-menu { - position: absolute; - left: 0; - right: 0; - top: 100%; - display: none; - visibility: hidden; - opacity: 0; - background-color: #fff; - background-color: var(--white, [theme:white, default: #fff]); - background-image: none; - 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-main>ul>li:hover .mega-menu, -.mega-menu.js-open { - visibility: visible; - opacity: 1; - display: block; - background-color: #fff; - background-color: var(--white, [theme:white, default: #fff]); - background-image: none -} - -.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; - color: var(--neutralPrimary, [theme:neutralPrimary, default: #333]); - 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.is-active, -.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 { - color: var(--neutralPrimary, [theme:neutralPrimary, default: #333]); - text-decoration: underline -} - -.mega-menu-category>h3>a:focus { - background: var(--themeLighterAlt, [theme:themeLighterAlt, default: #eff6fc]); - color: var(--neutralPrimary, [theme:neutralPrimary, default: #333]); - 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 a.is-active, -.mega-menu-category ul li.is-active>a, -.mega-menu-links li a.is-active, -.mega-menu-links li.is-active>a { - color: var(--neutralPrimary, [theme:neutralPrimary, default: #333]) -} - -.mega-menu-category ul li a.is-current, -.mega-menu-category ul li.is-current>a, -.mega-menu-links li a.is-current, -.mega-menu-links li.is-current>a { - 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 ul li a:focus, - .mega-menu-category>h3>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 - } -} \ No newline at end of file diff --git a/lib/extensions/megaMenu/MegaMenu.module.scss.d.ts b/lib/extensions/megaMenu/MegaMenu.module.scss.d.ts deleted file mode 100644 index e709b77..0000000 --- a/lib/extensions/megaMenu/MegaMenu.module.scss.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const styles: {}; -export default styles; diff --git a/lib/extensions/megaMenu/MegaMenu.module.scss.js b/lib/extensions/megaMenu/MegaMenu.module.scss.js deleted file mode 100644 index b864455..0000000 --- a/lib/extensions/megaMenu/MegaMenu.module.scss.js +++ /dev/null @@ -1,7 +0,0 @@ -/* tslint:disable */ -require('./MegaMenu.module.css'); -var styles = {}; -export default styles; -/* tslint:enable */ - -//# sourceMappingURL=MegaMenu.module.scss.js.map diff --git a/lib/extensions/megaMenu/MegaMenu.module.scss.js.map b/lib/extensions/megaMenu/MegaMenu.module.scss.js.map deleted file mode 100644 index 695083f..0000000 --- a/lib/extensions/megaMenu/MegaMenu.module.scss.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["extensions/megaMenu/MegaMenu.module.scss.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,OAAO,CAAC,uBAAuB,CAAC,CAAC;AACjC,IAAM,MAAM,GAAG,EACd,CAAC;AAEF,eAAe,MAAM,CAAC;AACtB,mBAAmB","file":"extensions/megaMenu/MegaMenu.module.scss.js","sourcesContent":["/* tslint:disable */\r\nrequire('./MegaMenu.module.css');\r\nconst styles = {\r\n};\r\n\r\nexport default styles;\r\n/* tslint:enable */"],"sourceRoot":"..\\..\\..\\src"} \ No newline at end of file diff --git a/lib/extensions/megaMenu/MegaMenuApplicationCustomizer.d.ts b/lib/extensions/megaMenu/MegaMenuApplicationCustomizer.d.ts deleted file mode 100644 index 602c936..0000000 --- a/lib/extensions/megaMenu/MegaMenuApplicationCustomizer.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { BaseApplicationCustomizer } from '@microsoft/sp-application-base'; -import './MegaMenu.module.scss'; -export declare const UserCustomActionMegaMenuId: string; -export interface IMegaMenuApplicationCustomizerProperties { - termSetName?: string; - termSetId?: string; - cacheMinutes?: number; - debug?: boolean; -} -export default class MegaMenuApplicationCustomizer extends BaseApplicationCustomizer { - private _topPlaceholder; - private _menuContainer; - private _renderer; - onInit(): Promise; - private _renderPlaceHolders(); - private _renderMegaMenu(termSetIdentifier, debug?); - private _getOrCreateContainer(id, placeholder); - private _onDispose; - private _getTermSetIdentifier(); - private _getCacheMinutes(); - private _renderStatus(message); - private _isGuid(value); - private _isDebugEnabled(debugOverride?); -} diff --git a/lib/extensions/megaMenu/MegaMenuApplicationCustomizer.js b/lib/extensions/megaMenu/MegaMenuApplicationCustomizer.js deleted file mode 100644 index 061bd2a..0000000 --- a/lib/extensions/megaMenu/MegaMenuApplicationCustomizer.js +++ /dev/null @@ -1,204 +0,0 @@ -// tslint:disable:max-line-length -// tslint:disable:match-default-export-name -// tslint:disable:typedef -// tslint:disable:variable-name -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [0, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -import { override } from '@microsoft/decorators'; -import { BaseApplicationCustomizer, PlaceholderName } from '@microsoft/sp-application-base'; -import * as strings from 'MegaMenuApplicationCustomizerStrings'; -import { TaxonomyNavigationService } from '../../services/TaxonomyNavigationService'; -import { MegaMenuRenderer } from './MegaMenuRenderer'; -import { debugError, debugLog, debugWarn } from '../../services/MegaMenuDebug'; -import './MegaMenu.module.scss'; -var LOG_SOURCE = 'MegaMenuApplicationCustomizer'; -export var UserCustomActionMegaMenuId = 'abc3361f-bb2d-491f-aba3-cd51c19a299b'; -var MegaMenuApplicationCustomizer = (function (_super) { - __extends(MegaMenuApplicationCustomizer, _super); - function MegaMenuApplicationCustomizer() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this._onDispose = function () { - _this.context.placeholderProvider.changedEvent.remove(_this, _this._renderPlaceHolders); - if (_this._renderer) { - _this._renderer.dispose(); - _this._renderer = undefined; - } - _this._menuContainer = undefined; - _this._topPlaceholder = undefined; - debugLog(_this._isDebugEnabled(), LOG_SOURCE, 'Disposed custom top placeholder.'); - }; - return _this; - } - MegaMenuApplicationCustomizer.prototype.onInit = function () { - debugLog(this._isDebugEnabled(), LOG_SOURCE, 'Initialized ' + strings.Title); - this.context.placeholderProvider.changedEvent.add(this, this._renderPlaceHolders); - this._renderPlaceHolders(); - return Promise.resolve(); - }; - MegaMenuApplicationCustomizer.prototype._renderPlaceHolders = function () { - var availablePlaceholders = this.context.placeholderProvider.placeholderNames - .map(function (name) { return PlaceholderName[name]; }) - .join(', '); - debugLog(this._isDebugEnabled(), LOG_SOURCE, 'Available placeholders:', availablePlaceholders); - if (!this._topPlaceholder) { - this._topPlaceholder = this.context.placeholderProvider.tryCreateContent(PlaceholderName.Top, { onDispose: this._onDispose }); - if (!this._topPlaceholder) { - debugError(this._isDebugEnabled(), LOG_SOURCE, 'The expected placeholder (Top) was not found.'); - return; - } - var termSetIdentifier = this._getTermSetIdentifier(); - if (!termSetIdentifier) { - debugWarn(this._isDebugEnabled(), LOG_SOURCE, 'No termSetId or termSetName configured. Mega Menu rendering is skipped.'); - this._renderStatus(strings.ConfigurationMissing); - return; - } - this._renderMegaMenu(termSetIdentifier); - } - }; - MegaMenuApplicationCustomizer.prototype._renderMegaMenu = function (termSetIdentifier, debug) { - if (debug === void 0) { debug = this._isDebugEnabled(); } - return __awaiter(this, void 0, void 0, function () { - var taxonomyService, menuItems, error_1; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (!this._topPlaceholder) { - return [2 /*return*/]; - } - _a.label = 1; - case 1: - _a.trys.push([1, 3, , 4]); - taxonomyService = new TaxonomyNavigationService(this.context, termSetIdentifier, debug, this._getCacheMinutes()); - return [4 /*yield*/, taxonomyService.getMenuItems()]; - case 2: - menuItems = _a.sent(); - if (this._renderer) { - this._renderer.dispose(); - } - this._renderer = new MegaMenuRenderer(menuItems, debug); - this._menuContainer = this._getOrCreateContainer('CustomHeader', this._topPlaceholder); - if (this._menuContainer) { - this._renderer.render(this._menuContainer); - } - else { - this._renderer.render(this._topPlaceholder.domElement); - } - debugLog(debug, LOG_SOURCE, 'MegaMenu rendered successfully with ' + menuItems.length + ' top-level items.'); - return [3 /*break*/, 4]; - case 3: - error_1 = _a.sent(); - debugError(debug, LOG_SOURCE, 'Error rendering MegaMenu.', error_1); - this._renderStatus(strings.LoadError); - return [3 /*break*/, 4]; - case 4: return [2 /*return*/]; - } - }); - }); - }; - MegaMenuApplicationCustomizer.prototype._getOrCreateContainer = function (id, placeholder) { - var container = document.getElementById(id); - if (container) { - var host = document.getElementById('MegaMenuHost'); - if (!host) { - host = document.createElement('div'); - host.id = 'MegaMenuHost'; - container.appendChild(host); - } - return host; - } - return placeholder.domElement; - }; - MegaMenuApplicationCustomizer.prototype._getTermSetIdentifier = function () { - var termSetId = this.properties && this.properties.termSetId - ? this.properties.termSetId.trim() - : ''; - if (termSetId && this._isGuid(termSetId)) { - return termSetId; - } - return this.properties && this.properties.termSetName - ? this.properties.termSetName.trim() - : ''; - }; - MegaMenuApplicationCustomizer.prototype._getCacheMinutes = function () { - var value = this.properties ? Number(this.properties.cacheMinutes) : 15; - return isFinite(value) ? Math.min(Math.max(Math.floor(value), 1), 1440) : 15; - }; - MegaMenuApplicationCustomizer.prototype._renderStatus = function (message) { - if (!this._topPlaceholder) { - return; - } - this._menuContainer = this._getOrCreateContainer('CustomHeader', this._topPlaceholder); - var container = this._menuContainer || this._topPlaceholder.domElement; - container.innerHTML = ''; - var status = document.createElement('div'); - status.className = 'mega-menu-status'; - status.setAttribute('role', 'status'); - status.textContent = message; - container.appendChild(status); - }; - MegaMenuApplicationCustomizer.prototype._isGuid = function (value) { - 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(value); - }; - MegaMenuApplicationCustomizer.prototype._isDebugEnabled = function (debugOverride) { - if (typeof debugOverride === 'boolean') { - return debugOverride; - } - return !!(this.properties && this.properties.debug === true); - }; - __decorate([ - override - ], MegaMenuApplicationCustomizer.prototype, "onInit", null); - return MegaMenuApplicationCustomizer; -}(BaseApplicationCustomizer)); -export default MegaMenuApplicationCustomizer; - -//# sourceMappingURL=MegaMenuApplicationCustomizer.js.map diff --git a/lib/extensions/megaMenu/MegaMenuApplicationCustomizer.js.map b/lib/extensions/megaMenu/MegaMenuApplicationCustomizer.js.map deleted file mode 100644 index bab5861..0000000 --- a/lib/extensions/megaMenu/MegaMenuApplicationCustomizer.js.map +++ /dev/null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IAAI,IAAI,CAAC,UAAU,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC;IAC/D,CAAC;IAjJD;QADC,QAAQ;+DAQR;IA2IH,oCAAC;CA1JD,AA0JC,CAzJS,yBAAyB,GAyJlC;eA1JoB,6BAA6B","file":"extensions/megaMenu/MegaMenuApplicationCustomizer.js","sourcesContent":["// tslint:disable:max-line-length\n// tslint:disable:match-default-export-name\n// tslint:disable:typedef\n// tslint:disable:variable-name\n\nimport { override } from '@microsoft/decorators';\nimport {\n BaseApplicationCustomizer,\n PlaceholderContent,\n PlaceholderName\n} from '@microsoft/sp-application-base';\n\nimport * as strings from 'MegaMenuApplicationCustomizerStrings';\nimport { TaxonomyNavigationService } from '../../services/TaxonomyNavigationService';\nimport { MegaMenuRenderer } from './MegaMenuRenderer';\nimport { IMenuItem } from '../../services/IMenuItem';\nimport { debugError, debugLog, debugWarn } from '../../services/MegaMenuDebug';\n\nimport './MegaMenu.module.scss';\n\nconst LOG_SOURCE: string = 'MegaMenuApplicationCustomizer';\nexport const UserCustomActionMegaMenuId: string = 'abc3361f-bb2d-491f-aba3-cd51c19a299b';\n\nexport interface IMegaMenuApplicationCustomizerProperties {\n termSetName?: string;\n termSetId?: string;\n cacheMinutes?: number;\n debug?: boolean;\n}\n\nexport default class MegaMenuApplicationCustomizer\n extends BaseApplicationCustomizer {\n\n private _topPlaceholder: PlaceholderContent | undefined;\n private _menuContainer: HTMLElement | undefined;\n private _renderer: MegaMenuRenderer | undefined;\n\n @override\n public onInit(): Promise {\n debugLog(this._isDebugEnabled(), LOG_SOURCE, 'Initialized ' + strings.Title);\n\n this.context.placeholderProvider.changedEvent.add(this, this._renderPlaceHolders);\n this._renderPlaceHolders();\n\n return Promise.resolve();\n }\n\n private _renderPlaceHolders(): void {\n const availablePlaceholders: string = this.context.placeholderProvider.placeholderNames\n .map(name => PlaceholderName[name])\n .join(', ');\n\n debugLog(this._isDebugEnabled(), LOG_SOURCE, 'Available placeholders:', availablePlaceholders);\n\n if (!this._topPlaceholder) {\n this._topPlaceholder = this.context.placeholderProvider.tryCreateContent(\n PlaceholderName.Top,\n { onDispose: this._onDispose }\n );\n\n if (!this._topPlaceholder) {\n debugError(this._isDebugEnabled(), LOG_SOURCE, 'The expected placeholder (Top) was not found.');\n return;\n }\n\n const termSetIdentifier: string = this._getTermSetIdentifier();\n if (!termSetIdentifier) {\n debugWarn(this._isDebugEnabled(), LOG_SOURCE, 'No termSetId or termSetName configured. Mega Menu rendering is skipped.');\n this._renderStatus(strings.ConfigurationMissing);\n return;\n }\n\n this._renderMegaMenu(termSetIdentifier);\n }\n }\n\n private async _renderMegaMenu(termSetIdentifier: string, debug: boolean = this._isDebugEnabled()): Promise {\n if (!this._topPlaceholder) {\n return;\n }\n\n try {\n const taxonomyService: TaxonomyNavigationService = new TaxonomyNavigationService(\n this.context,\n termSetIdentifier,\n debug,\n this._getCacheMinutes()\n );\n\n const menuItems: IMenuItem[] = await taxonomyService.getMenuItems();\n\n if (this._renderer) {\n this._renderer.dispose();\n }\n\n this._renderer = new MegaMenuRenderer(\n menuItems,\n debug\n );\n\n this._menuContainer = this._getOrCreateContainer('CustomHeader', this._topPlaceholder);\n\n if (this._menuContainer) {\n this._renderer.render(this._menuContainer);\n } else {\n this._renderer.render(this._topPlaceholder.domElement);\n }\n\n debugLog(debug, LOG_SOURCE, 'MegaMenu rendered successfully with ' + menuItems.length + ' top-level items.');\n } catch (error) {\n debugError(debug, LOG_SOURCE, 'Error rendering MegaMenu.', error);\n this._renderStatus(strings.LoadError);\n }\n }\n\n private _getOrCreateContainer(id: string, placeholder: PlaceholderContent): HTMLElement {\n const container = document.getElementById(id);\n\n if (container) {\n let host: HTMLElement = document.getElementById('MegaMenuHost');\n if (!host) {\n host = document.createElement('div');\n host.id = 'MegaMenuHost';\n container.appendChild(host);\n }\n return host;\n }\n\n return placeholder.domElement;\n }\n\n private _onDispose = (): void => {\n this.context.placeholderProvider.changedEvent.remove(this, this._renderPlaceHolders);\n if (this._renderer) {\n this._renderer.dispose();\n this._renderer = undefined;\n }\n this._menuContainer = undefined;\n this._topPlaceholder = undefined;\n debugLog(this._isDebugEnabled(), LOG_SOURCE, 'Disposed custom top placeholder.');\n }\n\n private _getTermSetIdentifier(): string {\n const termSetId: string = this.properties && this.properties.termSetId\n ? this.properties.termSetId.trim()\n : '';\n if (termSetId && this._isGuid(termSetId)) {\n return termSetId;\n }\n return this.properties && this.properties.termSetName\n ? this.properties.termSetName.trim()\n : '';\n }\n\n private _getCacheMinutes(): number {\n const value: number = this.properties ? Number(this.properties.cacheMinutes) : 15;\n return isFinite(value) ? Math.min(Math.max(Math.floor(value), 1), 1440) : 15;\n }\n\n private _renderStatus(message: string): void {\n if (!this._topPlaceholder) {\n return;\n }\n this._menuContainer = this._getOrCreateContainer('CustomHeader', this._topPlaceholder);\n const container: HTMLElement = this._menuContainer || this._topPlaceholder.domElement;\n container.innerHTML = '';\n const status: HTMLElement = document.createElement('div');\n status.className = 'mega-menu-status';\n status.setAttribute('role', 'status');\n status.textContent = message;\n container.appendChild(status);\n }\n\n private _isGuid(value: string): boolean {\n 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(value);\n }\n\n private _isDebugEnabled(debugOverride?: boolean): boolean {\n if (typeof debugOverride === 'boolean') {\n return debugOverride;\n }\n\n return !!(this.properties && this.properties.debug === true);\n }\n}\n"],"sourceRoot":"..\\..\\..\\src"} \ No newline at end of file diff --git a/lib/extensions/megaMenu/MegaMenuApplicationCustomizer.manifest.json b/lib/extensions/megaMenu/MegaMenuApplicationCustomizer.manifest.json deleted file mode 100644 index fd24ca2..0000000 --- a/lib/extensions/megaMenu/MegaMenuApplicationCustomizer.manifest.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "https://developer.microsoft.com/json-schemas/spfx/client-side-extension-manifest.schema.json", - - "id": "abc3361f-bb2d-491f-aba3-cd51c19a299b", - "alias": "MegaMenuApplicationCustomizer", - "componentType": "Extension", - "extensionType": "ApplicationCustomizer", - - // The "*" signifies that the version should be taken from the package.json - "version": "*", - "manifestVersion": 2, - - // If true, the component can only be installed on sites where Custom Script is allowed. - // Components that allow authors to embed arbitrary script code should set this to true. - // https://support.office.com/en-us/article/Turn-scripting-capabilities-on-or-off-1f2c515f-5d7e-448a-9fd7-835da935584f - "requiresCustomScript": false -} diff --git a/lib/extensions/megaMenu/MegaMenuRenderer.d.ts b/lib/extensions/megaMenu/MegaMenuRenderer.d.ts deleted file mode 100644 index ece7658..0000000 --- a/lib/extensions/megaMenu/MegaMenuRenderer.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { IMenuItem } from '../../services/IMenuItem'; -export declare class MegaMenuRenderer { - private menuItems; - private debug; - private static readonly hoverOpenDelayMs; - private static readonly hoverCloseDelayMs; - private _container; - private _documentKeydownHandler; - private _documentClickHandler; - private _announcer; - constructor(menuItems: IMenuItem[], debug?: boolean); - render(container: HTMLElement): void; - dispose(): void; - private createTopLevelItem(item); - private createTopLevelElement(item, hasChildren, isActive, isCurrent); - private createMegaMenu(parentItem); - private createCategorySection(item); - private attachEventListeners(); - private attachKeyboardNavigation(heading, megaMenu); - private attachMouseEvents(heading, megaMenu); - private attachFocusManagement(heading, megaMenu); - private attachGlobalKeyboardNavigation(); - private attachGlobalClickOutsideHandler(); - private openMegaMenu(trigger, menu); - private closeMegaMenu(trigger, menu); - private toggleMegaMenu(trigger, menu); - private closeAllMegaMenus(exceptMenu?); - private focusFirstLink(megaMenu); - private isItemActive(item); - private isCurrentUrl(url?); - private normalizePath(url?); - private getColumnCount(items?); - private joinClasses(...classNames); - private createScreenReaderAnnouncer(); - private announce(message); -} diff --git a/lib/extensions/megaMenu/MegaMenuRenderer.js b/lib/extensions/megaMenu/MegaMenuRenderer.js deleted file mode 100644 index 829524b..0000000 --- a/lib/extensions/megaMenu/MegaMenuRenderer.js +++ /dev/null @@ -1,470 +0,0 @@ -// tslint:disable:max-line-length -// tslint:disable:match-default-export-name -// tslint:disable:typedef -// tslint:disable:variable-name -import { debugLog } from '../../services/MegaMenuDebug'; -var LOG_SOURCE = 'MegaMenuRenderer'; -var MegaMenuRenderer = (function () { - function MegaMenuRenderer(menuItems, debug) { - if (debug === void 0) { debug = false; } - this.menuItems = menuItems; - this.debug = debug; - } - MegaMenuRenderer.prototype.render = function (container) { - var _this = this; - this.dispose(); - this._container = container; - container.innerHTML = ''; - container.id = 'CustomNavigation'; - var nav = document.createElement('nav'); - nav.id = 'Mega-Menu'; - nav.className = 'mega-menu-main'; - nav.setAttribute('aria-label', 'Hauptnavigation'); - var topLevelUl = document.createElement('ul'); - topLevelUl.className = 'mega-menu-top-level'; - this.menuItems.forEach(function (topLevelItem) { - var topLevelLi = _this.createTopLevelItem(topLevelItem); - topLevelUl.appendChild(topLevelLi); - }); - nav.appendChild(topLevelUl); - container.appendChild(nav); - this.attachEventListeners(); - this.createScreenReaderAnnouncer(); - }; - MegaMenuRenderer.prototype.dispose = function () { - if (this._documentKeydownHandler) { - document.removeEventListener('keydown', this._documentKeydownHandler); - this._documentKeydownHandler = undefined; - } - if (this._documentClickHandler) { - document.removeEventListener('click', this._documentClickHandler); - this._documentClickHandler = undefined; - } - if (this._announcer && this._announcer.parentElement) { - this._announcer.parentElement.removeChild(this._announcer); - } - this._announcer = undefined; - if (this._container) { - this._container.innerHTML = ''; - } - this._container = undefined; - }; - MegaMenuRenderer.prototype.createTopLevelItem = function (item) { - var li = document.createElement('li'); - var hasChildren = item.hasChildren() && item.items && item.items.length > 0; - var isActive = this.isItemActive(item); - var isCurrent = this.isCurrentUrl(item.url); - li.className = this.joinClasses('mega-menu-top-item', hasChildren ? 'has-children' : undefined, isActive ? 'is-active' : undefined, isCurrent ? 'is-current' : undefined); - var topElement = this.createTopLevelElement(item, hasChildren, isActive, isCurrent); - li.appendChild(topElement); - if (hasChildren) { - var megaMenu = this.createMegaMenu(item); - li.appendChild(megaMenu); - } - return li; - }; - MegaMenuRenderer.prototype.createTopLevelElement = function (item, hasChildren, isActive, isCurrent) { - var element; - if (item.url) { - element = document.createElement('a'); - element.href = item.url; - element.className = 'menu-item-link'; - } - else { - element = document.createElement('span'); - element.className = 'menu-item-text'; - element.setAttribute('tabindex', '0'); - } - element.textContent = item.label; - element.className = this.joinClasses(element.className, hasChildren ? 'menu-item-has-children' : undefined, isActive ? 'is-active' : undefined, isCurrent ? 'is-current' : undefined); - if (hasChildren) { - element.setAttribute('aria-haspopup', 'true'); - element.setAttribute('aria-expanded', 'false'); - } - if (isCurrent && item.url) { - element.setAttribute('aria-current', 'page'); - } - if (item.hoverText) { - element.title = item.hoverText; - } - return element; - }; - MegaMenuRenderer.prototype.createMegaMenu = function (parentItem) { - var _this = this; - var megaMenuDiv = document.createElement('div'); - megaMenuDiv.className = 'mega-menu'; - megaMenuDiv.setAttribute('aria-expanded', 'false'); - megaMenuDiv.setAttribute('aria-label', parentItem.label + ' Unterkategorien'); - var gridDiv = document.createElement('div'); - gridDiv.className = 'mega-menu-grid'; - gridDiv.style.setProperty('--megaMenuColumnCount', this.getColumnCount(parentItem.items)); - if (parentItem.items) { - parentItem.items.forEach(function (secondLevelItem) { - var categoryDiv = _this.createCategorySection(secondLevelItem); - gridDiv.appendChild(categoryDiv); - }); - } - megaMenuDiv.appendChild(gridDiv); - return megaMenuDiv; - }; - MegaMenuRenderer.prototype.createCategorySection = function (item) { - var _this = this; - var categoryDiv = document.createElement('div'); - var isActive = this.isItemActive(item); - var isCurrent = this.isCurrentUrl(item.url); - categoryDiv.className = this.joinClasses('mega-menu-category', isActive ? 'is-active' : undefined, isCurrent ? 'is-current' : undefined); - var h3 = document.createElement('h3'); - h3.className = 'mega-menu-category-title'; - if (item.url) { - var link = document.createElement('a'); - link.href = item.url; - link.textContent = item.label; - link.className = this.joinClasses(isActive ? 'is-active' : undefined, isCurrent ? 'is-current' : undefined); - if (isCurrent) { - link.setAttribute('aria-current', 'page'); - } - if (item.hoverText) { - link.title = item.hoverText; - } - h3.appendChild(link); - } - else { - var span = document.createElement('span'); - span.textContent = item.label; - span.className = this.joinClasses(isActive ? 'is-active' : undefined); - if (item.hoverText) { - span.title = item.hoverText; - } - h3.appendChild(span); - } - categoryDiv.appendChild(h3); - if (item.hasChildren() && item.items && item.items.length > 0) { - var ul_1 = document.createElement('ul'); - ul_1.className = 'mega-menu-links'; - item.items.forEach(function (thirdLevelItem) { - var li = document.createElement('li'); - var link = document.createElement('a'); - var isLinkActive = _this.isItemActive(thirdLevelItem); - var isLinkCurrent = _this.isCurrentUrl(thirdLevelItem.url); - li.className = _this.joinClasses(isLinkActive ? 'is-active' : undefined, isLinkCurrent ? 'is-current' : undefined); - link.href = thirdLevelItem.url || '#'; - link.textContent = thirdLevelItem.label; - link.className = _this.joinClasses(isLinkActive ? 'is-active' : undefined, isLinkCurrent ? 'is-current' : undefined); - if (isLinkCurrent && thirdLevelItem.url) { - link.setAttribute('aria-current', 'page'); - } - if (thirdLevelItem.hoverText) { - link.title = thirdLevelItem.hoverText; - } - li.appendChild(link); - ul_1.appendChild(li); - }); - categoryDiv.appendChild(ul_1); - } - return categoryDiv; - }; - MegaMenuRenderer.prototype.attachEventListeners = function () { - var headings = document.querySelectorAll('#Mega-Menu > ul > li > a, #Mega-Menu > ul > li > .menu-item-text'); - for (var i = 0; i < headings.length; i++) { - var heading = headings[i]; - var megaMenu = heading.nextElementSibling; - if (megaMenu && megaMenu.classList.contains('mega-menu')) { - this.attachKeyboardNavigation(heading, megaMenu); - this.attachMouseEvents(heading, megaMenu); - this.attachFocusManagement(heading, megaMenu); - } - } - this.attachGlobalKeyboardNavigation(); - this.attachGlobalClickOutsideHandler(); - }; - MegaMenuRenderer.prototype.attachKeyboardNavigation = function (heading, megaMenu) { - var _this = this; - heading.addEventListener('keydown', function (e) { - if (e.key === 'Enter') { - if (heading.tagName === 'A') { - return; - } - e.preventDefault(); - _this.toggleMegaMenu(heading, megaMenu); - } - else if (e.key === ' ') { - e.preventDefault(); - _this.toggleMegaMenu(heading, megaMenu); - } - else if (e.key === 'ArrowDown') { - e.preventDefault(); - _this.openMegaMenu(heading, megaMenu); - _this.focusFirstLink(megaMenu); - } - else if (e.key === 'ArrowUp') { - e.preventDefault(); - _this.closeMegaMenu(heading, megaMenu); - } - else if (e.key === 'Escape') { - e.preventDefault(); - _this.closeMegaMenu(heading, megaMenu); - heading.focus(); - } - }); - if (heading.tagName === 'A') { - heading.addEventListener('click', function () { - debugLog(_this.debug, LOG_SOURCE, 'Link clicked:', heading.href); - }); - } - heading.addEventListener('focus', function () { - debugLog(_this.debug, LOG_SOURCE, 'Focus moved to:', heading.textContent); - }); - }; - MegaMenuRenderer.prototype.attachMouseEvents = function (heading, megaMenu) { - var _this = this; - var parentLi = heading.parentElement; - var openTimeout; - var closeTimeout; - var clearOpenTimeout = function () { - if (typeof openTimeout === 'number') { - window.clearTimeout(openTimeout); - openTimeout = undefined; - } - }; - var clearCloseTimeout = function () { - if (typeof closeTimeout === 'number') { - window.clearTimeout(closeTimeout); - closeTimeout = undefined; - } - }; - parentLi.addEventListener('mouseenter', function () { - clearCloseTimeout(); - if (megaMenu.classList.contains('js-open')) { - return; - } - clearOpenTimeout(); - openTimeout = window.setTimeout(function () { - _this.openMegaMenu(heading, megaMenu); - openTimeout = undefined; - }, MegaMenuRenderer.hoverOpenDelayMs); - }); - parentLi.addEventListener('mouseleave', function () { - clearOpenTimeout(); - clearCloseTimeout(); - closeTimeout = window.setTimeout(function () { - _this.closeMegaMenu(heading, megaMenu); - closeTimeout = undefined; - }, MegaMenuRenderer.hoverCloseDelayMs); - }); - heading.addEventListener('focus', function () { - clearCloseTimeout(); - }); - megaMenu.addEventListener('mouseenter', function () { - clearCloseTimeout(); - }); - }; - MegaMenuRenderer.prototype.attachFocusManagement = function (heading, megaMenu) { - var _this = this; - megaMenu.addEventListener('focusout', function () { - setTimeout(function () { - var focusedElement = document.activeElement; - var isInsideThisMenu = megaMenu.contains(focusedElement); - var isOnThisTrigger = focusedElement === heading; - var isInAnyMegaMenu = focusedElement.closest('.mega-menu'); - var isOnAnyTopLevel = focusedElement.closest('#Mega-Menu > ul > li > a, #Mega-Menu > ul > li > span'); - if (!isInsideThisMenu && !isOnThisTrigger && !isInAnyMegaMenu && !isOnAnyTopLevel) { - debugLog(_this.debug, LOG_SOURCE, 'Closing menu because focus left the navigation.'); - _this.closeMegaMenu(heading, megaMenu); - } - }, 150); - }); - }; - MegaMenuRenderer.prototype.attachGlobalKeyboardNavigation = function () { - var _this = this; - this._documentKeydownHandler = function (e) { - var activeElement = document.activeElement; - if (e.key === 'Escape') { - var openMenu = document.querySelector('.mega-menu[aria-expanded="true"]'); - if (openMenu) { - var triggerLink = openMenu.previousElementSibling; - _this.closeMegaMenu(triggerLink, openMenu); - triggerLink.focus(); - } - } - if (e.key === 'Tab') { - if (!e.shiftKey) { - var currentTopLevel = activeElement.closest('#Mega-Menu > ul > li > a, #Mega-Menu > ul > li > span'); - if (currentTopLevel) { - var parentLi = currentTopLevel.closest('li'); - var megaMenu = parentLi.querySelector('.mega-menu.js-open'); - if (megaMenu) { - e.preventDefault(); - var firstLink = megaMenu.querySelector('a'); - if (firstLink) { - firstLink.focus(); - } - return; - } - } - } - if (e.shiftKey) { - var megaMenu = activeElement.closest('.mega-menu'); - if (megaMenu && megaMenu.classList.contains('js-open')) { - var allLinksInMenu = megaMenu.querySelectorAll('a'); - var firstLinkInMenu = allLinksInMenu[0]; - if (activeElement === firstLinkInMenu) { - e.preventDefault(); - var triggerElement = megaMenu.previousElementSibling; - triggerElement.focus(); - return; - } - } - } - } - }; - document.addEventListener('keydown', this._documentKeydownHandler); - }; - MegaMenuRenderer.prototype.attachGlobalClickOutsideHandler = function () { - var _this = this; - this._documentClickHandler = function (e) { - var eventTarget = e.target; - var isInsideNavigation = !!(eventTarget && typeof eventTarget.closest === 'function' && - eventTarget.closest('#CustomNavigation')); - if (isInsideNavigation) { - return; - } - var openMenu = document.querySelector('.mega-menu.js-open'); - if (openMenu) { - debugLog(_this.debug, LOG_SOURCE, 'Closing menu because of outside click.'); - _this.closeAllMegaMenus(); - } - }; - document.addEventListener('click', this._documentClickHandler); - }; - MegaMenuRenderer.prototype.openMegaMenu = function (trigger, menu) { - this.closeAllMegaMenus(menu); - trigger.setAttribute('aria-expanded', 'true'); - menu.setAttribute('aria-expanded', 'true'); - menu.classList.add('js-open'); - this.announce((trigger.textContent || '') + ' geöffnet'); - debugLog(this.debug, LOG_SOURCE, 'Menu opened:', trigger.textContent); - }; - MegaMenuRenderer.prototype.closeMegaMenu = function (trigger, menu) { - trigger.setAttribute('aria-expanded', 'false'); - menu.setAttribute('aria-expanded', 'false'); - menu.classList.remove('js-open'); - this.announce((trigger.textContent || '') + ' geschlossen'); - debugLog(this.debug, LOG_SOURCE, 'Menu closed:', trigger.textContent); - }; - MegaMenuRenderer.prototype.toggleMegaMenu = function (trigger, menu) { - var isOpen = trigger.getAttribute('aria-expanded') === 'true'; - if (isOpen) { - this.closeMegaMenu(trigger, menu); - } - else { - this.openMegaMenu(trigger, menu); - } - }; - MegaMenuRenderer.prototype.closeAllMegaMenus = function (exceptMenu) { - var allTriggers = document.querySelectorAll('#Mega-Menu > ul > li > a[aria-expanded="true"], #Mega-Menu > ul > li > span[aria-expanded="true"]'); - for (var i = 0; i < allTriggers.length; i++) { - var trigger = allTriggers[i]; - var menu = trigger.nextElementSibling; - if (menu && menu !== exceptMenu) { - this.closeMegaMenu(trigger, menu); - } - } - }; - MegaMenuRenderer.prototype.focusFirstLink = function (megaMenu) { - var firstLink = megaMenu.querySelector('a'); - if (firstLink) { - firstLink.focus(); - } - }; - MegaMenuRenderer.prototype.isItemActive = function (item) { - if (this.isCurrentUrl(item.url)) { - return true; - } - if (!item.items || item.items.length === 0) { - return false; - } - for (var i = 0; i < item.items.length; i++) { - if (this.isItemActive(item.items[i])) { - return true; - } - } - return false; - }; - MegaMenuRenderer.prototype.isCurrentUrl = function (url) { - var currentPath = this.normalizePath(window.location.href); - var itemPath = this.normalizePath(url); - if (!currentPath || !itemPath) { - return false; - } - if (itemPath === '/') { - return currentPath === '/'; - } - if (currentPath === itemPath) { - return true; - } - return currentPath.indexOf(itemPath + '/') === 0; - }; - MegaMenuRenderer.prototype.normalizePath = function (url) { - if (!url) { - return ''; - } - try { - var parsedUrl = new URL(url, window.location.origin); - var pathname = (parsedUrl.pathname || '/').replace(/\/+$/, ''); - return (pathname || '/').toLowerCase(); - } - catch (error) { - return ''; - } - }; - MegaMenuRenderer.prototype.getColumnCount = function (items) { - var itemCount = items ? items.length : 0; - var columnCount = Math.min(Math.max(itemCount, 1), 4); - return columnCount.toString(); - }; - MegaMenuRenderer.prototype.joinClasses = function () { - var classNames = []; - for (var _i = 0; _i < arguments.length; _i++) { - classNames[_i] = arguments[_i]; - } - var filteredClassNames = []; - for (var i = 0; i < classNames.length; i++) { - if (classNames[i]) { - filteredClassNames.push(classNames[i]); - } - } - return filteredClassNames.join(' '); - }; - MegaMenuRenderer.prototype.createScreenReaderAnnouncer = function () { - var existingAnnouncer = document.getElementById('mega-menu-sr-announcer'); - if (existingAnnouncer) { - this._announcer = existingAnnouncer; - return; - } - var srAnnouncer = document.createElement('div'); - srAnnouncer.id = 'mega-menu-sr-announcer'; - srAnnouncer.setAttribute('aria-live', 'polite'); - srAnnouncer.setAttribute('aria-atomic', 'true'); - srAnnouncer.className = 'sr-only'; - document.body.appendChild(srAnnouncer); - this._announcer = srAnnouncer; - debugLog(this.debug, LOG_SOURCE, 'Screen reader announcer is ready.'); - }; - MegaMenuRenderer.prototype.announce = function (message) { - var _this = this; - if (this._announcer) { - this._announcer.textContent = ''; - window.setTimeout(function () { - if (_this._announcer) { - _this._announcer.textContent = message; - } - }, 20); - } - }; - MegaMenuRenderer.hoverOpenDelayMs = 140; - MegaMenuRenderer.hoverCloseDelayMs = 180; - return MegaMenuRenderer; -}()); -export { MegaMenuRenderer }; - -//# sourceMappingURL=MegaMenuRenderer.js.map diff --git a/lib/extensions/megaMenu/MegaMenuRenderer.js.map b/lib/extensions/megaMenu/MegaMenuRenderer.js.map deleted file mode 100644 index 5eeb61c..0000000 --- a/lib/extensions/megaMenu/MegaMenuRenderer.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["extensions/megaMenu/MegaMenuRenderer.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,2CAA2C;AAC3C,yBAAyB;AACzB,+BAA+B;AAG/B,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAIxD,IAAM,UAAU,GAAW,kBAAkB,CAAC;AAE9C;IAQI,0BACY,SAAsB,EACtB,KAAsB;QAAtB,sBAAA,EAAA,aAAsB;QADtB,cAAS,GAAT,SAAS,CAAa;QACtB,UAAK,GAAL,KAAK,CAAiB;IAC9B,CAAC;IAEE,iCAAM,GAAb,UAAc,SAAsB;QAApC,iBAwBC;QAvBG,IAAI,CAAC,OAAO,EAAE,CAAC;QACf,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,SAAS,CAAC,SAAS,GAAG,EAAE,CAAC;QACzB,SAAS,CAAC,EAAE,GAAG,kBAAkB,CAAC;QAElC,IAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC1C,GAAG,CAAC,EAAE,GAAG,WAAW,CAAC;QACrB,GAAG,CAAC,SAAS,GAAG,gBAAgB,CAAC;QACjC,GAAG,CAAC,YAAY,CAAC,YAAY,EAAE,iBAAiB,CAAC,CAAC;QAElD,IAAM,UAAU,GAAG,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;QAChD,UAAU,CAAC,SAAS,GAAG,qBAAqB,CAAC;QAE7C,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,UAAA,YAAY;YAC/B,IAAM,UAAU,GAAG,KAAI,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAC;YACzD,UAAU,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;QACvC,CAAC,CAAC,CAAC;QAEH,GAAG,CAAC,WAAW,CAAC,U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C,CAAC;QAChD,WAAW,CAAC,YAAY,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;QAChD,WAAW,CAAC,SAAS,GAAG,SAAS,CAAC;QAClC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;QACvC,IAAI,CAAC,UAAU,GAAG,WAAW,CAAC;QAE9B,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,UAAU,EAAE,mCAAmC,CAAC,CAAC;IAC1E,CAAC;IAEO,mCAAQ,GAAhB,UAAiB,OAAe;QAAhC,iBASC;QARG,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;YAClB,IAAI,CAAC,UAAU,CAAC,WAAW,GAAG,EAAE,CAAC;YACjC,MAAM,CAAC,UAAU,CAAC;gBACd,EAAE,CAAC,CAAC,KAAI,CAAC,UAAU,CAAC,CAAC,CAAC;oBAClB,KAAI,CAAC,UAAU,CAAC,WAAW,GAAG,OAAO,CAAC;gBAC1C,CAAC;YACL,CAAC,EAAE,EAAE,CAAC,CAAC;QACX,CAAC;IACL,CAAC;IAziBuB,iCAAgB,GAAW,GAAG,CAAC;IAC/B,kCAAiB,GAAW,GAAG,CAAC;IAyiB5D,uBAAC;CA3iBD,AA2iBC,IAAA;SA3iBY,gBAAgB","file":"extensions/megaMenu/MegaMenuRenderer.js","sourcesContent":["// tslint:disable:max-line-length\n// tslint:disable:match-default-export-name\n// tslint:disable:typedef\n// tslint:disable:variable-name\n\nimport { IMenuItem } from '../../services/IMenuItem';\nimport { debugLog } from '../../services/MegaMenuDebug';\n\nimport styles from './MegaMenu.module.scss'; // tslint:disable-line:no-unused-variable\n\nconst LOG_SOURCE: string = 'MegaMenuRenderer';\n\nexport class MegaMenuRenderer {\n private static readonly hoverOpenDelayMs: number = 140;\n private static readonly hoverCloseDelayMs: number = 180;\n private _container: HTMLElement | undefined;\n private _documentKeydownHandler: ((event: KeyboardEvent) => void) | undefined;\n private _documentClickHandler: ((event: MouseEvent) => void) | undefined;\n private _announcer: HTMLElement | undefined;\n\n constructor(\n private menuItems: IMenuItem[],\n private debug: boolean = false\n ) { }\n\n public render(container: HTMLElement): void {\n this.dispose();\n this._container = container;\n container.innerHTML = '';\n container.id = 'CustomNavigation';\n\n const nav = document.createElement('nav');\n nav.id = 'Mega-Menu';\n nav.className = 'mega-menu-main';\n nav.setAttribute('aria-label', 'Hauptnavigation');\n\n const topLevelUl = document.createElement('ul');\n topLevelUl.className = 'mega-menu-top-level';\n\n this.menuItems.forEach(topLevelItem => {\n const topLevelLi = this.createTopLevelItem(topLevelItem);\n topLevelUl.appendChild(topLevelLi);\n });\n\n nav.appendChild(topLevelUl);\n container.appendChild(nav);\n\n this.attachEventListeners();\n this.createScreenReaderAnnouncer();\n }\n\n public dispose(): void {\n if (this._documentKeydownHandler) {\n document.removeEventListener('keydown', this._documentKeydownHandler);\n this._documentKeydownHandler = undefined;\n }\n if (this._documentClickHandler) {\n document.removeEventListener('click', this._documentClickHandler);\n this._documentClickHandler = undefined;\n }\n if (this._announcer && this._announcer.parentElement) {\n this._announcer.parentElement.removeChild(this._announcer);\n }\n this._announcer = undefined;\n if (this._container) {\n this._container.innerHTML = '';\n }\n this._container = undefined;\n }\n\n private createTopLevelItem(item: IMenuItem): HTMLLIElement {\n const li = document.createElement('li');\n const hasChildren = item.hasChildren() && item.items && item.items.length > 0;\n const isActive = this.isItemActive(item);\n const isCurrent = this.isCurrentUrl(item.url);\n\n li.className = this.joinClasses(\n 'mega-menu-top-item',\n hasChildren ? 'has-children' : undefined,\n isActive ? 'is-active' : undefined,\n isCurrent ? 'is-current' : undefined\n );\n\n const topElement = this.createTopLevelElement(item, hasChildren, isActive, isCurrent);\n li.appendChild(topElement);\n\n if (hasChildren) {\n const megaMenu = this.createMegaMenu(item);\n li.appendChild(megaMenu);\n }\n\n return li;\n }\n\n private createTopLevelElement(item: IMenuItem, hasChildren: boolean, isActive: boolean, isCurrent: boolean): HTMLElement {\n let element: HTMLElement;\n\n if (item.url) {\n element = document.createElement('a');\n (element as HTMLAnchorElement).href = item.url;\n element.className = 'menu-item-link';\n } else {\n element = document.createElement('span');\n element.className = 'menu-item-text';\n element.setAttribute('tabindex', '0');\n }\n\n element.textContent = item.label;\n element.className = this.joinClasses(\n element.className,\n hasChildren ? 'menu-item-has-children' : undefined,\n isActive ? 'is-active' : undefined,\n isCurrent ? 'is-current' : undefined\n );\n\n if (hasChildren) {\n element.setAttribute('aria-haspopup', 'true');\n element.setAttribute('aria-expanded', 'false');\n }\n\n if (isCurrent && item.url) {\n element.setAttribute('aria-current', 'page');\n }\n\n if (item.hoverText) {\n element.title = item.hoverText;\n }\n\n return element;\n }\n\n private createMegaMenu(parentItem: IMenuItem): HTMLDivElement {\n const megaMenuDiv = document.createElement('div');\n megaMenuDiv.className = 'mega-menu';\n megaMenuDiv.setAttribute('aria-expanded', 'false');\n megaMenuDiv.setAttribute('aria-label', parentItem.label + ' Unterkategorien');\n\n const gridDiv = document.createElement('div');\n gridDiv.className = 'mega-menu-grid';\n gridDiv.style.setProperty('--megaMenuColumnCount', this.getColumnCount(parentItem.items));\n\n if (parentItem.items) {\n parentItem.items.forEach(secondLevelItem => {\n const categoryDiv = this.createCategorySection(secondLevelItem);\n gridDiv.appendChild(categoryDiv);\n });\n }\n\n megaMenuDiv.appendChild(gridDiv);\n return megaMenuDiv;\n }\n\n private createCategorySection(item: IMenuItem): HTMLDivElement {\n const categoryDiv = document.createElement('div');\n const isActive = this.isItemActive(item);\n const isCurrent = this.isCurrentUrl(item.url);\n categoryDiv.className = this.joinClasses(\n 'mega-menu-category',\n isActive ? 'is-active' : undefined,\n isCurrent ? 'is-current' : undefined\n );\n\n const h3 = document.createElement('h3');\n h3.className = 'mega-menu-category-title';\n\n if (item.url) {\n const link = document.createElement('a');\n link.href = item.url;\n link.textContent = item.label;\n link.className = this.joinClasses(\n isActive ? 'is-active' : undefined,\n isCurrent ? 'is-current' : undefined\n );\n if (isCurrent) {\n link.setAttribute('aria-current', 'page');\n }\n if (item.hoverText) {\n link.title = item.hoverText;\n }\n h3.appendChild(link);\n } else {\n const span = document.createElement('span');\n span.textContent = item.label;\n span.className = this.joinClasses(\n isActive ? 'is-active' : undefined\n );\n if (item.hoverText) {\n span.title = item.hoverText;\n }\n h3.appendChild(span);\n }\n\n categoryDiv.appendChild(h3);\n\n if (item.hasChildren() && item.items && item.items.length > 0) {\n const ul = document.createElement('ul');\n ul.className = 'mega-menu-links';\n\n item.items.forEach(thirdLevelItem => {\n const li = document.createElement('li');\n const link = document.createElement('a');\n const isLinkActive = this.isItemActive(thirdLevelItem);\n const isLinkCurrent = this.isCurrentUrl(thirdLevelItem.url);\n\n li.className = this.joinClasses(\n isLinkActive ? 'is-active' : undefined,\n isLinkCurrent ? 'is-current' : undefined\n );\n\n link.href = thirdLevelItem.url || '#';\n link.textContent = thirdLevelItem.label;\n link.className = this.joinClasses(\n isLinkActive ? 'is-active' : undefined,\n isLinkCurrent ? 'is-current' : undefined\n );\n\n if (isLinkCurrent && thirdLevelItem.url) {\n link.setAttribute('aria-current', 'page');\n }\n\n if (thirdLevelItem.hoverText) {\n link.title = thirdLevelItem.hoverText;\n }\n\n li.appendChild(link);\n ul.appendChild(li);\n });\n\n categoryDiv.appendChild(ul);\n }\n\n return categoryDiv;\n }\n\n private attachEventListeners(): void {\n const headings = document.querySelectorAll('#Mega-Menu > ul > li > a, #Mega-Menu > ul > li > .menu-item-text');\n\n for (let i = 0; i < headings.length; i++) {\n const heading = headings[i] as HTMLElement;\n const megaMenu = heading.nextElementSibling as HTMLElement;\n\n if (megaMenu && megaMenu.classList.contains('mega-menu')) {\n this.attachKeyboardNavigation(heading, megaMenu);\n this.attachMouseEvents(heading, megaMenu);\n this.attachFocusManagement(heading, megaMenu);\n }\n }\n\n this.attachGlobalKeyboardNavigation();\n this.attachGlobalClickOutsideHandler();\n }\n\n private attachKeyboardNavigation(heading: HTMLElement, megaMenu: HTMLElement): void {\n heading.addEventListener('keydown', (e: KeyboardEvent) => {\n if (e.key === 'Enter') {\n if (heading.tagName === 'A') {\n return;\n }\n\n e.preventDefault();\n this.toggleMegaMenu(heading, megaMenu);\n } else if (e.key === ' ') {\n e.preventDefault();\n this.toggleMegaMenu(heading, megaMenu);\n } else if (e.key === 'ArrowDown') {\n e.preventDefault();\n this.openMegaMenu(heading, megaMenu);\n this.focusFirstLink(megaMenu);\n } else if (e.key === 'ArrowUp') {\n e.preventDefault();\n this.closeMegaMenu(heading, megaMenu);\n } else if (e.key === 'Escape') {\n e.preventDefault();\n this.closeMegaMenu(heading, megaMenu);\n heading.focus();\n }\n });\n\n if (heading.tagName === 'A') {\n heading.addEventListener('click', () => {\n debugLog(this.debug, LOG_SOURCE, 'Link clicked:', (heading as HTMLAnchorElement).href);\n });\n }\n\n heading.addEventListener('focus', () => {\n debugLog(this.debug, LOG_SOURCE, 'Focus moved to:', heading.textContent);\n });\n }\n\n private attachMouseEvents(heading: HTMLElement, megaMenu: HTMLElement): void {\n const parentLi = heading.parentElement as HTMLElement;\n let openTimeout: number | undefined;\n let closeTimeout: number | undefined;\n\n const clearOpenTimeout = () => {\n if (typeof openTimeout === 'number') {\n window.clearTimeout(openTimeout);\n openTimeout = undefined;\n }\n };\n\n const clearCloseTimeout = () => {\n if (typeof closeTimeout === 'number') {\n window.clearTimeout(closeTimeout);\n closeTimeout = undefined;\n }\n };\n\n parentLi.addEventListener('mouseenter', () => {\n clearCloseTimeout();\n\n if (megaMenu.classList.contains('js-open')) {\n return;\n }\n\n clearOpenTimeout();\n openTimeout = window.setTimeout(() => {\n this.openMegaMenu(heading, megaMenu);\n openTimeout = undefined;\n }, MegaMenuRenderer.hoverOpenDelayMs);\n });\n\n parentLi.addEventListener('mouseleave', () => {\n clearOpenTimeout();\n clearCloseTimeout();\n closeTimeout = window.setTimeout(() => {\n this.closeMegaMenu(heading, megaMenu);\n closeTimeout = undefined;\n }, MegaMenuRenderer.hoverCloseDelayMs);\n });\n\n heading.addEventListener('focus', () => {\n clearCloseTimeout();\n });\n\n megaMenu.addEventListener('mouseenter', () => {\n clearCloseTimeout();\n });\n }\n\n private attachFocusManagement(heading: HTMLElement, megaMenu: HTMLElement): void {\n megaMenu.addEventListener('focusout', () => {\n setTimeout(() => {\n const focusedElement = document.activeElement as HTMLElement;\n const isInsideThisMenu = megaMenu.contains(focusedElement);\n const isOnThisTrigger = focusedElement === heading;\n const isInAnyMegaMenu = focusedElement.closest('.mega-menu');\n const isOnAnyTopLevel = focusedElement.closest('#Mega-Menu > ul > li > a, #Mega-Menu > ul > li > span');\n\n if (!isInsideThisMenu && !isOnThisTrigger && !isInAnyMegaMenu && !isOnAnyTopLevel) {\n debugLog(this.debug, LOG_SOURCE, 'Closing menu because focus left the navigation.');\n this.closeMegaMenu(heading, megaMenu);\n }\n }, 150);\n });\n }\n\n private attachGlobalKeyboardNavigation(): void {\n this._documentKeydownHandler = (e: KeyboardEvent): void => {\n const activeElement = document.activeElement as HTMLElement;\n\n if (e.key === 'Escape') {\n const openMenu = document.querySelector('.mega-menu[aria-expanded=\"true\"]') as HTMLElement;\n if (openMenu) {\n const triggerLink = openMenu.previousElementSibling as HTMLElement;\n this.closeMegaMenu(triggerLink, openMenu);\n triggerLink.focus();\n }\n }\n\n if (e.key === 'Tab') {\n if (!e.shiftKey) {\n const currentTopLevel = activeElement.closest('#Mega-Menu > ul > li > a, #Mega-Menu > ul > li > span') as HTMLElement;\n if (currentTopLevel) {\n const parentLi = currentTopLevel.closest('li') as HTMLElement;\n const megaMenu = parentLi.querySelector('.mega-menu.js-open') as HTMLElement;\n if (megaMenu) {\n e.preventDefault();\n const firstLink = megaMenu.querySelector('a') as HTMLElement;\n if (firstLink) {\n firstLink.focus();\n }\n return;\n }\n }\n }\n\n if (e.shiftKey) {\n const megaMenu = activeElement.closest('.mega-menu') as HTMLElement;\n if (megaMenu && megaMenu.classList.contains('js-open')) {\n const allLinksInMenu = megaMenu.querySelectorAll('a');\n const firstLinkInMenu = allLinksInMenu[0] as HTMLElement;\n\n if (activeElement === firstLinkInMenu) {\n e.preventDefault();\n const triggerElement = megaMenu.previousElementSibling as HTMLElement;\n triggerElement.focus();\n return;\n }\n }\n }\n }\n };\n document.addEventListener('keydown', this._documentKeydownHandler);\n }\n\n private attachGlobalClickOutsideHandler(): void {\n this._documentClickHandler = (e: MouseEvent): void => {\n const eventTarget = e.target as Element;\n const isInsideNavigation = !!(eventTarget && typeof eventTarget.closest === 'function' &&\n eventTarget.closest('#CustomNavigation'));\n\n if (isInsideNavigation) {\n return;\n }\n\n const openMenu = document.querySelector('.mega-menu.js-open') as HTMLElement;\n\n if (openMenu) {\n debugLog(this.debug, LOG_SOURCE, 'Closing menu because of outside click.');\n this.closeAllMegaMenus();\n }\n };\n document.addEventListener('click', this._documentClickHandler);\n }\n\n private openMegaMenu(trigger: HTMLElement, menu: HTMLElement): void {\n this.closeAllMegaMenus(menu);\n trigger.setAttribute('aria-expanded', 'true');\n menu.setAttribute('aria-expanded', 'true');\n menu.classList.add('js-open');\n this.announce((trigger.textContent || '') + ' geöffnet');\n debugLog(this.debug, LOG_SOURCE, 'Menu opened:', trigger.textContent);\n }\n\n private closeMegaMenu(trigger: HTMLElement, menu: HTMLElement): void {\n trigger.setAttribute('aria-expanded', 'false');\n menu.setAttribute('aria-expanded', 'false');\n menu.classList.remove('js-open');\n this.announce((trigger.textContent || '') + ' geschlossen');\n debugLog(this.debug, LOG_SOURCE, 'Menu closed:', trigger.textContent);\n }\n\n private toggleMegaMenu(trigger: HTMLElement, menu: HTMLElement): void {\n const isOpen = trigger.getAttribute('aria-expanded') === 'true';\n if (isOpen) {\n this.closeMegaMenu(trigger, menu);\n } else {\n this.openMegaMenu(trigger, menu);\n }\n }\n\n private closeAllMegaMenus(exceptMenu?: HTMLElement): void {\n const allTriggers = document.querySelectorAll('#Mega-Menu > ul > li > a[aria-expanded=\"true\"], #Mega-Menu > ul > li > span[aria-expanded=\"true\"]');\n for (let i = 0; i < allTriggers.length; i++) {\n const trigger = allTriggers[i] as HTMLElement;\n const menu = trigger.nextElementSibling as HTMLElement;\n if (menu && menu !== exceptMenu) {\n this.closeMegaMenu(trigger, menu);\n }\n }\n }\n\n private focusFirstLink(megaMenu: HTMLElement): void {\n const firstLink = megaMenu.querySelector('a') as HTMLElement;\n if (firstLink) {\n firstLink.focus();\n }\n }\n\n private isItemActive(item: IMenuItem): boolean {\n if (this.isCurrentUrl(item.url)) {\n return true;\n }\n\n if (!item.items || item.items.length === 0) {\n return false;\n }\n\n for (let i = 0; i < item.items.length; i++) {\n if (this.isItemActive(item.items[i])) {\n return true;\n }\n }\n\n return false;\n }\n\n private isCurrentUrl(url?: string): boolean {\n const currentPath = this.normalizePath(window.location.href);\n const itemPath = this.normalizePath(url);\n\n if (!currentPath || !itemPath) {\n return false;\n }\n\n if (itemPath === '/') {\n return currentPath === '/';\n }\n\n if (currentPath === itemPath) {\n return true;\n }\n\n return currentPath.indexOf(itemPath + '/') === 0;\n }\n\n private normalizePath(url?: string): string {\n if (!url) {\n return '';\n }\n\n try {\n const parsedUrl = new URL(url, window.location.origin);\n const pathname = (parsedUrl.pathname || '/').replace(/\\/+$/, '');\n return (pathname || '/').toLowerCase();\n } catch (error) {\n return '';\n }\n }\n\n private getColumnCount(items?: IMenuItem[]): string {\n const itemCount = items ? items.length : 0;\n const columnCount = Math.min(Math.max(itemCount, 1), 4);\n return columnCount.toString();\n }\n\n private joinClasses(...classNames: Array): string {\n const filteredClassNames: string[] = [];\n\n for (let i = 0; i < classNames.length; i++) {\n if (classNames[i]) {\n filteredClassNames.push(classNames[i] as string);\n }\n }\n\n return filteredClassNames.join(' ');\n }\n\n private createScreenReaderAnnouncer(): void {\n const existingAnnouncer: HTMLElement = document.getElementById('mega-menu-sr-announcer');\n if (existingAnnouncer) {\n this._announcer = existingAnnouncer;\n return;\n }\n\n const srAnnouncer = document.createElement('div');\n srAnnouncer.id = 'mega-menu-sr-announcer';\n srAnnouncer.setAttribute('aria-live', 'polite');\n srAnnouncer.setAttribute('aria-atomic', 'true');\n srAnnouncer.className = 'sr-only';\n document.body.appendChild(srAnnouncer);\n this._announcer = srAnnouncer;\n\n debugLog(this.debug, LOG_SOURCE, 'Screen reader announcer is ready.');\n }\n\n private announce(message: string): void {\n if (this._announcer) {\n this._announcer.textContent = '';\n window.setTimeout((): void => {\n if (this._announcer) {\n this._announcer.textContent = message;\n }\n }, 20);\n }\n }\n}\n"],"sourceRoot":"..\\..\\..\\src"} \ No newline at end of file diff --git a/lib/extensions/megaMenu/loc/en-us.js b/lib/extensions/megaMenu/loc/en-us.js deleted file mode 100644 index eb65de2..0000000 --- a/lib/extensions/megaMenu/loc/en-us.js +++ /dev/null @@ -1,7 +0,0 @@ -define([], function() { - return { - "Title": "MegaMenuApplicationCustomizer", - "ConfigurationMissing": "Navigation is not configured.", - "LoadError": "Navigation could not be loaded." - } -}); diff --git a/lib/index.d.ts b/lib/index.d.ts deleted file mode 100644 index a6cfcbc..0000000 --- a/lib/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export { TaxonomyNavigationService } from './services/TaxonomyNavigationService'; -export { MegaMenuRenderer } from './extensions/megaMenu/MegaMenuRenderer'; -export { UserCustomActionService } from './services/UserCustomActionService/UserCustomActionService'; -export { UserCustomActionScope } from './services/UserCustomActionService/UserCustomActionScope'; diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 06e20ec..0000000 --- a/lib/index.js +++ /dev/null @@ -1,17 +0,0 @@ -// tslint:disable:max-line-length no-any -// A file is required to be in the root of the /src directory by the TypeScript compiler -// Export services for classic SharePoint usage -export { TaxonomyNavigationService } from './services/TaxonomyNavigationService'; -export { MegaMenuRenderer } from './extensions/megaMenu/MegaMenuRenderer'; -export { UserCustomActionService } from './services/UserCustomActionService/UserCustomActionService'; -export { UserCustomActionScope } from './services/UserCustomActionService/UserCustomActionScope'; -if (typeof window !== 'undefined') { - window.__megaMenuServices = { - TaxonomyNavigationService: require('./services/TaxonomyNavigationService').TaxonomyNavigationService, - MegaMenuRenderer: require('./extensions/megaMenu/MegaMenuRenderer').MegaMenuRenderer, - UserCustomActionService: require('./services/UserCustomActionService/UserCustomActionService').UserCustomActionService, - UserCustomActionScope: require('./services/UserCustomActionService/UserCustomActionScope').UserCustomActionScope - }; -} - -//# sourceMappingURL=index.js.map diff --git a/lib/index.js.map b/lib/index.js.map deleted file mode 100644 index 32989f3..0000000 --- a/lib/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["index.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,wFAAwF;AAExF,+CAA+C;AAC/C,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,uBAAuB,EAAE,MAAM,4DAA4D,CAAC;AACrG,OAAO,EAAE,qBAAqB,EAAE,MAAM,0DAA0D,CAAC;AAKjG,EAAE,CAAC,CAAC,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC;IAChC,MAAM,CAAC,kBAAkB,GAAG;QACxB,yBAAyB,EAAE,OAAO,CAAC,sCAAsC,CAAC,CAAC,yBAAyB;QACpG,gBAAgB,EAAE,OAAO,CAAC,wCAAwC,CAAC,CAAC,gBAAgB;QACpF,uBAAuB,EAAE,OAAO,CAAC,4DAA4D,CAAC,CAAC,uBAAuB;QACtH,qBAAqB,EAAE,OAAO,CAAC,0DAA0D,CAAC,CAAC,qBAAqB;KACnH,CAAC;AACN,CAAC","file":"index.js","sourcesContent":["// tslint:disable:max-line-length no-any\r\n// A file is required to be in the root of the /src directory by the TypeScript compiler\r\n\r\n// Export services for classic SharePoint usage\r\nexport { TaxonomyNavigationService } from './services/TaxonomyNavigationService';\r\nexport { MegaMenuRenderer } from './extensions/megaMenu/MegaMenuRenderer';\r\nexport { UserCustomActionService } from './services/UserCustomActionService/UserCustomActionService';\r\nexport { UserCustomActionScope } from './services/UserCustomActionService/UserCustomActionScope';\r\n\r\n// Expose services globally for classic JavaScript consumption\r\ndeclare var window: any;\r\n\r\nif (typeof window !== 'undefined') {\r\n window.__megaMenuServices = {\r\n TaxonomyNavigationService: require('./services/TaxonomyNavigationService').TaxonomyNavigationService,\r\n MegaMenuRenderer: require('./extensions/megaMenu/MegaMenuRenderer').MegaMenuRenderer,\r\n UserCustomActionService: require('./services/UserCustomActionService/UserCustomActionService').UserCustomActionService,\r\n UserCustomActionScope: require('./services/UserCustomActionService/UserCustomActionScope').UserCustomActionScope\r\n };\r\n}\r\n"],"sourceRoot":"..\\src"} \ No newline at end of file diff --git a/lib/services/IMenuItem.d.ts b/lib/services/IMenuItem.d.ts deleted file mode 100644 index b1286e2..0000000 --- a/lib/services/IMenuItem.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export interface IMenuItem { - id: string; - label: string; - icon?: string; - hoverText: string; - url?: string; - pathDepth: number; - items?: IMenuItem[]; - hasChildren: () => boolean; -} diff --git a/lib/services/IMenuItem.js b/lib/services/IMenuItem.js deleted file mode 100644 index 72175a2..0000000 --- a/lib/services/IMenuItem.js +++ /dev/null @@ -1,3 +0,0 @@ - - -//# sourceMappingURL=IMenuItem.js.map diff --git a/lib/services/IMenuItem.js.map b/lib/services/IMenuItem.js.map deleted file mode 100644 index 4c4249f..0000000 --- a/lib/services/IMenuItem.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":[],"names":[],"mappings":"","file":"services/IMenuItem.js","sourcesContent":[],"sourceRoot":"..\\..\\src"} \ No newline at end of file diff --git a/lib/services/IPickerTerm.d.ts b/lib/services/IPickerTerm.d.ts deleted file mode 100644 index 5b36d08..0000000 --- a/lib/services/IPickerTerm.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export interface IPickerTerm { - name: string; - key: string; - path: string; - termSet: string; - termSetName?: string; -} -export interface IPickerTerms extends Array { -} diff --git a/lib/services/IPickerTerm.js b/lib/services/IPickerTerm.js deleted file mode 100644 index 371e10a..0000000 --- a/lib/services/IPickerTerm.js +++ /dev/null @@ -1,3 +0,0 @@ - - -//# sourceMappingURL=IPickerTerm.js.map diff --git a/lib/services/IPickerTerm.js.map b/lib/services/IPickerTerm.js.map deleted file mode 100644 index 015bde0..0000000 --- a/lib/services/IPickerTerm.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":[],"names":[],"mappings":"","file":"services/IPickerTerm.js","sourcesContent":[],"sourceRoot":"..\\..\\src"} \ No newline at end of file diff --git a/lib/services/ISPTermStorePickerService.d.ts b/lib/services/ISPTermStorePickerService.d.ts deleted file mode 100644 index 1b3562b..0000000 --- a/lib/services/ISPTermStorePickerService.d.ts +++ /dev/null @@ -1,84 +0,0 @@ -/** - * Interfaces for Term store, groups and term sets - * This code is a copy from the library @pnp/sp-dev-fx-controls-react - */ -export interface ITermStore { - _ObjectType_: string; - _ObjectIdentity_: string; - Id: string; - Name: string; - Groups: IGroups; -} -export interface IGroups { - _ObjectType_: string; - _Child_Items_: IGroup[]; -} -export interface IGroup { - _ObjectType_: string; - _ObjectIdentity_: string; - TermSets: ITermSets; - Id: string; - Name: string; - IsSystemGroup: boolean; -} -export interface ITermSets { - _ObjectType_: string; - _Child_Items_: ITermSet[]; -} -export interface ITermSet { - _ObjectType_: string; - _ObjectIdentity_: string; - Id: string; - CustomSortOrder?: string; - Name: string; - Description: string; - Names: ITermSetNames; - Terms?: ITerm[]; -} -export interface ITermSetMinimal { - _ObjectType_?: string; - _ObjectIdentity_?: string; - Id: string; - Name: string; -} -export interface ITermSetNames { - [locale: string]: string; -} -/** - * Interfaces for the terms - */ -export interface ITerms { - _ObjectType_: string; - _Child_Items_: ITerm[]; -} -/** - * Term - */ -export interface ITerm { - _ObjectType_: string; - _ObjectIdentity_: string; - Id: string; - Name: string; - Description: string; - IsDeprecated: boolean; - IsAvailableForTagging: boolean; - IsRoot: boolean; - PathOfTerm: string; - TermSet: ITermSetMinimal; - CustomSortOrderIndex?: number; - PathDepth?: number; - ParentId?: string; - TermsCount?: number; - LocalCustomProperties?: { - [property: string]: any; - }; -} -export interface ISuggestTerm { - Id: string; - DefaultLabel: string; - Description: string; - IsKeyword: boolean; - IsSynonym: boolean; - Paths: Array; - Synonyms: string; -} diff --git a/lib/services/ISPTermStorePickerService.js b/lib/services/ISPTermStorePickerService.js deleted file mode 100644 index 052262d..0000000 --- a/lib/services/ISPTermStorePickerService.js +++ /dev/null @@ -1,3 +0,0 @@ - - -//# sourceMappingURL=ISPTermStorePickerService.js.map diff --git a/lib/services/ISPTermStorePickerService.js.map b/lib/services/ISPTermStorePickerService.js.map deleted file mode 100644 index 15a4900..0000000 --- a/lib/services/ISPTermStorePickerService.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":[],"names":[],"mappings":"","file":"services/ISPTermStorePickerService.js","sourcesContent":[],"sourceRoot":"..\\..\\src"} \ No newline at end of file diff --git a/lib/services/ISPTermStorePickerServiceProps.d.ts b/lib/services/ISPTermStorePickerServiceProps.d.ts deleted file mode 100644 index 2021bfa..0000000 --- a/lib/services/ISPTermStorePickerServiceProps.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export interface ISPTermStorePickerServiceProps { - termsetNameOrID: string; - useSessionStorage: boolean; - hideDeprecatedTags: boolean; - hideTagsNotAvailableForTagging: boolean; - anchorId: string; - cacheMinutes: number; -} diff --git a/lib/services/ISPTermStorePickerServiceProps.js b/lib/services/ISPTermStorePickerServiceProps.js deleted file mode 100644 index 8fe77aa..0000000 --- a/lib/services/ISPTermStorePickerServiceProps.js +++ /dev/null @@ -1,3 +0,0 @@ - - -//# sourceMappingURL=ISPTermStorePickerServiceProps.js.map diff --git a/lib/services/ISPTermStorePickerServiceProps.js.map b/lib/services/ISPTermStorePickerServiceProps.js.map deleted file mode 100644 index 1c37ea7..0000000 --- a/lib/services/ISPTermStorePickerServiceProps.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":[],"names":[],"mappings":"","file":"services/ISPTermStorePickerServiceProps.js","sourcesContent":[],"sourceRoot":"..\\..\\src"} \ No newline at end of file diff --git a/lib/services/ITaxonomyNavigationService.d.ts b/lib/services/ITaxonomyNavigationService.d.ts deleted file mode 100644 index 9ebdf44..0000000 --- a/lib/services/ITaxonomyNavigationService.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { IMenuItem } from './IMenuItem'; -export interface ITaxonomyNavigationService { - getMenuItems(): Promise; -} diff --git a/lib/services/ITaxonomyNavigationService.js b/lib/services/ITaxonomyNavigationService.js deleted file mode 100644 index 2286e4c..0000000 --- a/lib/services/ITaxonomyNavigationService.js +++ /dev/null @@ -1,3 +0,0 @@ - - -//# sourceMappingURL=ITaxonomyNavigationService.js.map diff --git a/lib/services/ITaxonomyNavigationService.js.map b/lib/services/ITaxonomyNavigationService.js.map deleted file mode 100644 index 978b812..0000000 --- a/lib/services/ITaxonomyNavigationService.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":[],"names":[],"mappings":"","file":"services/ITaxonomyNavigationService.js","sourcesContent":[],"sourceRoot":"..\\..\\src"} \ No newline at end of file diff --git a/lib/services/ItemDictionary.d.ts b/lib/services/ItemDictionary.d.ts deleted file mode 100644 index a540201..0000000 --- a/lib/services/ItemDictionary.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export declare class ItemDictionary { - Get(key: string): T; - Add(key: string, value: T): void; -} diff --git a/lib/services/ItemDictionary.js b/lib/services/ItemDictionary.js deleted file mode 100644 index 2eafaf8..0000000 --- a/lib/services/ItemDictionary.js +++ /dev/null @@ -1,14 +0,0 @@ -var ItemDictionary = (function () { - function ItemDictionary() { - } - ItemDictionary.prototype.Get = function (key) { - return this[key]; - }; - ItemDictionary.prototype.Add = function (key, value) { - this[key] = value; - }; - return ItemDictionary; -}()); -export { ItemDictionary }; - -//# sourceMappingURL=ItemDictionary.js.map diff --git a/lib/services/ItemDictionary.js.map b/lib/services/ItemDictionary.js.map deleted file mode 100644 index 67066fe..0000000 --- a/lib/services/ItemDictionary.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["services/ItemDictionary.ts"],"names":[],"mappings":"AAAA;IAAA;IAQA,CAAC;IAPU,4BAAG,GAAV,UAAW,GAAW;QAClB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACrB,CAAC;IAEM,4BAAG,GAAV,UAAW,GAAW,EAAE,KAAQ;QAC5B,IAAI,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IACtB,CAAC;IACL,qBAAC;AAAD,CARA,AAQC,IAAA","file":"services/ItemDictionary.js","sourcesContent":["export class ItemDictionary {\r\n public Get(key: string): T {\r\n return this[key];\r\n }\r\n\r\n public Add(key: string, value: T): void {\r\n this[key] = value;\r\n }\r\n}\r\n"],"sourceRoot":"..\\..\\src"} \ No newline at end of file diff --git a/lib/services/MenuItem.d.ts b/lib/services/MenuItem.d.ts deleted file mode 100644 index f9cc91a..0000000 --- a/lib/services/MenuItem.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { IMenuItem } from './IMenuItem'; -import { ITerm } from './ISPTermStorePickerService'; -export declare class MenuItem implements IMenuItem { - level: number; - id: string; - label: string; - hoverText: string; - pathDepth: number; - url?: string; - items?: IMenuItem[]; - constructor(term: ITerm, level: number, siteCollectionUrl?: string); - hasChildren(): boolean; - command(): void; -} diff --git a/lib/services/MenuItem.js b/lib/services/MenuItem.js deleted file mode 100644 index 7df424d..0000000 --- a/lib/services/MenuItem.js +++ /dev/null @@ -1,29 +0,0 @@ -// tslint:disable:no-any no-string-literal max-line-length -var MenuItem = (function () { - function MenuItem(term, level, siteCollectionUrl) { - this.level = level; - this.id = term.Id; - this.label = term.Name; - this.hoverText = term.LocalCustomProperties['_Sys_Nav_HoverText']; - this.pathDepth = term.PathDepth; - var rawUrl = term.LocalCustomProperties['_Sys_Nav_SimpleLinkUrl'] || term.LocalCustomProperties['_Sys_Nav_TargetUrl']; - if (rawUrl) { - this.url = siteCollectionUrl && rawUrl.indexOf('~sitecollection') === 0 - ? siteCollectionUrl + rawUrl.substring('~sitecollection'.length) - : rawUrl; - } - this.items = []; - } - MenuItem.prototype.hasChildren = function () { - return this.items && this.items.length > 0; - }; - MenuItem.prototype.command = function () { - if (this.url) { - window.location.href = this.url; - } - }; - return MenuItem; -}()); -export { MenuItem }; - -//# sourceMappingURL=MenuItem.js.map diff --git a/lib/services/MenuItem.js.map b/lib/services/MenuItem.js.map deleted file mode 100644 index 4b73e0e..0000000 --- a/lib/services/MenuItem.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["services/MenuItem.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAK1D;IAQI,kBAAY,IAAW,EAAS,KAAa,EAAE,iBAA0B;QAAzC,UAAK,GAAL,KAAK,CAAQ;QACzC,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC;QAClB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC;QACvB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,qBAAqB,CAAC,oBAAoB,CAAC,CAAC;QAClE,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QAChC,IAAM,MAAM,GAAW,IAAI,CAAC,qBAAqB,CAAC,wBAAwB,CAAC,IAAI,IAAI,CAAC,qBAAqB,CAAC,oBAAoB,CAAC,CAAC;QAChI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;YACT,IAAI,CAAC,GAAG,GAAG,iBAAiB,IAAI,MAAM,CAAC,OAAO,CAAC,iBAAiB,CAAC,KAAK,CAAC;kBACjE,iBAAiB,GAAG,MAAM,CAAC,SAAS,CAAC,iBAAiB,CAAC,MAAM,CAAC;kBAC9D,MAAM,CAAC;QACjB,CAAC;QACD,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;IACpB,CAAC;IAEM,8BAAW,GAAlB;QACI,MAAM,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;IAC/C,CAAC;IAEM,0BAAO,GAAd;QACI,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;YACV,MAAc,CAAC,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC;QAC7C,CAAC;IACL,CAAC;IACL,eAAC;AAAD,CA/BA,AA+BC,IAAA","file":"services/MenuItem.js","sourcesContent":["// tslint:disable:no-any no-string-literal max-line-length\r\n\r\nimport { IMenuItem } from './IMenuItem';\r\nimport { ITerm } from './ISPTermStorePickerService';\r\n\r\nexport class MenuItem implements IMenuItem {\r\n public id: string;\r\n public label: string;\r\n public hoverText: string;\r\n public pathDepth: number;\r\n public url?: string;\r\n public items?: IMenuItem[];\r\n\r\n constructor(term: ITerm, public level: number, siteCollectionUrl?: string) {\r\n this.id = term.Id;\r\n this.label = term.Name;\r\n this.hoverText = term.LocalCustomProperties['_Sys_Nav_HoverText'];\r\n this.pathDepth = term.PathDepth;\r\n const rawUrl: string = term.LocalCustomProperties['_Sys_Nav_SimpleLinkUrl'] || term.LocalCustomProperties['_Sys_Nav_TargetUrl'];\r\n if (rawUrl) {\r\n this.url = siteCollectionUrl && rawUrl.indexOf('~sitecollection') === 0\r\n ? siteCollectionUrl + rawUrl.substring('~sitecollection'.length)\r\n : rawUrl;\r\n }\r\n this.items = [];\r\n }\r\n\r\n public hasChildren(): boolean {\r\n return this.items && this.items.length > 0;\r\n }\r\n\r\n public command(): void {\r\n if (this.url) {\r\n (window as any).location.href = this.url;\r\n }\r\n }\r\n}\r\n"],"sourceRoot":"..\\..\\src"} \ No newline at end of file diff --git a/lib/services/MockTaxonomyNavigationService.d.ts b/lib/services/MockTaxonomyNavigationService.d.ts deleted file mode 100644 index 31ec3fb..0000000 --- a/lib/services/MockTaxonomyNavigationService.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IMenuItem } from './IMenuItem'; -import { ITaxonomyNavigationService } from './ITaxonomyNavigationService'; -export default class MockTaxonomyNavigationService implements ITaxonomyNavigationService { - getMenuItems(): Promise; -} diff --git a/lib/services/MockTaxonomyNavigationService.js b/lib/services/MockTaxonomyNavigationService.js deleted file mode 100644 index 94e70d3..0000000 --- a/lib/services/MockTaxonomyNavigationService.js +++ /dev/null @@ -1,109 +0,0 @@ -import * as uuid from 'uuid'; -var MockTaxonomyNavigationService = (function () { - function MockTaxonomyNavigationService() { - } - MockTaxonomyNavigationService.prototype.getMenuItems = function () { - return new Promise(function (resolve) { - resolve([ - { - id: uuid.v4(), - label: 'Menu Item 1', - url: 'https://www.bing.com', - hoverText: 'Hover me!', - pathDepth: 1, - hasChildren: function () { return true; }, - items: [ - { - id: uuid.v4(), - label: 'Submenu Item 1', - hoverText: 'Huch!', - url: 'https://www.bing.com', - pathDepth: 2, - hasChildren: function () { return false; } - }, - { - id: uuid.v4(), - label: 'Submenu Item 2', - hoverText: 'Huch!', - url: 'https://www.bing.com', - pathDepth: 2, - hasChildren: function () { return false; } - } - ] - }, - { - id: uuid.v4(), - label: 'Menu Item 2', - hoverText: 'Huch!', - url: 'https://www.bing.com', - pathDepth: 1, - hasChildren: function () { return false; } - }, - { - id: uuid.v4(), - label: 'Menu Item 3', - hoverText: 'Huch!', - url: 'https://www.bing.com', - pathDepth: 1, - hasChildren: function () { return true; }, - items: [ - { - id: uuid.v4(), - label: 'Submenu Item 1', - hoverText: 'Huch!', - url: 'https://www.bing.com', - pathDepth: 2, - hasChildren: function () { return false; } - }, - { - id: uuid.v4(), - label: 'Submenu Item 2', - hoverText: 'Huch!', - url: 'https://www.bing.com', - pathDepth: 2, - hasChildren: function () { return true; }, - items: [ - { - id: uuid.v4(), - label: 'Submenu Item 1', - hoverText: 'Huch!', - url: 'https://www.bing.com', - pathDepth: 3, - hasChildren: function () { return false; } - }, - { - id: uuid.v4(), - label: 'Submenu Item 2', - hoverText: 'Huch!', - url: 'https://www.bing.com', - pathDepth: 3, - hasChildren: function () { return false; } - } - ] - }, - { - id: uuid.v4(), - label: 'Submenu Item 3', - hoverText: 'Huch!', - url: 'https://www.bing.com', - pathDepth: 2, - hasChildren: function () { return false; } - }, - { - id: uuid.v4(), - label: 'Submenu Item 4', - hoverText: 'Huch!', - url: 'https://www.bing.com', - pathDepth: 2, - hasChildren: function () { return false; } - } - ] - } - ]); - }); - }; - return MockTaxonomyNavigationService; -}()); -export default MockTaxonomyNavigationService; - -//# sourceMappingURL=MockTaxonomyNavigationService.js.map diff --git a/lib/services/MockTaxonomyNavigationService.js.map b/lib/services/MockTaxonomyNavigationService.js.map deleted file mode 100644 index d9e946c..0000000 --- a/lib/services/MockTaxonomyNavigationService.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["services/MockTaxonomyNavigationService.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B;IAAA;IAqGA,CAAC;IApGU,oDAAY,GAAnB;QACI,MAAM,CAAC,IAAI,OAAO,CAAc,UAAC,OAAO;YACpC,OAAO,CAAC;gBACJ;oBACI,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE;oBACb,KAAK,EAAE,aAAa;oBACpB,GAAG,EAAE,sBAAsB;oBAC3B,SAAS,EAAE,WAAW;oBACtB,SAAS,EAAE,CAAC;oBACZ,WAAW,EAAE,cAAM,OAAA,IAAI,EAAJ,CAAI;oBACvB,KAAK,EAAE;wBACH;4BACI,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE;4BACb,KAAK,EAAE,gBAAgB;4BACvB,SAAS,EAAE,OAAO;4BAClB,GAAG,EAAE,sBAAsB;4BAC3B,SAAS,EAAE,CAAC;4BACZ,WAAW,EAAE,cAAM,OAAA,KAAK,EAAL,CAAK;yBAC3B;wBACD;4BACI,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE;4BACb,KAAK,EAAE,gBAAgB;4BACvB,SAAS,EAAE,OAAO;4BAClB,GAAG,EAAE,sBAAsB;4BAC3B,SAAS,EAAE,CAAC;4BACZ,WAAW,EAAE,cAAM,OAAA,KAAK,EAAL,CAAK;yBAC3B;qBACJ;iBACJ;gBACD;oBACI,EAAE,E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cAAM,OAAA,KAAK,EAAL,CAAK;iCAC3B;6BACJ;yBACJ;wBACD;4BACI,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE;4BACb,KAAK,EAAE,gBAAgB;4BACvB,SAAS,EAAE,OAAO;4BAClB,GAAG,EAAE,sBAAsB;4BAC3B,SAAS,EAAE,CAAC;4BACZ,WAAW,EAAE,cAAM,OAAA,KAAK,EAAL,CAAK;yBAC3B;wBACD;4BACI,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE;4BACb,KAAK,EAAE,gBAAgB;4BACvB,SAAS,EAAE,OAAO;4BAClB,GAAG,EAAE,sBAAsB;4BAC3B,SAAS,EAAE,CAAC;4BACZ,WAAW,EAAE,cAAM,OAAA,KAAK,EAAL,CAAK;yBAC3B;qBACJ;iBACJ;aACJ,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC;IACL,oCAAC;AAAD,CArGA,AAqGC,IAAA","file":"services/MockTaxonomyNavigationService.js","sourcesContent":["import { IMenuItem } from './IMenuItem';\r\nimport { ITaxonomyNavigationService } from './ITaxonomyNavigationService';\r\nimport * as uuid from 'uuid';\r\n\r\nexport default class MockTaxonomyNavigationService implements ITaxonomyNavigationService {\r\n public getMenuItems(): Promise {\r\n return new Promise((resolve) => {\r\n resolve([\r\n {\r\n id: uuid.v4(),\r\n label: 'Menu Item 1',\r\n url: 'https://www.bing.com',\r\n hoverText: 'Hover me!',\r\n pathDepth: 1,\r\n hasChildren: () => true,\r\n items: [\r\n {\r\n id: uuid.v4(),\r\n label: 'Submenu Item 1',\r\n hoverText: 'Huch!',\r\n url: 'https://www.bing.com',\r\n pathDepth: 2,\r\n hasChildren: () => false\r\n },\r\n {\r\n id: uuid.v4(),\r\n label: 'Submenu Item 2',\r\n hoverText: 'Huch!',\r\n url: 'https://www.bing.com',\r\n pathDepth: 2,\r\n hasChildren: () => false\r\n }\r\n ]\r\n },\r\n {\r\n id: uuid.v4(),\r\n label: 'Menu Item 2',\r\n hoverText: 'Huch!',\r\n url: 'https://www.bing.com',\r\n pathDepth: 1,\r\n hasChildren: () => false\r\n },\r\n {\r\n id: uuid.v4(),\r\n label: 'Menu Item 3',\r\n hoverText: 'Huch!',\r\n url: 'https://www.bing.com',\r\n pathDepth: 1,\r\n hasChildren: () => true,\r\n items: [\r\n {\r\n id: uuid.v4(),\r\n label: 'Submenu Item 1',\r\n hoverText: 'Huch!',\r\n url: 'https://www.bing.com',\r\n pathDepth: 2,\r\n hasChildren: () => false\r\n },\r\n {\r\n id: uuid.v4(),\r\n label: 'Submenu Item 2',\r\n hoverText: 'Huch!',\r\n url: 'https://www.bing.com',\r\n pathDepth: 2,\r\n hasChildren: () => true,\r\n items: [\r\n {\r\n id: uuid.v4(),\r\n label: 'Submenu Item 1',\r\n hoverText: 'Huch!',\r\n url: 'https://www.bing.com',\r\n pathDepth: 3,\r\n hasChildren: () => false\r\n },\r\n {\r\n id: uuid.v4(),\r\n label: 'Submenu Item 2',\r\n hoverText: 'Huch!',\r\n url: 'https://www.bing.com',\r\n pathDepth: 3,\r\n hasChildren: () => false\r\n }\r\n ]\r\n },\r\n {\r\n id: uuid.v4(),\r\n label: 'Submenu Item 3',\r\n hoverText: 'Huch!',\r\n url: 'https://www.bing.com',\r\n pathDepth: 2,\r\n hasChildren: () => false\r\n },\r\n {\r\n id: uuid.v4(),\r\n label: 'Submenu Item 4',\r\n hoverText: 'Huch!',\r\n url: 'https://www.bing.com',\r\n pathDepth: 2,\r\n hasChildren: () => false\r\n }\r\n ]\r\n }\r\n ]);\r\n });\r\n }\r\n}"],"sourceRoot":"..\\..\\src"} \ No newline at end of file diff --git a/lib/services/SPTermStorePickerService.d.ts b/lib/services/SPTermStorePickerService.d.ts deleted file mode 100644 index d94004a..0000000 --- a/lib/services/SPTermStorePickerService.d.ts +++ /dev/null @@ -1,80 +0,0 @@ -import { ITermStore, ITermSet } from './ISPTermStorePickerService'; -import { ISPTermStorePickerServiceProps } from './ISPTermStorePickerServiceProps'; -import { IPickerTerm } from './IPickerTerm'; -import { ApplicationCustomizerContext } from '@microsoft/sp-application-base'; -/** - * Service implementation to manage term stores in SharePoint - */ -export default class SPTermStorePickerService { - private props; - private context; - private debug; - private clientServiceUrl; - private suggestionServiceUrl; - /** - * Service constructor - */ - constructor(props: ISPTermStorePickerServiceProps, context: ApplicationCustomizerContext, debug?: boolean); - getTermLabels(termId: string): Promise; - /** - * Gets the collection of term stores in the current SharePoint env - */ - getTermStores(): Promise; - /** - * Gets the current term set - */ - getTermSet(): Promise; - /** - * Retrieve all terms for the given term set - * @param termset - */ - getAllTerms(termset: string, hideDeprecatedTags?: boolean, hideTagsNotAvailableForTagging?: boolean, useSessionStorage?: boolean, cacheMinutes?: number): Promise; - /** - * Retrieve all terms that starts with the searchText - * @param searchText - */ - searchTermsByName(searchText: string): Promise; - searchTermsByTermId(searchText: string, termId: string): Promise; - /** - * Retrieve all terms for the given term set and anchorId - */ - getAllTermsByAnchorId(termsetNameOrID: string, anchorId: string, hideDeprecatedTags?: boolean, hideTagsNotAvailableForTagging?: boolean, useSessionStorage?: boolean): Promise; - /** - * Clean the Guid from the Web Service response - * @param guid - */ - cleanGuid(guid: string): string; - /** - * Get the term set ID by its name - * @param termstore - * @param termset - */ - private getTermSetId(termstore, termsetName); - private getCachedTermSet(termId, useSessionStorage?); - private getCachedPickerTerms(termId, useSessionStorage?); - private normalizeCacheMinutes(value); - private ensureSuccessfulResponse(response, operation); - private searchTermsBySearchText(terms, searchText); - /** - * Searches terms for the given term set - * @param searchText - * @param termsetId - */ - private searchTermsByTermSet(searchText); - private isGuid(strGuid); - /** - * Sorting terms based on their path and depth - * - * @param terms - */ - private sortTerms(terms); - /** - * Sort the terms by their path - * - * @param a term 2 - * @param b term 2 - */ - private sortTermByPath(a, b); - private convertTermToPickerTerm(term); - private convertSuggestTermToPickerTerm(term); -} diff --git a/lib/services/SPTermStorePickerService.js b/lib/services/SPTermStorePickerService.js deleted file mode 100644 index b307431..0000000 --- a/lib/services/SPTermStorePickerService.js +++ /dev/null @@ -1,632 +0,0 @@ -/* tslint:disable:no-null-keyword max-line-length typedef no-any no-string-literal variable-name */ -/** - * This code is a copy from the library @pnp/sp-dev-fx-controls-react - */ -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [0, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -import { SPHttpClient } from '@microsoft/sp-http'; -import { findIndex } from '@microsoft/sp-lodash-subset'; -import { debugError } from './MegaMenuDebug'; -var EmptyGuid = '00000000-0000-0000-0000-000000000000'; -var TermCachePrefix = 'MegaMenu:TermSet:v2:'; -var PickerCachePrefix = 'MegaMenu:PickerTerms:v2:'; -/** - * Service implementation to manage term stores in SharePoint - */ -var SPTermStorePickerService = (function () { - /** - * Service constructor - */ - function SPTermStorePickerService(props, context, debug) { - if (debug === void 0) { debug = false; } - this.props = props; - this.context = context; - this.debug = debug; - this.clientServiceUrl = this.context.pageContext.web.absoluteUrl + '/_vti_bin/client.svc/ProcessQuery'; - this.suggestionServiceUrl = this.context.pageContext.web.absoluteUrl + '/_vti_bin/TaxonomyInternalService.json/GetSuggestions'; - } - SPTermStorePickerService.prototype.getTermLabels = function (termId) { - return __awaiter(this, void 0, void 0, function () { - var result, data, reqHeaders, httpPostOptions, callResult, jsonResult, node, error_1; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - result = null; - _a.label = 1; - case 1: - _a.trys.push([1, 4, , 5]); - data = "" + termId + ""; - reqHeaders = new Headers(); - reqHeaders.append('accept', 'application/json'); - reqHeaders.append('content-type', 'application/xml'); - httpPostOptions = { - headers: reqHeaders, - body: data - }; - return [4 /*yield*/, this.context.spHttpClient.post(this.clientServiceUrl, SPHttpClient.configurations.v1, httpPostOptions)]; - case 2: - callResult = _a.sent(); - this.ensureSuccessfulResponse(callResult, 'Term labels'); - return [4 /*yield*/, callResult.json()]; - case 3: - jsonResult = _a.sent(); - node = jsonResult.find(function (x) { return x._ObjectType_ === 'SP.Taxonomy.Term'; }); - if (node && node.Labels && node.Labels._Child_Items_) { - result = node.Labels._Child_Items_.map(function (termLabel) { return termLabel.Value; }); - } - return [3 /*break*/, 5]; - case 4: - error_1 = _a.sent(); - result = null; - debugError(this.debug, 'SPTermStorePickerService', 'Error reading term labels.', error_1); - return [3 /*break*/, 5]; - case 5: return [2 /*return*/, result]; - } - }); - }); - }; - /** - * Gets the collection of term stores in the current SharePoint env - */ - SPTermStorePickerService.prototype.getTermStores = function () { - var _this = this; - // Retrieve the term store name, groups, and term sets - var data = ''; - var reqHeaders = new Headers(); - reqHeaders.append('accept', 'application/json'); - reqHeaders.append('content-type', 'application/xml'); - var httpPostOptions = { - headers: reqHeaders, - body: data - }; - return this.context.spHttpClient.post(this.clientServiceUrl, SPHttpClient.configurations.v1, httpPostOptions).then(function (serviceResponse) { - _this.ensureSuccessfulResponse(serviceResponse, 'Term stores'); - return serviceResponse.json().then(function (serviceJSONResponse) { - // Construct results - var termStoreResult = serviceJSONResponse.filter(function (r) { return r['_ObjectType_'] === 'SP.Taxonomy.TermStore'; }); - // Check if term store was retrieved - if (termStoreResult.length > 0) { - // Check if the termstore needs to be filtered or limited - if (_this.props.termsetNameOrID) { - return termStoreResult.map(function (termstore) { - var termGroups = termstore.Groups._Child_Items_; - // Check if the groups have to be limited to a specific term set - if (_this.props.termsetNameOrID) { - var termsetNameOrId_1 = _this.props.termsetNameOrID; - termGroups = termGroups.map(function (group) { - group.TermSets._Child_Items_ = group.TermSets._Child_Items_.filter(function (termSet) { return termSet.Name === termsetNameOrId_1 || _this.cleanGuid(termSet.Id).toLowerCase() === _this.cleanGuid(termsetNameOrId_1).toLowerCase(); }); - return group; - }); - } - // Filter out all systen groups - termGroups = termGroups.filter(function (group) { return !group.IsSystemGroup; }); - // Filter out empty groups - termGroups = termGroups.filter(function (group) { return group.TermSets._Child_Items_.length > 0; }); - // Map the new groups - termstore.Groups._Child_Items_ = termGroups; - return termstore; - }); - } - // Return the term store results - return termStoreResult; - } - return []; - }); - }); - }; - /** - * Gets the current term set - */ - SPTermStorePickerService.prototype.getTermSet = function () { - return __awaiter(this, void 0, void 0, function () { - var termStore; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, this.getTermStores()]; - case 1: - termStore = _a.sent(); - return [2 /*return*/, this.getTermSetId(termStore, this.props.termsetNameOrID)]; - } - }); - }); - }; - /** - * Retrieve all terms for the given term set - * @param termset - */ - SPTermStorePickerService.prototype.getAllTerms = function (termset, hideDeprecatedTags, hideTagsNotAvailableForTagging, useSessionStorage, cacheMinutes) { - if (useSessionStorage === void 0) { useSessionStorage = true; } - if (cacheMinutes === void 0) { cacheMinutes = 15; } - return __awaiter(this, void 0, void 0, function () { - var _this = this; - var termsetId, termStore, crntTermSet, childTerms, data, reqHeaders, httpPostOptions; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - termsetId = termset; - if (!!this.isGuid(termset)) return [3 /*break*/, 2]; - return [4 /*yield*/, this.getTermStores()]; - case 1: - termStore = _a.sent(); - crntTermSet = this.getTermSetId(termStore, termset); - if (crntTermSet) { - termsetId = this.cleanGuid(crntTermSet.Id); - } - else { - return [2 /*return*/, null]; - } - _a.label = 2; - case 2: - childTerms = this.getCachedTermSet(termsetId, useSessionStorage); - if (childTerms) { - return [2 /*return*/, childTerms]; - } - data = "" + termsetId + ""; - reqHeaders = new Headers(); - reqHeaders.append('accept', 'application/json'); - reqHeaders.append('content-type', 'application/xml'); - httpPostOptions = { - headers: reqHeaders, - body: data - }; - return [2 /*return*/, this.context.spHttpClient.post(this.clientServiceUrl, SPHttpClient.configurations.v1, httpPostOptions).then(function (serviceResponse) { - _this.ensureSuccessfulResponse(serviceResponse, 'Terms'); - return serviceResponse.json().then(function (serviceJSONResponse) { - if (!Array.isArray(serviceJSONResponse)) { - throw new Error('The taxonomy service returned an unexpected response.'); - } - var termStoreResultTermSets = serviceJSONResponse.filter(function (r) { return r['_ObjectType_'] === 'SP.Taxonomy.TermSet'; }); - if (termStoreResultTermSets.length > 0) { - var termStoreResultTermSet_1 = termStoreResultTermSets[0]; - termStoreResultTermSet_1.Terms = []; - // Retrieve the term collection results - var termStoreResultTerms = serviceJSONResponse.filter(function (r) { return r['_ObjectType_'] === 'SP.Taxonomy.TermCollection'; }); - if (termStoreResultTerms.length > 0) { - // Retrieve all terms - var terms = termStoreResultTerms[0]._Child_Items_; - if (hideDeprecatedTags === true) { - terms = terms.filter(function (d) { return d.IsDeprecated === false; }); - } - if (hideTagsNotAvailableForTagging === true) { - terms = terms.filter(function (d) { return d.IsAvailableForTagging === true; }); - } - // Clean the term ID and specify the path depth - terms = terms.map(function (term) { - if (term.IsRoot) { - term.CustomSortOrderIndex = (termStoreResultTermSet_1.CustomSortOrder) ? termStoreResultTermSet_1.CustomSortOrder.split(':').indexOf(_this.cleanGuid(term.Id)) : -1; - } - else { - term.CustomSortOrderIndex = (term['Parent'].CustomSortOrder) ? term['Parent'].CustomSortOrder.split(':').indexOf(_this.cleanGuid(term.Id)) : -1; - } - term.Id = _this.cleanGuid(term.Id); - term['PathDepth'] = term.PathOfTerm.split(';').length; - term.TermSet = { Id: _this.cleanGuid(termStoreResultTermSet_1.Id), Name: termStoreResultTermSet_1.Name }; - if (term['Parent']) { - term.ParentId = _this.cleanGuid(term['Parent'].Id); - } - return term; - }); - // Check if the term set was not empty - if (terms.length > 0) { - // Sort the terms by PathOfTerm and their depth - terms = _this.sortTerms(terms); - termStoreResultTermSet_1.Terms = terms; - } - } - try { - if (useSessionStorage && window.sessionStorage) { - var ttlMinutes = _this.normalizeCacheMinutes(cacheMinutes); - var cacheEntry = { - expiresAt: Date.now() + ttlMinutes * 60 * 1000, - value: termStoreResultTermSet_1 - }; - window.sessionStorage.setItem(TermCachePrefix + termsetId, JSON.stringify(cacheEntry)); - } - } - catch (error) { - // Do nothing, sometimes "storage quota exceeded" error if too many items - } - return termStoreResultTermSet_1; - } - return null; - }); - })]; - } - }); - }); - }; - /** - * Retrieve all terms that starts with the searchText - * @param searchText - */ - SPTermStorePickerService.prototype.searchTermsByName = function (searchText) { - return this.searchTermsByTermSet(searchText); - }; - SPTermStorePickerService.prototype.searchTermsByTermId = function (searchText, termId) { - return __awaiter(this, void 0, void 0, function () { - var useSessionStorage, childTerms, _a, termsetNameOrID, hideDeprecatedTags, hideTagsNotAvailableForTagging, terms; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - useSessionStorage = this.props.useSessionStorage; - childTerms = this.getCachedPickerTerms(termId, useSessionStorage); - if (!childTerms) return [3 /*break*/, 1]; - return [2 /*return*/, this.searchTermsBySearchText(childTerms, searchText)]; - case 1: - _a = this.props, termsetNameOrID = _a.termsetNameOrID, hideDeprecatedTags = _a.hideDeprecatedTags, hideTagsNotAvailableForTagging = _a.hideTagsNotAvailableForTagging; - return [4 /*yield*/, this.getAllTermsByAnchorId(termsetNameOrID, termId, hideDeprecatedTags, hideTagsNotAvailableForTagging, useSessionStorage)]; - case 2: - terms = _b.sent(); - if (terms) { - return [2 /*return*/, this.searchTermsBySearchText(terms, searchText)]; - } - _b.label = 3; - case 3: return [2 /*return*/, null]; - } - }); - }); - }; - /** - * Retrieve all terms for the given term set and anchorId - */ - SPTermStorePickerService.prototype.getAllTermsByAnchorId = function (termsetNameOrID, anchorId, hideDeprecatedTags, hideTagsNotAvailableForTagging, useSessionStorage) { - if (useSessionStorage === void 0) { useSessionStorage = true; } - return __awaiter(this, void 0, void 0, function () { - var _this = this; - var returnTerms, childTerms, termSet, terms, anchorTerm_1, anchorTermPath_1, anchorTerms, cacheEntry; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - returnTerms = []; - childTerms = this.getCachedPickerTerms(anchorId, useSessionStorage); - if (childTerms) { - return [2 /*return*/, childTerms]; - } - return [4 /*yield*/, this.getAllTerms(termsetNameOrID, hideDeprecatedTags, hideTagsNotAvailableForTagging, useSessionStorage, this.props.cacheMinutes)]; - case 1: - termSet = _a.sent(); - terms = termSet.Terms; - if (anchorId) { - anchorTerm_1 = terms.filter(function (t) { return t.Id.toLowerCase() === anchorId.toLowerCase(); }).shift(); - if (anchorTerm_1) { - anchorTermPath_1 = anchorTerm_1.PathOfTerm + ";"; - anchorTerms = terms.filter(function (t) { return t.PathOfTerm.substring(0, anchorTermPath_1.length) === anchorTermPath_1 && t.Id !== anchorTerm_1.Id; }); - anchorTerms.forEach(function (term) { - returnTerms.push(_this.convertTermToPickerTerm(term)); - }); - try { - if (useSessionStorage && window.sessionStorage) { - cacheEntry = { - expiresAt: Date.now() + this.normalizeCacheMinutes(this.props.cacheMinutes) * 60 * 1000, - value: returnTerms - }; - window.sessionStorage.setItem(PickerCachePrefix + anchorId, JSON.stringify(cacheEntry)); - } - } - catch (error) { - // Do nothing - } - } - } - else { - terms.forEach(function (term) { - returnTerms.push(_this.convertTermToPickerTerm(term)); - }); - } - return [2 /*return*/, returnTerms]; - } - }); - }); - }; - /** - * Clean the Guid from the Web Service response - * @param guid - */ - SPTermStorePickerService.prototype.cleanGuid = function (guid) { - if (guid !== undefined) { - return guid.replace('/Guid(', '').replace('/', '').replace(')', ''); - } - else { - return ''; - } - }; - /** - * Get the term set ID by its name - * @param termstore - * @param termset - */ - SPTermStorePickerService.prototype.getTermSetId = function (termstore, termsetName) { - if (termstore && termstore.length > 0 && termsetName) { - // Get the first term store - var ts = termstore[0]; - // Check if the term store contains groups - if (ts.Groups && ts.Groups._Child_Items_) { - for (var _i = 0, _a = ts.Groups._Child_Items_; _i < _a.length; _i++) { - var group = _a[_i]; - // Check if the group contains term sets - if (group.TermSets && group.TermSets._Child_Items_) { - for (var _b = 0, _c = group.TermSets._Child_Items_; _b < _c.length; _b++) { - var termSet = _c[_b]; - // Check if the term set is found - if (termSet.Name === termsetName) { - return termSet; - } - } - } - } - } - } - return null; - }; - SPTermStorePickerService.prototype.getCachedTermSet = function (termId, useSessionStorage) { - if (useSessionStorage === void 0) { useSessionStorage = true; } - try { - if (useSessionStorage && window.sessionStorage) { - var key = TermCachePrefix + termId; - var terms = window.sessionStorage.getItem(key); - if (!terms) { - return null; - } - var cacheEntry = JSON.parse(terms); - if (!cacheEntry || !cacheEntry.value || !cacheEntry.expiresAt || cacheEntry.expiresAt <= Date.now()) { - window.sessionStorage.removeItem(key); - return null; - } - return cacheEntry.value; - } - else { - return null; - } - } - catch (error) { - return null; - } - }; - SPTermStorePickerService.prototype.getCachedPickerTerms = function (termId, useSessionStorage) { - if (useSessionStorage === void 0) { useSessionStorage = true; } - try { - if (!useSessionStorage || !window.sessionStorage) { - return null; - } - var key = PickerCachePrefix + termId; - var serialized = window.sessionStorage.getItem(key); - if (!serialized) { - return null; - } - var cacheEntry = JSON.parse(serialized); - if (!cacheEntry || !cacheEntry.value || !cacheEntry.expiresAt || cacheEntry.expiresAt <= Date.now()) { - window.sessionStorage.removeItem(key); - return null; - } - return cacheEntry.value; - } - catch (error) { - return null; - } - }; - SPTermStorePickerService.prototype.normalizeCacheMinutes = function (value) { - if (typeof value !== 'number' || !isFinite(value)) { - return 15; - } - return Math.min(Math.max(Math.floor(value), 1), 1440); - }; - SPTermStorePickerService.prototype.ensureSuccessfulResponse = function (response, operation) { - if (!response.ok) { - throw new Error(operation + ' request failed (' + response.status + ' ' + response.statusText + ').'); - } - }; - SPTermStorePickerService.prototype.searchTermsBySearchText = function (terms, searchText) { - if (terms) { - return terms.filter(function (t) { return t.name.toLowerCase().indexOf(searchText.toLowerCase()) > -1; }); - } - else { - return []; - } - }; - /** - * Searches terms for the given term set - * @param searchText - * @param termsetId - */ - SPTermStorePickerService.prototype.searchTermsByTermSet = function (searchText) { - var _this = this; - return new Promise(function (resolve) { - _this.getTermStores().then(function (termStore) { - var termSetId = _this.props.termsetNameOrID; - if (!_this.isGuid(termSetId)) { - // Get the ID of the provided term set name - var crntTermSet = _this.getTermSetId(termStore, termSetId); - if (crntTermSet) { - termSetId = _this.cleanGuid(crntTermSet.Id); - } - else { - resolve(null); - return; - } - } - if (termStore === undefined || termStore.length === 0) { - resolve(null); - return; - } - var loc = _this.context.pageContext.cultureInfo.currentUICultureName === 'de-de' ? 1031 : 1033; - var data = { - start: searchText, - lcid: loc !== 0 ? loc : _this.context.pageContext.web.language, - sspList: _this.cleanGuid(termStore[0].Id), - termSetList: termSetId, - anchorId: _this.props.anchorId ? _this.props.anchorId : EmptyGuid, - isSpanTermStores: false, - isSpanTermSets: false, - isIncludeUnavailable: _this.props.hideTagsNotAvailableForTagging === true, - isIncludeDeprecated: _this.props.hideDeprecatedTags === true, - isAddTerms: false, - isIncludePathData: false, - excludeKeyword: false, - excludedTermset: EmptyGuid - }; - var reqHeaders = new Headers(); - reqHeaders.append('accept', 'application/json'); - reqHeaders.append('content-type', 'application/json'); - var httpPostOptions = { - headers: reqHeaders, - body: JSON.stringify(data) - }; - return _this.context.spHttpClient.post(_this.suggestionServiceUrl, SPHttpClient.configurations.v1, httpPostOptions).then(function (serviceResponse) { - return serviceResponse.json().then(function (serviceJSONResponse) { - var groups = serviceJSONResponse.d.Groups; - if (groups && groups.length > 0) { - // Retrieve the term collection results - var terms = groups[0].Suggestions; - if (terms.length > 0) { - // Retrieve all terms - var returnTerms = terms.map(function (term) { return _this.convertSuggestTermToPickerTerm(term); }); - resolve(returnTerms); - return; - } - } - resolve([]); - }); - }); - }); - }); - }; - SPTermStorePickerService.prototype.isGuid = function (strGuid) { - 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(strGuid); - }; - /** - * Sorting terms based on their path and depth - * - * @param terms - */ - SPTermStorePickerService.prototype.sortTerms = function (terms) { - // Start sorting by depth - var newTermsOrder = []; - var itemsToSort = true; - var pathLevel = 1; - while (itemsToSort) { - // Get terms for the current level - var crntTerms = terms.filter(function (term) { return term.PathDepth === pathLevel; }); - if (crntTerms && crntTerms.length > 0) { - crntTerms = crntTerms.sort(this.sortTermByPath); - if (pathLevel !== 1) { - crntTerms = crntTerms.reverse(); - var _loop_1 = function (crntTerm) { - var pathElms = crntTerm.PathOfTerm.split(';'); - // Last item is not needed for parent path - pathElms.pop(); - // Find the parent item and add the new item - var idx = findIndex(newTermsOrder, function (term) { return term.PathOfTerm === pathElms.join(';'); }); - if (idx !== -1) { - newTermsOrder.splice(idx + 1, 0, crntTerm); - } - else { - // Push the item at the end if the parent couldn't be found - newTermsOrder.push(crntTerm); - } - }; - for (var _i = 0, crntTerms_1 = crntTerms; _i < crntTerms_1.length; _i++) { - var crntTerm = crntTerms_1[_i]; - _loop_1(crntTerm); - } - } - else { - newTermsOrder = crntTerms; - } - ++pathLevel; - } - else { - itemsToSort = false; - } - } - return newTermsOrder; - }; - /** - * Sort the terms by their path - * - * @param a term 2 - * @param b term 2 - */ - SPTermStorePickerService.prototype.sortTermByPath = function (a, b) { - if (a.CustomSortOrderIndex === -1) { - if (a.PathOfTerm.toLowerCase() < b.PathOfTerm.toLowerCase()) { - return -1; - } - if (a.PathOfTerm.toLowerCase() > b.PathOfTerm.toLowerCase()) { - return 1; - } - return 0; - } - else { - if (a.CustomSortOrderIndex < b.CustomSortOrderIndex) { - return -1; - } - if (a.CustomSortOrderIndex > b.CustomSortOrderIndex) { - return 1; - } - return 0; - } - }; - SPTermStorePickerService.prototype.convertTermToPickerTerm = function (term) { - return { - key: this.cleanGuid(term.Id), - name: term.Name, - path: term.PathOfTerm, - termSet: this.cleanGuid(term.TermSet.Id), - termSetName: term.TermSet.Name - }; - }; - SPTermStorePickerService.prototype.convertSuggestTermToPickerTerm = function (term) { - var path = ''; - var termSetName = ''; - if (term.Paths && term.Paths.length > 0) { - var fullPath = term.Paths[0].replace(/^\[/, '').replace(/\]$/, ''); - var fullPathParts = fullPath.split(':'); - path = fullPathParts.join(';') + ';' + term.DefaultLabel; - termSetName = fullPathParts[0]; - } - return { - key: this.cleanGuid(term.Id), - name: term.DefaultLabel, - path: path, - termSet: EmptyGuid, - termSetName: termSetName - }; - }; - return SPTermStorePickerService; -}()); -export default SPTermStorePickerService; - -//# sourceMappingURL=SPTermStorePickerService.js.map diff --git a/lib/services/SPTermStorePickerService.js.map b/lib/services/SPTermStorePickerService.js.map deleted file mode 100644 index be7b97f..0000000 --- a/lib/services/SPTermStorePickerService.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["services/SPTermStorePickerService.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG;;GAEG;;;;;;;;;;;;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;QAC7B,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;YACtC,IAAM,QAAQ,GAAW,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;YAC7E,IAAM,aAAa,GAAa,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACpD,IAAI,GAAG,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC,YAAY,CAAC;YACzD,WAAW,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;QACnC,CAAC;QACD,MAAM,CAAC;YACH,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;YAC5B,IAAI,EAAE,IAAI,CAAC,YAAY;YACvB,IAAI,EAAE,IAAI;YACV,OAAO,EAAE,SAAS;YAClB,WAAW,EAAE,WAAW;SAC3B,CAAC;IACN,CAAC;IACL,+BAAC;AAAD,CAtkBA,AAskBC,IAAA","file":"services/SPTermStorePickerService.js","sourcesContent":["/* tslint:disable:no-null-keyword max-line-length typedef no-any no-string-literal variable-name */\r\n/**\r\n * This code is a copy from the library @pnp/sp-dev-fx-controls-react\r\n */\r\n\r\nimport { SPHttpClient, SPHttpClientResponse, ISPHttpClientOptions } from '@microsoft/sp-http';\r\nimport { ITermStore, ITerms, ITerm, IGroup, ITermSet, ISuggestTerm } from './ISPTermStorePickerService';\r\nimport { findIndex } from '@microsoft/sp-lodash-subset';\r\nimport { ISPTermStorePickerServiceProps } from './ISPTermStorePickerServiceProps';\r\nimport { IPickerTerm } from './IPickerTerm';\r\nimport { ApplicationCustomizerContext } from '@microsoft/sp-application-base';\r\nimport { debugError } from './MegaMenuDebug';\r\n\r\nconst EmptyGuid: string = '00000000-0000-0000-0000-000000000000';\nconst TermCachePrefix: string = 'MegaMenu:TermSet:v2:';\nconst PickerCachePrefix: string = 'MegaMenu:PickerTerms:v2:';\n\ninterface ITermCacheEntry {\n expiresAt: number;\n value: ITermSet;\n}\n\ninterface IPickerTermCacheEntry {\n expiresAt: number;\n value: IPickerTerm[];\n}\n\r\n/**\r\n * Service implementation to manage term stores in SharePoint\r\n */\r\nexport default class SPTermStorePickerService {\r\n private clientServiceUrl: string;\r\n private suggestionServiceUrl: string;\r\n\r\n /**\r\n * Service constructor\r\n */\r\n constructor(private props: ISPTermStorePickerServiceProps, private context: ApplicationCustomizerContext, private debug: boolean = false) {\r\n this.clientServiceUrl = this.context.pageContext.web.absoluteUrl + '/_vti_bin/client.svc/ProcessQuery';\r\n this.suggestionServiceUrl = this.context.pageContext.web.absoluteUrl + '/_vti_bin/TaxonomyInternalService.json/GetSuggestions';\r\n }\r\n\r\n public async getTermLabels(termId: string): Promise {\r\n let result: string[] = null;\r\n try {\r\n const data = `${termId}`;\n\r\n const reqHeaders = new Headers();\r\n reqHeaders.append('accept', 'application/json');\r\n reqHeaders.append('content-type', 'application/xml');\r\n\r\n const httpPostOptions: ISPHttpClientOptions = {\r\n headers: reqHeaders,\r\n body: data\r\n };\r\n\r\n const callResult = await this.context.spHttpClient.post(this.clientServiceUrl, SPHttpClient.configurations.v1, httpPostOptions);\n this.ensureSuccessfulResponse(callResult, 'Term labels');\n const jsonResult = await callResult.json();\n\r\n const node = jsonResult.find(x => x._ObjectType_ === 'SP.Taxonomy.Term');\r\n if (node && node.Labels && node.Labels._Child_Items_) {\r\n result = node.Labels._Child_Items_.map(termLabel => termLabel.Value);\r\n }\r\n } catch (error) {\r\n result = null;\r\n debugError(this.debug, 'SPTermStorePickerService', 'Error reading term labels.', error);\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Gets the collection of term stores in the current SharePoint env\r\n */\r\n public getTermStores(): Promise {\r\n // Retrieve the term store name, groups, and term sets\r\n const data = '';\r\n\r\n const reqHeaders = new Headers();\r\n reqHeaders.append('accept', 'application/json');\r\n reqHeaders.append('content-type', 'application/xml');\r\n\r\n const httpPostOptions: ISPHttpClientOptions = {\r\n headers: reqHeaders,\r\n body: data\r\n };\r\n\r\n return this.context.spHttpClient.post(this.clientServiceUrl, SPHttpClient.configurations.v1, httpPostOptions).then((serviceResponse: SPHttpClientResponse) => {\n this.ensureSuccessfulResponse(serviceResponse, 'Term stores');\n return serviceResponse.json().then((serviceJSONResponse: any) => {\n // Construct results\r\n const termStoreResult: ITermStore[] = serviceJSONResponse.filter((r: { [x: string]: string; }) => r['_ObjectType_'] === 'SP.Taxonomy.TermStore');\r\n // Check if term store was retrieved\r\n if (termStoreResult.length > 0) {\r\n // Check if the termstore needs to be filtered or limited\r\n if (this.props.termsetNameOrID) {\r\n return termStoreResult.map(termstore => {\r\n let termGroups = termstore.Groups._Child_Items_;\r\n\r\n // Check if the groups have to be limited to a specific term set\r\n if (this.props.termsetNameOrID) {\r\n const termsetNameOrId = this.props.termsetNameOrID;\r\n termGroups = termGroups.map((group: IGroup) => {\r\n group.TermSets._Child_Items_ = group.TermSets._Child_Items_.filter((termSet: ITermSet) => termSet.Name === termsetNameOrId || this.cleanGuid(termSet.Id).toLowerCase() === this.cleanGuid(termsetNameOrId).toLowerCase());\r\n return group;\r\n });\r\n }\r\n\r\n // Filter out all systen groups\r\n termGroups = termGroups.filter(group => !group.IsSystemGroup);\r\n\r\n // Filter out empty groups\r\n termGroups = termGroups.filter((group: IGroup) => group.TermSets._Child_Items_.length > 0);\r\n\r\n // Map the new groups\r\n termstore.Groups._Child_Items_ = termGroups;\r\n return termstore;\r\n });\r\n }\r\n\r\n // Return the term store results\r\n return termStoreResult;\r\n }\r\n return [];\r\n });\r\n });\r\n }\r\n\r\n /**\r\n * Gets the current term set\r\n */\r\n public async getTermSet(): Promise {\r\n const termStore = await this.getTermStores();\r\n return this.getTermSetId(termStore, this.props.termsetNameOrID);\r\n }\r\n\r\n /**\r\n * Retrieve all terms for the given term set\r\n * @param termset\r\n */\r\n public async getAllTerms(\n termset: string,\n hideDeprecatedTags?: boolean,\n hideTagsNotAvailableForTagging?: boolean,\n useSessionStorage: boolean = true,\n cacheMinutes: number = 15\n ): Promise {\n let termsetId: string = termset;\r\n // Check if the provided term set property is a GUID or string\r\n if (!this.isGuid(termset)) {\r\n // Fetch the term store information\r\n const termStore = await this.getTermStores();\r\n // Get the ID of the provided term set name\r\n const crntTermSet = this.getTermSetId(termStore, termset);\r\n if (crntTermSet) {\r\n termsetId = this.cleanGuid(crntTermSet.Id);\r\n } else {\r\n return null;\r\n }\r\n }\r\n\r\n const childTerms = this.getCachedTermSet(termsetId, useSessionStorage);\n\r\n if (childTerms) {\r\n return childTerms;\r\n }\r\n\r\n // Request body to retrieve all terms for the given term set\r\n const data = `${termsetId}`;\n\r\n const reqHeaders = new Headers();\r\n reqHeaders.append('accept', 'application/json');\r\n reqHeaders.append('content-type', 'application/xml');\r\n\r\n const httpPostOptions: ISPHttpClientOptions = {\r\n headers: reqHeaders,\r\n body: data\r\n };\r\n\r\n return this.context.spHttpClient.post(this.clientServiceUrl, SPHttpClient.configurations.v1, httpPostOptions).then((serviceResponse: SPHttpClientResponse) => {\n this.ensureSuccessfulResponse(serviceResponse, 'Terms');\n return serviceResponse.json().then((serviceJSONResponse: any) => {\n if (!Array.isArray(serviceJSONResponse)) {\n throw new Error('The taxonomy service returned an unexpected response.');\n }\n const termStoreResultTermSets: ITermSet[] = serviceJSONResponse.filter((r: { [x: string]: string; }) => r['_ObjectType_'] === 'SP.Taxonomy.TermSet');\r\n\r\n if (termStoreResultTermSets.length > 0) {\r\n const termStoreResultTermSet = termStoreResultTermSets[0];\r\n termStoreResultTermSet.Terms = [];\r\n // Retrieve the term collection results\r\n const termStoreResultTerms: ITerms[] = serviceJSONResponse.filter((r: { [x: string]: string; }) => r['_ObjectType_'] === 'SP.Taxonomy.TermCollection');\r\n if (termStoreResultTerms.length > 0) {\r\n // Retrieve all terms\r\n let terms = termStoreResultTerms[0]._Child_Items_;\r\n\r\n if (hideDeprecatedTags === true) {\r\n terms = terms.filter(d => d.IsDeprecated === false);\r\n }\r\n\r\n if (hideTagsNotAvailableForTagging === true) {\r\n terms = terms.filter(d => d.IsAvailableForTagging === true);\r\n }\r\n\r\n // Clean the term ID and specify the path depth\r\n terms = terms.map(term => {\r\n if (term.IsRoot) {\r\n term.CustomSortOrderIndex = (termStoreResultTermSet.CustomSortOrder) ? termStoreResultTermSet.CustomSortOrder.split(':').indexOf(this.cleanGuid(term.Id)) : -1;\r\n } else {\r\n term.CustomSortOrderIndex = (term['Parent'].CustomSortOrder) ? term['Parent'].CustomSortOrder.split(':').indexOf(this.cleanGuid(term.Id)) : -1;\r\n }\r\n term.Id = this.cleanGuid(term.Id);\r\n term['PathDepth'] = term.PathOfTerm.split(';').length;\r\n term.TermSet = { Id: this.cleanGuid(termStoreResultTermSet.Id), Name: termStoreResultTermSet.Name };\r\n if (term['Parent']) {\r\n term.ParentId = this.cleanGuid(term['Parent'].Id);\r\n }\r\n return term;\r\n });\r\n // Check if the term set was not empty\r\n if (terms.length > 0) {\r\n // Sort the terms by PathOfTerm and their depth\r\n terms = this.sortTerms(terms);\r\n termStoreResultTermSet.Terms = terms;\r\n }\r\n }\r\n\r\n try {\r\n if (useSessionStorage && window.sessionStorage) {\r\n const ttlMinutes: number = this.normalizeCacheMinutes(cacheMinutes);\n const cacheEntry: ITermCacheEntry = {\n expiresAt: Date.now() + ttlMinutes * 60 * 1000,\n value: termStoreResultTermSet\n };\n window.sessionStorage.setItem(TermCachePrefix + termsetId, JSON.stringify(cacheEntry));\n }\r\n } catch (error) {\r\n // Do nothing, sometimes \"storage quota exceeded\" error if too many items\r\n }\r\n return termStoreResultTermSet;\r\n }\r\n return null;\r\n });\r\n });\r\n }\r\n\r\n /**\r\n * Retrieve all terms that starts with the searchText\r\n * @param searchText\r\n */\r\n public searchTermsByName(searchText: string): Promise {\r\n return this.searchTermsByTermSet(searchText);\r\n }\r\n\r\n public async searchTermsByTermId(searchText: string, termId: string): Promise {\r\n const { useSessionStorage } = this.props;\r\n const childTerms = this.getCachedPickerTerms(termId, useSessionStorage);\n if (childTerms) {\r\n return this.searchTermsBySearchText(childTerms, searchText);\r\n } else {\r\n const {\r\n termsetNameOrID,\r\n hideDeprecatedTags,\r\n hideTagsNotAvailableForTagging\r\n } = this.props;\r\n\r\n const terms = await this.getAllTermsByAnchorId(\r\n termsetNameOrID,\r\n termId,\r\n hideDeprecatedTags,\r\n hideTagsNotAvailableForTagging,\r\n useSessionStorage);\r\n\r\n if (terms) {\r\n return this.searchTermsBySearchText(terms, searchText);\r\n }\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Retrieve all terms for the given term set and anchorId\r\n */\r\n public async getAllTermsByAnchorId(termsetNameOrID: string, anchorId: string, hideDeprecatedTags?: boolean, hideTagsNotAvailableForTagging?: boolean, useSessionStorage: boolean = true): Promise {\r\n\r\n const returnTerms: IPickerTerm[] = [];\r\n\r\n const childTerms = this.getCachedPickerTerms(anchorId, useSessionStorage);\n if (childTerms) {\r\n return childTerms;\r\n }\r\n\r\n const termSet = await this.getAllTerms(\n termsetNameOrID,\n hideDeprecatedTags,\n hideTagsNotAvailableForTagging,\n useSessionStorage,\n this.props.cacheMinutes\n );\n const terms = termSet.Terms;\r\n if (anchorId) {\r\n const anchorTerm = terms.filter(t => t.Id.toLowerCase() === anchorId.toLowerCase()).shift();\r\n if (anchorTerm) {\r\n // Append ';' separator, as a suffix to anchor term path.\r\n const anchorTermPath = `${anchorTerm.PathOfTerm};`;\r\n const anchorTerms: ITerm[] = terms.filter(t => t.PathOfTerm.substring(0, anchorTermPath.length) === anchorTermPath && t.Id !== anchorTerm.Id);\r\n\r\n anchorTerms.forEach(term => {\r\n returnTerms.push(this.convertTermToPickerTerm(term));\r\n });\r\n\r\n try {\r\n if (useSessionStorage && window.sessionStorage) {\r\n const cacheEntry: IPickerTermCacheEntry = {\n expiresAt: Date.now() + this.normalizeCacheMinutes(this.props.cacheMinutes) * 60 * 1000,\n value: returnTerms\n };\n window.sessionStorage.setItem(PickerCachePrefix + anchorId, JSON.stringify(cacheEntry));\n }\r\n } catch (error) {\r\n // Do nothing\r\n }\r\n }\r\n } else {\r\n terms.forEach(term => {\r\n returnTerms.push(this.convertTermToPickerTerm(term));\r\n });\r\n }\r\n\r\n return returnTerms;\r\n }\r\n\r\n /**\r\n * Clean the Guid from the Web Service response\r\n * @param guid\r\n */\r\n public cleanGuid(guid: string): string {\r\n if (guid !== undefined) {\r\n return guid.replace('/Guid(', '').replace('/', '').replace(')', '');\r\n } else {\r\n return '';\r\n }\r\n }\r\n\r\n /**\r\n * Get the term set ID by its name\r\n * @param termstore\r\n * @param termset\r\n */\r\n private getTermSetId(termstore: ITermStore[], termsetName: string): ITermSet {\r\n if (termstore && termstore.length > 0 && termsetName) {\r\n // Get the first term store\r\n const ts = termstore[0];\r\n // Check if the term store contains groups\r\n if (ts.Groups && ts.Groups._Child_Items_) {\r\n for (const group of ts.Groups._Child_Items_) {\r\n // Check if the group contains term sets\r\n if (group.TermSets && group.TermSets._Child_Items_) {\r\n for (const termSet of group.TermSets._Child_Items_) {\r\n // Check if the term set is found\r\n if (termSet.Name === termsetName) {\r\n return termSet;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n return null;\r\n }\r\n\r\n private getCachedTermSet(termId: string, useSessionStorage: boolean = true): ITermSet {\n try {\n if (useSessionStorage && window.sessionStorage) {\n const key: string = TermCachePrefix + termId;\n const terms: string = window.sessionStorage.getItem(key);\n if (!terms) {\n return null;\n }\n\n const cacheEntry: ITermCacheEntry = JSON.parse(terms) as ITermCacheEntry;\n if (!cacheEntry || !cacheEntry.value || !cacheEntry.expiresAt || cacheEntry.expiresAt <= Date.now()) {\n window.sessionStorage.removeItem(key);\n return null;\n }\n return cacheEntry.value;\n } else {\n return null;\n }\r\n } catch (error) {\r\n return null;\r\n }\r\n }\n\n private getCachedPickerTerms(termId: string, useSessionStorage: boolean = true): IPickerTerm[] {\n try {\n if (!useSessionStorage || !window.sessionStorage) {\n return null;\n }\n\n const key: string = PickerCachePrefix + termId;\n const serialized: string = window.sessionStorage.getItem(key);\n if (!serialized) {\n return null;\n }\n\n const cacheEntry: IPickerTermCacheEntry = JSON.parse(serialized) as IPickerTermCacheEntry;\n if (!cacheEntry || !cacheEntry.value || !cacheEntry.expiresAt || cacheEntry.expiresAt <= Date.now()) {\n window.sessionStorage.removeItem(key);\n return null;\n }\n return cacheEntry.value;\n } catch (error) {\n return null;\n }\n }\n\n private normalizeCacheMinutes(value: number): number {\n if (typeof value !== 'number' || !isFinite(value)) {\n return 15;\n }\n return Math.min(Math.max(Math.floor(value), 1), 1440);\n }\n\n private ensureSuccessfulResponse(response: SPHttpClientResponse, operation: string): void {\n if (!response.ok) {\n throw new Error(operation + ' request failed (' + response.status + ' ' + response.statusText + ').');\n }\n }\n\r\n private searchTermsBySearchText(terms, searchText) {\r\n if (terms) {\r\n return terms.filter((t) => { return t.name.toLowerCase().indexOf(searchText.toLowerCase()) > -1; });\r\n } else {\r\n return [];\r\n }\r\n }\r\n\r\n /**\r\n * Searches terms for the given term set\r\n * @param searchText\r\n * @param termsetId\r\n */\r\n private searchTermsByTermSet(searchText: string): Promise {\r\n return new Promise(resolve => {\r\n this.getTermStores().then(termStore => {\r\n let termSetId = this.props.termsetNameOrID;\r\n if (!this.isGuid(termSetId)) {\r\n // Get the ID of the provided term set name\r\n const crntTermSet = this.getTermSetId(termStore, termSetId);\r\n if (crntTermSet) {\r\n termSetId = this.cleanGuid(crntTermSet.Id);\r\n } else {\r\n resolve(null);\r\n return;\r\n }\r\n }\r\n if (termStore === undefined || termStore.length === 0) {\r\n resolve(null);\r\n return;\r\n }\r\n const loc: number = this.context.pageContext.cultureInfo.currentUICultureName === 'de-de' ? 1031 : 1033;\r\n const data: any = {\r\n start: searchText,\r\n lcid: loc !== 0 ? loc : this.context.pageContext.web.language,\r\n sspList: this.cleanGuid(termStore[0].Id),\r\n termSetList: termSetId,\r\n anchorId: this.props.anchorId ? this.props.anchorId : EmptyGuid,\r\n isSpanTermStores: false,\r\n isSpanTermSets: false,\r\n isIncludeUnavailable: this.props.hideTagsNotAvailableForTagging === true,\r\n isIncludeDeprecated: this.props.hideDeprecatedTags === true,\r\n isAddTerms: false,\r\n isIncludePathData: false,\r\n excludeKeyword: false,\r\n excludedTermset: EmptyGuid\r\n };\r\n\r\n const reqHeaders: Headers = new Headers();\r\n reqHeaders.append('accept', 'application/json');\r\n reqHeaders.append('content-type', 'application/json');\r\n\r\n const httpPostOptions: ISPHttpClientOptions = {\r\n headers: reqHeaders,\r\n body: JSON.stringify(data)\r\n };\r\n\r\n return this.context.spHttpClient.post(this.suggestionServiceUrl, SPHttpClient.configurations.v1, httpPostOptions).then((serviceResponse: SPHttpClientResponse) => {\r\n return serviceResponse.json().then((serviceJSONResponse: any) => {\r\n const groups = serviceJSONResponse.d.Groups;\r\n if (groups && groups.length > 0) {\r\n // Retrieve the term collection results\r\n const terms: ISuggestTerm[] = groups[0].Suggestions;\r\n if (terms.length > 0) {\r\n // Retrieve all terms\r\n\r\n const returnTerms: IPickerTerm[] = terms.map((term: ISuggestTerm) => this.convertSuggestTermToPickerTerm(term));\r\n resolve(returnTerms);\r\n return;\r\n }\r\n\r\n }\r\n\r\n resolve([]);\r\n });\r\n });\r\n });\r\n });\r\n }\r\n\r\n private isGuid(strGuid: string): boolean {\r\n 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(strGuid);\r\n }\r\n\r\n /**\r\n * Sorting terms based on their path and depth\r\n *\r\n * @param terms\r\n */\r\n private sortTerms(terms: ITerm[]) {\r\n // Start sorting by depth\r\n let newTermsOrder: ITerm[] = [];\r\n let itemsToSort: boolean = true;\r\n let pathLevel: number = 1;\r\n while (itemsToSort) {\r\n // Get terms for the current level\r\n let crntTerms = terms.filter(term => term.PathDepth === pathLevel);\r\n if (crntTerms && crntTerms.length > 0) {\r\n crntTerms = crntTerms.sort(this.sortTermByPath);\r\n\r\n if (pathLevel !== 1) {\r\n crntTerms = crntTerms.reverse();\r\n for (const crntTerm of crntTerms) {\r\n const pathElms: string[] = crntTerm.PathOfTerm.split(';');\r\n // Last item is not needed for parent path\r\n pathElms.pop();\r\n // Find the parent item and add the new item\r\n const idx: number = findIndex(newTermsOrder, term => term.PathOfTerm === pathElms.join(';'));\r\n if (idx !== -1) {\r\n newTermsOrder.splice(idx + 1, 0, crntTerm);\r\n } else {\r\n // Push the item at the end if the parent couldn't be found\r\n newTermsOrder.push(crntTerm);\r\n }\r\n }\r\n } else {\r\n newTermsOrder = crntTerms;\r\n }\r\n\r\n ++pathLevel;\r\n } else {\r\n itemsToSort = false;\r\n }\r\n }\r\n return newTermsOrder;\r\n }\r\n\r\n /**\r\n * Sort the terms by their path\r\n *\r\n * @param a term 2\r\n * @param b term 2\r\n */\r\n private sortTermByPath(a: ITerm, b: ITerm) {\r\n if (a.CustomSortOrderIndex === -1) {\r\n if (a.PathOfTerm.toLowerCase() < b.PathOfTerm.toLowerCase()) {\r\n return -1;\r\n }\r\n if (a.PathOfTerm.toLowerCase() > b.PathOfTerm.toLowerCase()) {\r\n return 1;\r\n }\r\n return 0;\r\n } else {\r\n if (a.CustomSortOrderIndex < b.CustomSortOrderIndex) {\r\n return -1;\r\n }\r\n if (a.CustomSortOrderIndex > b.CustomSortOrderIndex) {\r\n return 1;\r\n }\r\n return 0;\r\n }\r\n }\r\n\r\n private convertTermToPickerTerm(term: ITerm): IPickerTerm {\r\n return {\r\n key: this.cleanGuid(term.Id),\r\n name: term.Name,\r\n path: term.PathOfTerm,\r\n termSet: this.cleanGuid(term.TermSet.Id),\r\n termSetName: term.TermSet.Name\r\n };\r\n }\r\n\r\n private convertSuggestTermToPickerTerm(term: ISuggestTerm): IPickerTerm {\r\n let path: string = '';\r\n let termSetName: string = '';\r\n if (term.Paths && term.Paths.length > 0) {\r\n const fullPath: string = term.Paths[0].replace(/^\\[/, '').replace(/\\]$/, '');\r\n const fullPathParts: string[] = fullPath.split(':');\r\n path = fullPathParts.join(';') + ';' + term.DefaultLabel;\r\n termSetName = fullPathParts[0];\r\n }\r\n return {\r\n key: this.cleanGuid(term.Id),\r\n name: term.DefaultLabel,\r\n path: path,\r\n termSet: EmptyGuid, // TermSet Guid is not given with suggestion\r\n termSetName: termSetName\r\n };\r\n }\r\n}\r\n"],"sourceRoot":"..\\..\\src"} \ No newline at end of file diff --git a/lib/services/TaxonomyNavigationService.d.ts b/lib/services/TaxonomyNavigationService.d.ts deleted file mode 100644 index 659cebc..0000000 --- a/lib/services/TaxonomyNavigationService.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { ITaxonomyNavigationService } from './ITaxonomyNavigationService'; -import { IMenuItem } from './IMenuItem'; -import { ApplicationCustomizerContext } from '@microsoft/sp-application-base'; -export declare class TaxonomyNavigationService implements ITaxonomyNavigationService { - private context; - private termSetNameOrId; - private debug; - private cacheMinutes; - private _taxonomyPickerService; - constructor(context: ApplicationCustomizerContext, termSetNameOrId: string, debug?: boolean, cacheMinutes?: number); - getMenuItems(): Promise; -} diff --git a/lib/services/TaxonomyNavigationService.js b/lib/services/TaxonomyNavigationService.js deleted file mode 100644 index 518709f..0000000 --- a/lib/services/TaxonomyNavigationService.js +++ /dev/null @@ -1,104 +0,0 @@ -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [0, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -import { sp } from '@pnp/sp'; -import { MenuItem } from './MenuItem'; -import SPTermStorePickerService from './SPTermStorePickerService'; -import { ItemDictionary } from './ItemDictionary'; -import { debugWarn } from './MegaMenuDebug'; -var LOG_SOURCE = 'TaxonomyNavigationService'; -var TaxonomyNavigationService = (function () { - function TaxonomyNavigationService(context, termSetNameOrId, debug, cacheMinutes) { - if (debug === void 0) { debug = false; } - if (cacheMinutes === void 0) { cacheMinutes = 15; } - this.context = context; - this.termSetNameOrId = termSetNameOrId; - this.debug = debug; - this.cacheMinutes = cacheMinutes; - sp.setup({ - spfxContext: context - }); - this._taxonomyPickerService = new SPTermStorePickerService({ - anchorId: '', - termsetNameOrID: termSetNameOrId, - useSessionStorage: true, - hideDeprecatedTags: true, - hideTagsNotAvailableForTagging: true, - cacheMinutes: cacheMinutes - }, this.context, this.debug); - } - TaxonomyNavigationService.prototype.getMenuItems = function () { - return __awaiter(this, void 0, void 0, function () { - var _this = this; - var siteCollectionUrl, termset, itemsDict, menuItems; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - siteCollectionUrl = this.context.pageContext.site.absoluteUrl; - return [4 /*yield*/, this._taxonomyPickerService.getAllTerms(this.termSetNameOrId, true, true, true, this.cacheMinutes)]; - case 1: - termset = _a.sent(); - itemsDict = new ItemDictionary(); - menuItems = []; - if (!termset || !termset.Terms || termset.Terms.length === 0) { - debugWarn(this.debug, LOG_SOURCE, 'No terms found in the term set.'); - throw new Error('The configured navigation term set was not found or contains no terms.'); - } - termset.Terms.forEach(function (term) { - var menuItem = new MenuItem(term, 0, siteCollectionUrl); - itemsDict.Add(term.Id, menuItem); - if (menuItem.pathDepth === 1) { - menuItems.push(menuItem); - } - else { - var parentItem = itemsDict.Get(term.ParentId); - if (parentItem) { - parentItem.items.push(menuItem); - } - else { - debugWarn(_this.debug, LOG_SOURCE, 'Item without parent:', term.PathOfTerm); - } - } - }); - return [2 /*return*/, menuItems]; - } - }); - }); - }; - return TaxonomyNavigationService; -}()); -export { TaxonomyNavigationService }; - -//# sourceMappingURL=TaxonomyNavigationService.js.map diff --git a/lib/services/TaxonomyNavigationService.js.map b/lib/services/TaxonomyNavigationService.js.map deleted file mode 100644 index e3f33d7..0000000 --- a/lib/services/TaxonomyNavigationService.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["services/TaxonomyNavigationService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAElE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OA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C,CAAC,CAAC;4BACrE,MAAM,IAAI,KAAK,CAAC,wEAAwE,CAAC,CAAC;wBAC9F,CAAC;wBAED,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,UAAC,IAAW;4BAC9B,IAAM,QAAQ,GAAc,IAAI,QAAQ,CAAC,IAAI,EAAE,CAAC,EAAE,iBAAiB,CAAC,CAAC;4BACrE,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC;4BACjC,EAAE,CAAC,CAAC,QAAQ,CAAC,SAAS,KAAK,CAAC,CAAC,CAAC,CAAC;gCAC3B,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;4BAC7B,CAAC;4BAAC,IAAI,CAAC,CAAC;gCACJ,IAAM,UAAU,GAAc,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;gCAC3D,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;oCACb,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;gCACpC,CAAC;gCAAC,IAAI,CAAC,CAAC;oCACJ,SAAS,CAAC,KAAI,CAAC,KAAK,EAAE,UAAU,EAAE,sBAAsB,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;gCAC/E,CAAC;4BACL,CAAC;wBACL,CAAC,CAAC,CAAC;wBAEH,sBAAO,SAAS,EAAC;;;;KACpB;IACL,gCAAC;AAAD,CA3DA,AA2DC,IAAA","file":"services/TaxonomyNavigationService.js","sourcesContent":["import { ITaxonomyNavigationService } from './ITaxonomyNavigationService';\nimport { IMenuItem } from './IMenuItem';\nimport { sp } from '@pnp/sp';\nimport { MenuItem } from './MenuItem';\nimport { ApplicationCustomizerContext } from '@microsoft/sp-application-base';\nimport SPTermStorePickerService from './SPTermStorePickerService';\nimport { ITerm, ITermSet } from './ISPTermStorePickerService';\nimport { ItemDictionary } from './ItemDictionary';\nimport { debugWarn } from './MegaMenuDebug';\n\nconst LOG_SOURCE: string = 'TaxonomyNavigationService';\n\nexport class TaxonomyNavigationService implements ITaxonomyNavigationService {\n private _taxonomyPickerService: SPTermStorePickerService;\n constructor(\n private context: ApplicationCustomizerContext,\n private termSetNameOrId: string,\n private debug: boolean = false,\n private cacheMinutes: number = 15\n ) {\n sp.setup({\n spfxContext: context\n });\n this._taxonomyPickerService = new SPTermStorePickerService(\n {\n anchorId: '',\n termsetNameOrID: termSetNameOrId,\n useSessionStorage: true,\n hideDeprecatedTags: true,\n hideTagsNotAvailableForTagging: true,\n cacheMinutes: cacheMinutes\n },\n this.context,\n this.debug\n );\n }\n\n public async getMenuItems(): Promise {\n const siteCollectionUrl: string = this.context.pageContext.site.absoluteUrl;\n const termset: ITermSet = await this._taxonomyPickerService.getAllTerms(\n this.termSetNameOrId,\n true,\n true,\n true,\n this.cacheMinutes\n );\n const itemsDict: ItemDictionary = new ItemDictionary();\n const menuItems: IMenuItem[] = [];\n\n if (!termset || !termset.Terms || termset.Terms.length === 0) {\n debugWarn(this.debug, LOG_SOURCE, 'No terms found in the term set.');\n throw new Error('The configured navigation term set was not found or contains no terms.');\n }\n\n termset.Terms.forEach((term: ITerm) => {\n const menuItem: IMenuItem = new MenuItem(term, 0, siteCollectionUrl);\n itemsDict.Add(term.Id, menuItem);\n if (menuItem.pathDepth === 1) {\n menuItems.push(menuItem);\n } else {\n const parentItem: IMenuItem = itemsDict.Get(term.ParentId);\n if (parentItem) {\n parentItem.items.push(menuItem);\n } else {\n debugWarn(this.debug, LOG_SOURCE, 'Item without parent:', term.PathOfTerm);\n }\n }\n });\n\n return menuItems;\n }\n}\n"],"sourceRoot":"..\\..\\src"} \ No newline at end of file diff --git a/lib/services/UserCustomActionService/IUserCustomActionProps.d.ts b/lib/services/UserCustomActionService/IUserCustomActionProps.d.ts deleted file mode 100644 index 270ea94..0000000 --- a/lib/services/UserCustomActionService/IUserCustomActionProps.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -export interface IUserCustomActionProps { - Id?: string; - Title: string; - Name?: string; - Description?: string; - Location: string; - ScriptSrc?: string; - ScriptBlock?: string; - Url?: string; - Sequence?: number; - Group?: string; - ImageUrl?: string; - CommandUIExtension?: string; - RegistrationType?: number; - RegistrationId?: string; - Rights?: {}; - Scope?: number; - ClientSideComponentId?: string; - ClientSideComponentProperties?: string; -} diff --git a/lib/services/UserCustomActionService/IUserCustomActionProps.js b/lib/services/UserCustomActionService/IUserCustomActionProps.js deleted file mode 100644 index 940fd91..0000000 --- a/lib/services/UserCustomActionService/IUserCustomActionProps.js +++ /dev/null @@ -1,3 +0,0 @@ - - -//# sourceMappingURL=IUserCustomActionProps.js.map diff --git a/lib/services/UserCustomActionService/IUserCustomActionProps.js.map b/lib/services/UserCustomActionService/IUserCustomActionProps.js.map deleted file mode 100644 index 81ff26b..0000000 --- a/lib/services/UserCustomActionService/IUserCustomActionProps.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":[],"names":[],"mappings":"","file":"services/UserCustomActionService/IUserCustomActionProps.js","sourcesContent":[],"sourceRoot":"..\\..\\..\\src"} \ No newline at end of file diff --git a/lib/services/UserCustomActionService/IUserCustomActionService.d.ts b/lib/services/UserCustomActionService/IUserCustomActionService.d.ts deleted file mode 100644 index 8ab0bc8..0000000 --- a/lib/services/UserCustomActionService/IUserCustomActionService.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { UserCustomActionScope } from './UserCustomActionScope'; -import { IUserCustomActionProps } from './IUserCustomActionProps'; -import { UserCustomActionAddResult, UserCustomActionUpdateResult } from '@pnp/sp'; -export interface IUserCustomActionService { - getUserCustomActions(scope: UserCustomActionScope, listId?: string): Promise; - getUserCustomActionById(scope: UserCustomActionScope, id: string, listId?: string): Promise; - addUserCustomAction(scope: UserCustomActionScope, customAction: IUserCustomActionProps, listId?: string): Promise; - updateUserCustomAction(scope: UserCustomActionScope, id: string, props: {}, listId?: string): Promise; - deleteUserCustomAction(scope: UserCustomActionScope, customAction: IUserCustomActionProps, listId?: string): Promise; -} diff --git a/lib/services/UserCustomActionService/IUserCustomActionService.js b/lib/services/UserCustomActionService/IUserCustomActionService.js deleted file mode 100644 index eba33c3..0000000 --- a/lib/services/UserCustomActionService/IUserCustomActionService.js +++ /dev/null @@ -1,3 +0,0 @@ - - -//# sourceMappingURL=IUserCustomActionService.js.map diff --git a/lib/services/UserCustomActionService/IUserCustomActionService.js.map b/lib/services/UserCustomActionService/IUserCustomActionService.js.map deleted file mode 100644 index 116b1a7..0000000 --- a/lib/services/UserCustomActionService/IUserCustomActionService.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":[],"names":[],"mappings":"","file":"services/UserCustomActionService/IUserCustomActionService.js","sourcesContent":[],"sourceRoot":"..\\..\\..\\src"} \ No newline at end of file diff --git a/lib/services/UserCustomActionService/UserCustomActionScope.d.ts b/lib/services/UserCustomActionService/UserCustomActionScope.d.ts deleted file mode 100644 index 84a68b8..0000000 --- a/lib/services/UserCustomActionService/UserCustomActionScope.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export declare enum UserCustomActionScope { - Web = "web", - Site = "site", - List = "list", -} diff --git a/lib/services/UserCustomActionService/UserCustomActionScope.js b/lib/services/UserCustomActionService/UserCustomActionScope.js deleted file mode 100644 index 99092b3..0000000 --- a/lib/services/UserCustomActionService/UserCustomActionScope.js +++ /dev/null @@ -1,8 +0,0 @@ -export var UserCustomActionScope; -(function (UserCustomActionScope) { - UserCustomActionScope["Web"] = "web"; - UserCustomActionScope["Site"] = "site"; - UserCustomActionScope["List"] = "list"; -})(UserCustomActionScope = UserCustomActionScope || (UserCustomActionScope = {})); - -//# sourceMappingURL=UserCustomActionScope.js.map diff --git a/lib/services/UserCustomActionService/UserCustomActionScope.js.map b/lib/services/UserCustomActionService/UserCustomActionScope.js.map deleted file mode 100644 index 3b68ff2..0000000 --- a/lib/services/UserCustomActionService/UserCustomActionScope.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["services/UserCustomActionService/UserCustomActionScope.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,qBAIX;AAJD,WAAY,qBAAqB;IAC7B,oCAAW,CAAA;IACX,sCAAa,CAAA;IACb,sCAAa,CAAA;AACjB,CAAC,EAJW,qBAAqB,GAArB,qBAAqB,KAArB,qBAAqB,QAIhC","file":"services/UserCustomActionService/UserCustomActionScope.js","sourcesContent":["export enum UserCustomActionScope {\r\n Web = 'web',\r\n Site = 'site',\r\n List = 'list'\r\n}\r\n"],"sourceRoot":"..\\..\\..\\src"} \ No newline at end of file diff --git a/lib/services/UserCustomActionService/UserCustomActionService.d.ts b/lib/services/UserCustomActionService/UserCustomActionService.d.ts deleted file mode 100644 index aadb3f4..0000000 --- a/lib/services/UserCustomActionService/UserCustomActionService.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { UserCustomActionAddResult, UserCustomActionUpdateResult } from '@pnp/sp/src/usercustomactions'; -import { IUserCustomActionService } from './IUserCustomActionService'; -import { UserCustomActionScope } from './UserCustomActionScope'; -import { IUserCustomActionProps } from './IUserCustomActionProps'; -import { ApplicationCustomizerContext } from '@microsoft/sp-application-base'; -export declare class UserCustomActionService implements IUserCustomActionService { - private debug; - constructor(context: ApplicationCustomizerContext, debug?: boolean); - getUserCustomActions(scope: UserCustomActionScope, listId?: string): Promise; - getUserCustomActionById(scope: UserCustomActionScope, id: string, listId?: string): Promise; - addUserCustomAction(scope: UserCustomActionScope, customAction: IUserCustomActionProps, listId?: string): Promise; - updateUserCustomAction(scope: UserCustomActionScope, id: string, props: {}, listId?: string): Promise; - deleteUserCustomAction(scope: UserCustomActionScope, customAction: IUserCustomActionProps, listId?: string): Promise; -} diff --git a/lib/services/UserCustomActionService/UserCustomActionService.js b/lib/services/UserCustomActionService/UserCustomActionService.js deleted file mode 100644 index e8b8571..0000000 --- a/lib/services/UserCustomActionService/UserCustomActionService.js +++ /dev/null @@ -1,214 +0,0 @@ -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [0, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -import { sp } from '@pnp/sp'; -import { UserCustomActionScope } from './UserCustomActionScope'; -import { debugError } from '../MegaMenuDebug'; -var LOG_SOURCE = 'UserCustomActionService'; -var UserCustomActionService = (function () { - function UserCustomActionService(context, debug) { - if (debug === void 0) { debug = false; } - this.debug = debug; - sp.setup({ - spfxContext: context - }); - } - UserCustomActionService.prototype.getUserCustomActions = function (scope, listId) { - return __awaiter(this, void 0, void 0, function () { - var actions, _a, error_1; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - _b.trys.push([0, 9, , 10]); - actions = void 0; - _a = scope; - switch (_a) { - case UserCustomActionScope.Web: return [3 /*break*/, 1]; - case UserCustomActionScope.Site: return [3 /*break*/, 3]; - case UserCustomActionScope.List: return [3 /*break*/, 5]; - } - return [3 /*break*/, 7]; - case 1: return [4 /*yield*/, sp.web.userCustomActions.get()]; - case 2: - actions = _b.sent(); - return [3 /*break*/, 8]; - case 3: return [4 /*yield*/, sp.site.userCustomActions.get()]; - case 4: - actions = _b.sent(); - return [3 /*break*/, 8]; - case 5: - if (!listId) { - throw new Error('List ID is required for List scope'); - } - return [4 /*yield*/, sp.web.lists.getById(listId).userCustomActions.get()]; - case 6: - actions = _b.sent(); - return [3 /*break*/, 8]; - case 7: throw new Error('Invalid scope'); - case 8: return [2 /*return*/, actions]; - case 9: - error_1 = _b.sent(); - debugError(this.debug, LOG_SOURCE, 'Error getting user custom actions.', error_1); - throw error_1; - case 10: return [2 /*return*/]; - } - }); - }); - }; - UserCustomActionService.prototype.getUserCustomActionById = function (scope, id, listId) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - try { - switch (scope) { - case UserCustomActionScope.Web: - return [2 /*return*/, sp.web.userCustomActions.getById(id)]; - case UserCustomActionScope.Site: - return [2 /*return*/, sp.site.userCustomActions.getById(id)]; - case UserCustomActionScope.List: - if (!listId) { - throw new Error('List ID is required for List scope'); - } - return [2 /*return*/, sp.web.lists.getById(listId).userCustomActions.getById(id)]; - default: - throw new Error('Invalid scope'); - } - } - catch (error) { - debugError(this.debug, LOG_SOURCE, 'Error getting user custom action by ID.', error); - throw error; - } - return [2 /*return*/]; - }); - }); - }; - UserCustomActionService.prototype.addUserCustomAction = function (scope, customAction, listId) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - try { - switch (scope) { - case UserCustomActionScope.Web: - return [2 /*return*/, sp.web.userCustomActions.add(customAction)]; - case UserCustomActionScope.Site: - return [2 /*return*/, sp.site.userCustomActions.add(customAction)]; - case UserCustomActionScope.List: - if (!listId) { - throw new Error('List ID is required for List scope'); - } - return [2 /*return*/, sp.web.lists.getById(listId).userCustomActions.add(customAction)]; - default: - throw new Error('Invalid scope'); - } - } - catch (error) { - debugError(this.debug, LOG_SOURCE, 'Error adding user custom action.', error); - throw error; - } - return [2 /*return*/]; - }); - }); - }; - UserCustomActionService.prototype.updateUserCustomAction = function (scope, id, props, listId) { - return __awaiter(this, void 0, void 0, function () { - var result, _a, error_2; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - _b.trys.push([0, 9, , 10]); - result = void 0; - _a = scope; - switch (_a) { - case UserCustomActionScope.Web: return [3 /*break*/, 1]; - case UserCustomActionScope.Site: return [3 /*break*/, 3]; - case UserCustomActionScope.List: return [3 /*break*/, 5]; - } - return [3 /*break*/, 7]; - case 1: return [4 /*yield*/, sp.web.userCustomActions.getById(id).update(props)]; - case 2: - result = _b.sent(); - return [3 /*break*/, 8]; - case 3: return [4 /*yield*/, sp.site.userCustomActions.getById(id).update(props)]; - case 4: - result = _b.sent(); - return [3 /*break*/, 8]; - case 5: - if (!listId) { - throw new Error('List ID is required for List scope'); - } - return [4 /*yield*/, sp.web.lists.getById(listId).userCustomActions.getById(id).update(props)]; - case 6: - result = _b.sent(); - return [3 /*break*/, 8]; - case 7: throw new Error('Invalid scope'); - case 8: return [2 /*return*/, result]; - case 9: - error_2 = _b.sent(); - debugError(this.debug, LOG_SOURCE, 'Error updating user custom action.', error_2); - throw error_2; - case 10: return [2 /*return*/]; - } - }); - }); - }; - UserCustomActionService.prototype.deleteUserCustomAction = function (scope, customAction, listId) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - try { - switch (scope) { - case UserCustomActionScope.Web: - return [2 /*return*/, sp.web.userCustomActions.getById(customAction.Id).delete()]; - case UserCustomActionScope.Site: - return [2 /*return*/, sp.site.userCustomActions.getById(customAction.Id).delete()]; - case UserCustomActionScope.List: - if (!listId) { - throw new Error('List ID is required for List scope'); - } - return [2 /*return*/, sp.web.lists.getById(listId).userCustomActions.getById(customAction.Id).delete()]; - default: - throw new Error('Invalid scope'); - } - } - catch (error) { - debugError(this.debug, LOG_SOURCE, 'Error deleting user custom action.', error); - throw error; - } - return [2 /*return*/]; - }); - }); - }; - return UserCustomActionService; -}()); -export { UserCustomActionService }; - -//# sourceMappingURL=UserCustomActionService.js.map diff --git a/lib/services/UserCustomActionService/UserCustomActionService.js.map b/lib/services/UserCustomActionService/UserCustomActionService.js.map deleted file mode 100644 index 4027b30..0000000 --- a/lib/services/UserCustomActionService/UserCustomActionService.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["services/UserCustomActionService/UserCustomActionService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAGhE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,IAAM,UAAU,GAAW,yBAAyB,CAAC;AAErD;IACI,iCAAY,OAAqC,EAAU,KAAsB;QAAtB,sBAAA,EAAA,aAAsB;QAAtB,UAAK,GAAL,KAAK,CAAiB;QAC7E,EAAE,CAAC,KAAK,CAAC;YACL,WAAW,EAAE,OAAO;SACvB,CAAC,CAAC;IACP,CAAC;IAEY,sDAAoB,GAAjC,UAAkC,KAA4B,EAAE,MAAe;;;;;;;wBAEnE,OAAO,SAA8C,CAAC;wBAClD,KAAA,KAAK,CAAA;;iCACJ,qBAAqB,CAAC,GAAG,EAAzB,MAAM,kBAAmB;iCAGzB,qBAAqB,CAAC,IAAI,EAA1B,MAAM,kBAAoB;iCAG1B,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,UAAU,EAAE,oCAAoC,EAAE,OAAK,CAAC,CAAC;wBAChF,MAAM,OAAK,CAAC;;;;;KAEnB;IAEY,wDAAsB,GAAnC,UAAoC,KAA4B,EAAE,YAAoC,EAAE,MAAe;;;gBACnH,IAAI,CAAC;oBACD,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;wBACZ,KAAK,qBAAqB,CAAC,GAAG;4BAC1B,MAAM,gBAAC,EAAE,CAAC,GAAG,CAAC,iBAAiB,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,EAAC;wBACtE,KAAK,qBAAqB,CAAC,IAAI;4BAC3B,MAAM,gBAAC,EAAE,CAAC,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,EAAC;wBACvE,KAAK,qBAAqB,CAAC,IAAI;4BAC3B,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;gCACV,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;4BAC1D,CAAC;4BACD,MAAM,gBAAC,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,iBAAiB,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,EAAC;wBAC5F;4BACI,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;oBACzC,CAAC;gBACL,CAAC;gBAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;oBACb,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,UAAU,EAAE,oCAAoC,EAAE,KAAK,CAAC,CAAC;oBAChF,MAAM,KAAK,CAAC;gBAChB,CAAC;;;;KACJ;IACL,8BAAC;AAAD,CAzHA,AAyHC,IAAA","file":"services/UserCustomActionService/UserCustomActionService.js","sourcesContent":["// tslint:disable:max-line-length\n// tslint:disable:export-name\nimport { UserCustomActionAddResult, UserCustomActions, UserCustomActionUpdateResult } from '@pnp/sp/src/usercustomactions';\nimport { IUserCustomActionService } from './IUserCustomActionService';\nimport { sp } from '@pnp/sp';\nimport { UserCustomActionScope } from './UserCustomActionScope';\nimport { IUserCustomActionProps } from './IUserCustomActionProps';\nimport { ApplicationCustomizerContext } from '@microsoft/sp-application-base';\nimport { debugError } from '../MegaMenuDebug';\n\nconst LOG_SOURCE: string = 'UserCustomActionService';\n\nexport class UserCustomActionService implements IUserCustomActionService {\n constructor(context: ApplicationCustomizerContext, private debug: boolean = false) {\n sp.setup({\n spfxContext: context\n });\n }\n\n public async getUserCustomActions(scope: UserCustomActionScope, listId?: string): Promise {\n try {\n let actions: UserCustomActions | IUserCustomActionProps[];\n switch (scope) {\n case UserCustomActionScope.Web:\n actions = await sp.web.userCustomActions.get();\n break;\n case UserCustomActionScope.Site:\n actions = await sp.site.userCustomActions.get();\n break;\n case UserCustomActionScope.List:\n if (!listId) {\n throw new Error('List ID is required for List scope');\n }\n actions = await sp.web.lists.getById(listId).userCustomActions.get();\n break;\n default:\n throw new Error('Invalid scope');\n }\n return actions as IUserCustomActionProps[];\n } catch (error) {\n debugError(this.debug, LOG_SOURCE, 'Error getting user custom actions.', error);\n throw error;\n }\n }\n\n public async getUserCustomActionById(scope: UserCustomActionScope, id: string, listId?: string): Promise {\n try {\n switch (scope) {\n case UserCustomActionScope.Web:\n return sp.web.userCustomActions.getById(id) as {} as IUserCustomActionProps;\n case UserCustomActionScope.Site:\n return sp.site.userCustomActions.getById(id) as {} as IUserCustomActionProps;\n case UserCustomActionScope.List:\n if (!listId) {\n throw new Error('List ID is required for List scope');\n }\n return sp.web.lists.getById(listId).userCustomActions.getById(id) as {} as IUserCustomActionProps;\n default:\n throw new Error('Invalid scope');\n }\n } catch (error) {\n debugError(this.debug, LOG_SOURCE, 'Error getting user custom action by ID.', error);\n throw error;\n }\n }\n\n public async addUserCustomAction(scope: UserCustomActionScope, customAction: IUserCustomActionProps, listId?: string): Promise {\n try {\n switch (scope) {\n case UserCustomActionScope.Web:\n return sp.web.userCustomActions.add(customAction);\n case UserCustomActionScope.Site:\n return sp.site.userCustomActions.add(customAction);\n case UserCustomActionScope.List:\n if (!listId) {\n throw new Error('List ID is required for List scope');\n }\n return sp.web.lists.getById(listId).userCustomActions.add(customAction);\n default:\n throw new Error('Invalid scope');\n }\n } catch (error) {\n debugError(this.debug, LOG_SOURCE, 'Error adding user custom action.', error);\n throw error;\n }\n }\n\n public async updateUserCustomAction(scope: UserCustomActionScope, id: string, props: {}, listId?: string): Promise {\n try {\n let result: UserCustomActionUpdateResult;\n switch (scope) {\n case UserCustomActionScope.Web:\n result = await sp.web.userCustomActions.getById(id).update(props);\n break;\n case UserCustomActionScope.Site:\n result = await sp.site.userCustomActions.getById(id).update(props);\n break;\n case UserCustomActionScope.List:\n if (!listId) {\n throw new Error('List ID is required for List scope');\n }\n result = await sp.web.lists.getById(listId).userCustomActions.getById(id).update(props);\n break;\n default:\n throw new Error('Invalid scope');\n }\n return result;\n } catch (error) {\n debugError(this.debug, LOG_SOURCE, 'Error updating user custom action.', error);\n throw error;\n }\n }\n\n public async deleteUserCustomAction(scope: UserCustomActionScope, customAction: IUserCustomActionProps, listId?: string): Promise {\n try {\n switch (scope) {\n case UserCustomActionScope.Web:\n return sp.web.userCustomActions.getById(customAction.Id).delete();\n case UserCustomActionScope.Site:\n return sp.site.userCustomActions.getById(customAction.Id).delete();\n case UserCustomActionScope.List:\n if (!listId) {\n throw new Error('List ID is required for List scope');\n }\n return sp.web.lists.getById(listId).userCustomActions.getById(customAction.Id).delete();\n default:\n throw new Error('Invalid scope');\n }\n } catch (error) {\n debugError(this.debug, LOG_SOURCE, 'Error deleting user custom action.', error);\n throw error;\n }\n }\n}"],"sourceRoot":"..\\..\\..\\src"} \ No newline at end of file diff --git a/temp/deploy/abc3361f-bb2d-491f-aba3-cd51c19a299b.json b/temp/deploy/abc3361f-bb2d-491f-aba3-cd51c19a299b.json deleted file mode 100644 index 3be0a1f..0000000 --- a/temp/deploy/abc3361f-bb2d-491f-aba3-cd51c19a299b.json +++ /dev/null @@ -1 +0,0 @@ -{"id":"abc3361f-bb2d-491f-aba3-cd51c19a299b","alias":"MegaMenuApplicationCustomizer","componentType":"Extension","extensionType":"ApplicationCustomizer","version":"1.1.2","manifestVersion":2,"requiresCustomScript":false,"loaderConfig":{"entryModuleId":"mega-menu-application-customizer","internalModuleBaseUrls":["/"],"scriptResources":{"mega-menu-application-customizer":{"type":"path","path":"mega-menu-application-customizer_4b71d735107c7ad3a5ddc7b19a2c8ce9.js"},"MegaMenuApplicationCustomizerStrings":{"defaultPath":"megamenu-megamenuapplicationcustomizerstrings_en-us_c5b741e5b77398ea44801b5b5c0a11a3.js","type":"localizedPath","paths":{"de-DE":"megamenu-megamenuapplicationcustomizerstrings_de-de_b346aef029646a3a296989aa5e40a5ae.js","en-US":"megamenu-megamenuapplicationcustomizerstrings_en-us_c5b741e5b77398ea44801b5b5c0a11a3.js"}},"@microsoft/decorators":{"type":"component","version":"1.4.1","id":"f97266fb-ccb7-430e-9384-4124d05295d3"},"@microsoft/sp-application-base":{"type":"component","version":"1.4.1","id":"4df9bb86-ab0a-4aab-ab5f-48bf167048fb"},"@microsoft/sp-http":{"type":"component","version":"1.4.1","id":"c07208f0-ea3b-4c1a-9965-ac1b825211a6"},"@microsoft/sp-lodash-subset":{"type":"component","version":"1.4.1","id":"73e1dc6c-8441-42cc-ad47-4bd3659f8a3a"}}}} \ No newline at end of file diff --git a/temp/manifests.js b/temp/manifests.js deleted file mode 100644 index c7e129a..0000000 --- a/temp/manifests.js +++ /dev/null @@ -1,5162 +0,0 @@ -(function webpackUniversalModuleDefinition(root, factory) { - if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(); - else if(typeof define === 'function' && define.amd) - define([], factory); - else if(typeof exports === 'object') - exports["debugManifests"] = factory(); - else - root["debugManifests"] = factory(); -})(this, function() { -return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) { -/******/ return installedModules[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); -/******/ } -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 16); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/** @type {import('./type')} */ -module.exports = TypeError; - - -/***/ }), -/* 1 */ -/***/ (function(module, exports, __webpack_require__) { - -/* WEBPACK VAR INJECTION */(function(global) {var hasMap = typeof Map === 'function' && Map.prototype; -var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null; -var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null; -var mapForEach = hasMap && Map.prototype.forEach; -var hasSet = typeof Set === 'function' && Set.prototype; -var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null; -var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null; -var setForEach = hasSet && Set.prototype.forEach; -var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype; -var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null; -var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype; -var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null; -var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype; -var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null; -var booleanValueOf = Boolean.prototype.valueOf; -var objectToString = Object.prototype.toString; -var functionToString = Function.prototype.toString; -var $match = String.prototype.match; -var $slice = String.prototype.slice; -var $replace = String.prototype.replace; -var $toUpperCase = String.prototype.toUpperCase; -var $toLowerCase = String.prototype.toLowerCase; -var $test = RegExp.prototype.test; -var $concat = Array.prototype.concat; -var $join = Array.prototype.join; -var $arrSlice = Array.prototype.slice; -var $floor = Math.floor; -var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null; -var gOPS = Object.getOwnPropertySymbols; -var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null; -var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object'; -// ie, `has-tostringtag/shams -var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol') - ? Symbol.toStringTag - : null; -var isEnumerable = Object.prototype.propertyIsEnumerable; - -var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ( - [].__proto__ === Array.prototype // eslint-disable-line no-proto - ? function (O) { - return O.__proto__; // eslint-disable-line no-proto - } - : null -); - -function addNumericSeparator(num, str) { - if ( - num === Infinity - || num === -Infinity - || num !== num - || (num && num > -1000 && num < 1000) - || $test.call(/e/, str) - ) { - return str; - } - var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g; - if (typeof num === 'number') { - var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num) - if (int !== num) { - var intStr = String(int); - var dec = $slice.call(str, intStr.length + 1); - return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, ''); - } - } - return $replace.call(str, sepRegex, '$&_'); -} - -var utilInspect = __webpack_require__(23); -var inspectCustom = utilInspect.custom; -var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null; - -var quotes = { - __proto__: null, - 'double': '"', - single: "'" -}; -var quoteREs = { - __proto__: null, - 'double': /(["\\])/g, - single: /(['\\])/g -}; - -module.exports = function inspect_(obj, options, depth, seen) { - var opts = options || {}; - - if (has(opts, 'quoteStyle') && !has(quotes, opts.quoteStyle)) { - throw new TypeError('option "quoteStyle" must be "single" or "double"'); - } - if ( - has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number' - ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity - : opts.maxStringLength !== null - ) - ) { - throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`'); - } - var customInspect = has(opts, 'customInspect') ? opts.customInspect : true; - if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') { - throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`'); - } - - if ( - has(opts, 'indent') - && opts.indent !== null - && opts.indent !== '\t' - && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0) - ) { - throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`'); - } - if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') { - throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`'); - } - var numericSeparator = opts.numericSeparator; - - if (typeof obj === 'undefined') { - return 'undefined'; - } - if (obj === null) { - return 'null'; - } - if (typeof obj === 'boolean') { - return obj ? 'true' : 'false'; - } - - if (typeof obj === 'string') { - return inspectString(obj, opts); - } - if (typeof obj === 'number') { - if (obj === 0) { - return Infinity / obj > 0 ? '0' : '-0'; - } - var str = String(obj); - return numericSeparator ? addNumericSeparator(obj, str) : str; - } - if (typeof obj === 'bigint') { - var bigIntStr = String(obj) + 'n'; - return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr; - } - - var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth; - if (typeof depth === 'undefined') { depth = 0; } - if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') { - return isArray(obj) ? '[Array]' : '[Object]'; - } - - var indent = getIndent(opts, depth); - - if (typeof seen === 'undefined') { - seen = []; - } else if (indexOf(seen, obj) >= 0) { - return '[Circular]'; - } - - function inspect(value, from, noIndent) { - if (from) { - seen = $arrSlice.call(seen); - seen.push(from); - } - if (noIndent) { - var newOpts = { - depth: opts.depth - }; - if (has(opts, 'quoteStyle')) { - newOpts.quoteStyle = opts.quoteStyle; - } - return inspect_(value, newOpts, depth + 1, seen); - } - return inspect_(value, opts, depth + 1, seen); - } - - if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable - var name = nameOf(obj); - var keys = arrObjKeys(obj, inspect); - return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : ''); - } - if (isSymbol(obj)) { - var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj); - return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString; - } - if (isElement(obj)) { - var s = '<' + $toLowerCase.call(String(obj.nodeName)); - var attrs = obj.attributes || []; - for (var i = 0; i < attrs.length; i++) { - s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts); - } - s += '>'; - if (obj.childNodes && obj.childNodes.length) { s += '...'; } - s += ''; - return s; - } - if (isArray(obj)) { - if (obj.length === 0) { return '[]'; } - var xs = arrObjKeys(obj, inspect); - if (indent && !singleLineValues(xs)) { - return '[' + indentedJoin(xs, indent) + ']'; - } - return '[ ' + $join.call(xs, ', ') + ' ]'; - } - if (isError(obj)) { - var parts = arrObjKeys(obj, inspect); - if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) { - return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }'; - } - if (parts.length === 0) { return '[' + String(obj) + ']'; } - return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }'; - } - if (typeof obj === 'object' && customInspect) { - if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) { - return utilInspect(obj, { depth: maxDepth - depth }); - } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') { - return obj.inspect(); - } - } - if (isMap(obj)) { - var mapParts = []; - if (mapForEach) { - mapForEach.call(obj, function (value, key) { - mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj)); - }); - } - return collectionOf('Map', mapSize.call(obj), mapParts, indent); - } - if (isSet(obj)) { - var setParts = []; - if (setForEach) { - setForEach.call(obj, function (value) { - setParts.push(inspect(value, obj)); - }); - } - return collectionOf('Set', setSize.call(obj), setParts, indent); - } - if (isWeakMap(obj)) { - return weakCollectionOf('WeakMap'); - } - if (isWeakSet(obj)) { - return weakCollectionOf('WeakSet'); - } - if (isWeakRef(obj)) { - return weakCollectionOf('WeakRef'); - } - if (isNumber(obj)) { - return markBoxed(inspect(Number(obj))); - } - if (isBigInt(obj)) { - return markBoxed(inspect(bigIntValueOf.call(obj))); - } - if (isBoolean(obj)) { - return markBoxed(booleanValueOf.call(obj)); - } - if (isString(obj)) { - return markBoxed(inspect(String(obj))); - } - // note: in IE 8, sometimes `global !== window` but both are the prototypes of each other - /* eslint-env browser */ - if (typeof window !== 'undefined' && obj === window) { - return '{ [object Window] }'; - } - if ( - (typeof globalThis !== 'undefined' && obj === globalThis) - || (typeof global !== 'undefined' && obj === global) - ) { - return '{ [object globalThis] }'; - } - if (!isDate(obj) && !isRegExp(obj)) { - var ys = arrObjKeys(obj, inspect); - var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object; - var protoTag = obj instanceof Object ? '' : 'null prototype'; - var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : ''; - var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : ''; - var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : ''); - if (ys.length === 0) { return tag + '{}'; } - if (indent) { - return tag + '{' + indentedJoin(ys, indent) + '}'; - } - return tag + '{ ' + $join.call(ys, ', ') + ' }'; - } - return String(obj); -}; - -function wrapQuotes(s, defaultStyle, opts) { - var style = opts.quoteStyle || defaultStyle; - var quoteChar = quotes[style]; - return quoteChar + s + quoteChar; -} - -function quote(s) { - return $replace.call(String(s), /"/g, '"'); -} - -function canTrustToString(obj) { - return !toStringTag || !(typeof obj === 'object' && (toStringTag in obj || typeof obj[toStringTag] !== 'undefined')); -} -function isArray(obj) { return toStr(obj) === '[object Array]' && canTrustToString(obj); } -function isDate(obj) { return toStr(obj) === '[object Date]' && canTrustToString(obj); } -function isRegExp(obj) { return toStr(obj) === '[object RegExp]' && canTrustToString(obj); } -function isError(obj) { return toStr(obj) === '[object Error]' && canTrustToString(obj); } -function isString(obj) { return toStr(obj) === '[object String]' && canTrustToString(obj); } -function isNumber(obj) { return toStr(obj) === '[object Number]' && canTrustToString(obj); } -function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && canTrustToString(obj); } - -// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives -function isSymbol(obj) { - if (hasShammedSymbols) { - return obj && typeof obj === 'object' && obj instanceof Symbol; - } - if (typeof obj === 'symbol') { - return true; - } - if (!obj || typeof obj !== 'object' || !symToString) { - return false; - } - try { - symToString.call(obj); - return true; - } catch (e) {} - return false; -} - -function isBigInt(obj) { - if (!obj || typeof obj !== 'object' || !bigIntValueOf) { - return false; - } - try { - bigIntValueOf.call(obj); - return true; - } catch (e) {} - return false; -} - -var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; }; -function has(obj, key) { - return hasOwn.call(obj, key); -} - -function toStr(obj) { - return objectToString.call(obj); -} - -function nameOf(f) { - if (f.name) { return f.name; } - var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/); - if (m) { return m[1]; } - return null; -} - -function indexOf(xs, x) { - if (xs.indexOf) { return xs.indexOf(x); } - for (var i = 0, l = xs.length; i < l; i++) { - if (xs[i] === x) { return i; } - } - return -1; -} - -function isMap(x) { - if (!mapSize || !x || typeof x !== 'object') { - return false; - } - try { - mapSize.call(x); - try { - setSize.call(x); - } catch (s) { - return true; - } - return x instanceof Map; // core-js workaround, pre-v2.5.0 - } catch (e) {} - return false; -} - -function isWeakMap(x) { - if (!weakMapHas || !x || typeof x !== 'object') { - return false; - } - try { - weakMapHas.call(x, weakMapHas); - try { - weakSetHas.call(x, weakSetHas); - } catch (s) { - return true; - } - return x instanceof WeakMap; // core-js workaround, pre-v2.5.0 - } catch (e) {} - return false; -} - -function isWeakRef(x) { - if (!weakRefDeref || !x || typeof x !== 'object') { - return false; - } - try { - weakRefDeref.call(x); - return true; - } catch (e) {} - return false; -} - -function isSet(x) { - if (!setSize || !x || typeof x !== 'object') { - return false; - } - try { - setSize.call(x); - try { - mapSize.call(x); - } catch (m) { - return true; - } - return x instanceof Set; // core-js workaround, pre-v2.5.0 - } catch (e) {} - return false; -} - -function isWeakSet(x) { - if (!weakSetHas || !x || typeof x !== 'object') { - return false; - } - try { - weakSetHas.call(x, weakSetHas); - try { - weakMapHas.call(x, weakMapHas); - } catch (s) { - return true; - } - return x instanceof WeakSet; // core-js workaround, pre-v2.5.0 - } catch (e) {} - return false; -} - -function isElement(x) { - if (!x || typeof x !== 'object') { return false; } - if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) { - return true; - } - return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function'; -} - -function inspectString(str, opts) { - if (str.length > opts.maxStringLength) { - var remaining = str.length - opts.maxStringLength; - var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : ''); - return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer; - } - var quoteRE = quoteREs[opts.quoteStyle || 'single']; - quoteRE.lastIndex = 0; - // eslint-disable-next-line no-control-regex - var s = $replace.call($replace.call(str, quoteRE, '\\$1'), /[\x00-\x1f]/g, lowbyte); - return wrapQuotes(s, 'single', opts); -} - -function lowbyte(c) { - var n = c.charCodeAt(0); - var x = { - 8: 'b', - 9: 't', - 10: 'n', - 12: 'f', - 13: 'r' - }[n]; - if (x) { return '\\' + x; } - return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16)); -} - -function markBoxed(str) { - return 'Object(' + str + ')'; -} - -function weakCollectionOf(type) { - return type + ' { ? }'; -} - -function collectionOf(type, size, entries, indent) { - var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', '); - return type + ' (' + size + ') {' + joinedEntries + '}'; -} - -function singleLineValues(xs) { - for (var i = 0; i < xs.length; i++) { - if (indexOf(xs[i], '\n') >= 0) { - return false; - } - } - return true; -} - -function getIndent(opts, depth) { - var baseIndent; - if (opts.indent === '\t') { - baseIndent = '\t'; - } else if (typeof opts.indent === 'number' && opts.indent > 0) { - baseIndent = $join.call(Array(opts.indent + 1), ' '); - } else { - return null; - } - return { - base: baseIndent, - prev: $join.call(Array(depth + 1), baseIndent) - }; -} - -function indentedJoin(xs, indent) { - if (xs.length === 0) { return ''; } - var lineJoiner = '\n' + indent.prev + indent.base; - return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev; -} - -function arrObjKeys(obj, inspect) { - var isArr = isArray(obj); - var xs = []; - if (isArr) { - xs.length = obj.length; - for (var i = 0; i < obj.length; i++) { - xs[i] = has(obj, i) ? inspect(obj[i], obj) : ''; - } - } - var syms = typeof gOPS === 'function' ? gOPS(obj) : []; - var symMap; - if (hasShammedSymbols) { - symMap = {}; - for (var k = 0; k < syms.length; k++) { - symMap['$' + syms[k]] = syms[k]; - } - } - - for (var key in obj) { // eslint-disable-line no-restricted-syntax - if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue - if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue - if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) { - // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section - continue; // eslint-disable-line no-restricted-syntax, no-continue - } else if ($test.call(/[^\w$]/, key)) { - xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj)); - } else { - xs.push(key + ': ' + inspect(obj[key], obj)); - } - } - if (typeof gOPS === 'function') { - for (var j = 0; j < syms.length; j++) { - if (isEnumerable.call(obj, syms[j])) { - xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj)); - } - } - } - return xs; -} - -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6))) - -/***/ }), -/* 2 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var implementation = __webpack_require__(45); - -module.exports = Function.prototype.bind || implementation; - - -/***/ }), -/* 3 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var undefined; - -var $Object = __webpack_require__(8); - -var $Error = __webpack_require__(25); -var $EvalError = __webpack_require__(26); -var $RangeError = __webpack_require__(27); -var $ReferenceError = __webpack_require__(28); -var $SyntaxError = __webpack_require__(29); -var $TypeError = __webpack_require__(0); -var $URIError = __webpack_require__(30); - -var abs = __webpack_require__(31); -var floor = __webpack_require__(32); -var max = __webpack_require__(33); -var min = __webpack_require__(34); -var pow = __webpack_require__(35); -var round = __webpack_require__(36); -var sign = __webpack_require__(37); - -var $Function = Function; - -// eslint-disable-next-line consistent-return -var getEvalledConstructor = function (expressionSyntax) { - try { - return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); - } catch (e) {} -}; - -var $gOPD = __webpack_require__(9); -var $defineProperty = __webpack_require__(40); - -var throwTypeError = function () { - throw new $TypeError(); -}; -var ThrowTypeError = $gOPD - ? (function () { - try { - // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties - arguments.callee; // IE 8 does not throw here - return throwTypeError; - } catch (calleeThrows) { - try { - // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') - return $gOPD(arguments, 'callee').get; - } catch (gOPDthrows) { - return throwTypeError; - } - } - }()) - : throwTypeError; - -var hasSymbols = __webpack_require__(41)(); - -var getProto = __webpack_require__(43); -var $ObjectGPO = __webpack_require__(11); -var $ReflectGPO = __webpack_require__(10); - -var $apply = __webpack_require__(13); -var $call = __webpack_require__(4); - -var needsEval = {}; - -var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); - -var INTRINSICS = { - __proto__: null, - '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, - '%Array%': Array, - '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, - '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, - '%AsyncFromSyncIteratorPrototype%': undefined, - '%AsyncFunction%': needsEval, - '%AsyncGenerator%': needsEval, - '%AsyncGeneratorFunction%': needsEval, - '%AsyncIteratorPrototype%': needsEval, - '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, - '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, - '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, - '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, - '%Boolean%': Boolean, - '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, - '%Date%': Date, - '%decodeURI%': decodeURI, - '%decodeURIComponent%': decodeURIComponent, - '%encodeURI%': encodeURI, - '%encodeURIComponent%': encodeURIComponent, - '%Error%': $Error, - '%eval%': eval, // eslint-disable-line no-eval - '%EvalError%': $EvalError, - '%Float16Array%': typeof Float16Array === 'undefined' ? undefined : Float16Array, - '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, - '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, - '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, - '%Function%': $Function, - '%GeneratorFunction%': needsEval, - '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, - '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, - '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, - '%isFinite%': isFinite, - '%isNaN%': isNaN, - '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, - '%JSON%': typeof JSON === 'object' ? JSON : undefined, - '%Map%': typeof Map === 'undefined' ? undefined : Map, - '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), - '%Math%': Math, - '%Number%': Number, - '%Object%': $Object, - '%Object.getOwnPropertyDescriptor%': $gOPD, - '%parseFloat%': parseFloat, - '%parseInt%': parseInt, - '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, - '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, - '%RangeError%': $RangeError, - '%ReferenceError%': $ReferenceError, - '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, - '%RegExp%': RegExp, - '%Set%': typeof Set === 'undefined' ? undefined : Set, - '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), - '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, - '%String%': String, - '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, - '%Symbol%': hasSymbols ? Symbol : undefined, - '%SyntaxError%': $SyntaxError, - '%ThrowTypeError%': ThrowTypeError, - '%TypedArray%': TypedArray, - '%TypeError%': $TypeError, - '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, - '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, - '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, - '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, - '%URIError%': $URIError, - '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, - '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, - '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet, - - '%Function.prototype.call%': $call, - '%Function.prototype.apply%': $apply, - '%Object.defineProperty%': $defineProperty, - '%Object.getPrototypeOf%': $ObjectGPO, - '%Math.abs%': abs, - '%Math.floor%': floor, - '%Math.max%': max, - '%Math.min%': min, - '%Math.pow%': pow, - '%Math.round%': round, - '%Math.sign%': sign, - '%Reflect.getPrototypeOf%': $ReflectGPO -}; - -if (getProto) { - try { - null.error; // eslint-disable-line no-unused-expressions - } catch (e) { - // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 - var errorProto = getProto(getProto(e)); - INTRINSICS['%Error.prototype%'] = errorProto; - } -} - -var doEval = function doEval(name) { - var value; - if (name === '%AsyncFunction%') { - value = getEvalledConstructor('async function () {}'); - } else if (name === '%GeneratorFunction%') { - value = getEvalledConstructor('function* () {}'); - } else if (name === '%AsyncGeneratorFunction%') { - value = getEvalledConstructor('async function* () {}'); - } else if (name === '%AsyncGenerator%') { - var fn = doEval('%AsyncGeneratorFunction%'); - if (fn) { - value = fn.prototype; - } - } else if (name === '%AsyncIteratorPrototype%') { - var gen = doEval('%AsyncGenerator%'); - if (gen && getProto) { - value = getProto(gen.prototype); - } - } - - INTRINSICS[name] = value; - - return value; -}; - -var LEGACY_ALIASES = { - __proto__: null, - '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], - '%ArrayPrototype%': ['Array', 'prototype'], - '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], - '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], - '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], - '%ArrayProto_values%': ['Array', 'prototype', 'values'], - '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], - '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], - '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], - '%BooleanPrototype%': ['Boolean', 'prototype'], - '%DataViewPrototype%': ['DataView', 'prototype'], - '%DatePrototype%': ['Date', 'prototype'], - '%ErrorPrototype%': ['Error', 'prototype'], - '%EvalErrorPrototype%': ['EvalError', 'prototype'], - '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], - '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], - '%FunctionPrototype%': ['Function', 'prototype'], - '%Generator%': ['GeneratorFunction', 'prototype'], - '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], - '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], - '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], - '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], - '%JSONParse%': ['JSON', 'parse'], - '%JSONStringify%': ['JSON', 'stringify'], - '%MapPrototype%': ['Map', 'prototype'], - '%NumberPrototype%': ['Number', 'prototype'], - '%ObjectPrototype%': ['Object', 'prototype'], - '%ObjProto_toString%': ['Object', 'prototype', 'toString'], - '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], - '%PromisePrototype%': ['Promise', 'prototype'], - '%PromiseProto_then%': ['Promise', 'prototype', 'then'], - '%Promise_all%': ['Promise', 'all'], - '%Promise_reject%': ['Promise', 'reject'], - '%Promise_resolve%': ['Promise', 'resolve'], - '%RangeErrorPrototype%': ['RangeError', 'prototype'], - '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], - '%RegExpPrototype%': ['RegExp', 'prototype'], - '%SetPrototype%': ['Set', 'prototype'], - '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], - '%StringPrototype%': ['String', 'prototype'], - '%SymbolPrototype%': ['Symbol', 'prototype'], - '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], - '%TypedArrayPrototype%': ['TypedArray', 'prototype'], - '%TypeErrorPrototype%': ['TypeError', 'prototype'], - '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], - '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], - '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], - '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], - '%URIErrorPrototype%': ['URIError', 'prototype'], - '%WeakMapPrototype%': ['WeakMap', 'prototype'], - '%WeakSetPrototype%': ['WeakSet', 'prototype'] -}; - -var bind = __webpack_require__(2); -var hasOwn = __webpack_require__(48); -var $concat = bind.call($call, Array.prototype.concat); -var $spliceApply = bind.call($apply, Array.prototype.splice); -var $replace = bind.call($call, String.prototype.replace); -var $strSlice = bind.call($call, String.prototype.slice); -var $exec = bind.call($call, RegExp.prototype.exec); - -/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ -var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; -var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ -var stringToPath = function stringToPath(string) { - var first = $strSlice(string, 0, 1); - var last = $strSlice(string, -1); - if (first === '%' && last !== '%') { - throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); - } else if (last === '%' && first !== '%') { - throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); - } - var result = []; - $replace(string, rePropName, function (match, number, quote, subString) { - result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; - }); - return result; -}; -/* end adaptation */ - -var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { - var intrinsicName = name; - var alias; - if (hasOwn(LEGACY_ALIASES, intrinsicName)) { - alias = LEGACY_ALIASES[intrinsicName]; - intrinsicName = '%' + alias[0] + '%'; - } - - if (hasOwn(INTRINSICS, intrinsicName)) { - var value = INTRINSICS[intrinsicName]; - if (value === needsEval) { - value = doEval(intrinsicName); - } - if (typeof value === 'undefined' && !allowMissing) { - throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); - } - - return { - alias: alias, - name: intrinsicName, - value: value - }; - } - - throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); -}; - -module.exports = function GetIntrinsic(name, allowMissing) { - if (typeof name !== 'string' || name.length === 0) { - throw new $TypeError('intrinsic name must be a non-empty string'); - } - if (arguments.length > 1 && typeof allowMissing !== 'boolean') { - throw new $TypeError('"allowMissing" argument must be a boolean'); - } - - if ($exec(/^%?[^%]*%?$/, name) === null) { - throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); - } - var parts = stringToPath(name); - var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; - - var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); - var intrinsicRealName = intrinsic.name; - var value = intrinsic.value; - var skipFurtherCaching = false; - - var alias = intrinsic.alias; - if (alias) { - intrinsicBaseName = alias[0]; - $spliceApply(parts, $concat([0, 1], alias)); - } - - for (var i = 1, isOwn = true; i < parts.length; i += 1) { - var part = parts[i]; - var first = $strSlice(part, 0, 1); - var last = $strSlice(part, -1); - if ( - ( - (first === '"' || first === "'" || first === '`') - || (last === '"' || last === "'" || last === '`') - ) - && first !== last - ) { - throw new $SyntaxError('property names with quotes must have matching quotes'); - } - if (part === 'constructor' || !isOwn) { - skipFurtherCaching = true; - } - - intrinsicBaseName += '.' + part; - intrinsicRealName = '%' + intrinsicBaseName + '%'; - - if (hasOwn(INTRINSICS, intrinsicRealName)) { - value = INTRINSICS[intrinsicRealName]; - } else if (value != null) { - if (!(part in value)) { - if (!allowMissing) { - throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); - } - return void undefined; - } - if ($gOPD && (i + 1) >= parts.length) { - var desc = $gOPD(value, part); - isOwn = !!desc; - - // By convention, when a data property is converted to an accessor - // property to emulate a data property that does not suffer from - // the override mistake, that accessor's getter is marked with - // an `originalValue` property. Here, when we detect this, we - // uphold the illusion by pretending to see that original data - // property, i.e., returning the value rather than the getter - // itself. - if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { - value = desc.get; - } else { - value = value[part]; - } - } else { - isOwn = hasOwn(value, part); - value = value[part]; - } - - if (isOwn && !skipFurtherCaching) { - INTRINSICS[intrinsicRealName] = value; - } - } - } - return value; -}; - - -/***/ }), -/* 4 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/** @type {import('./functionCall')} */ -module.exports = Function.prototype.call; - - -/***/ }), -/* 5 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var replace = String.prototype.replace; -var percentTwenties = /%20/g; - -var Format = { - RFC1738: 'RFC1738', - RFC3986: 'RFC3986' -}; - -module.exports = { - 'default': Format.RFC3986, - formatters: { - RFC1738: function (value) { - return replace.call(value, percentTwenties, '+'); - }, - RFC3986: function (value) { - return String(value); - } - }, - RFC1738: Format.RFC1738, - RFC3986: Format.RFC3986 -}; - - -/***/ }), -/* 6 */ -/***/ (function(module, exports) { - -var g; - -// This works in non-strict mode -g = (function() { - return this; -})(); - -try { - // This works if eval is allowed (see CSP) - g = g || Function("return this")() || (1,eval)("this"); -} catch(e) { - // This works if the window reference is available - if(typeof window === "object") - g = window; -} - -// g can still be undefined, but nothing to do about it... -// We return undefined, instead of nothing here, so it's -// easier to handle this case. if(!global) { ...} - -module.exports = g; - - -/***/ }), -/* 7 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var GetIntrinsic = __webpack_require__(3); -var callBound = __webpack_require__(14); -var inspect = __webpack_require__(1); - -var $TypeError = __webpack_require__(0); -var $Map = GetIntrinsic('%Map%', true); - -/** @type {(thisArg: Map, key: K) => V} */ -var $mapGet = callBound('Map.prototype.get', true); -/** @type {(thisArg: Map, key: K, value: V) => void} */ -var $mapSet = callBound('Map.prototype.set', true); -/** @type {(thisArg: Map, key: K) => boolean} */ -var $mapHas = callBound('Map.prototype.has', true); -/** @type {(thisArg: Map, key: K) => boolean} */ -var $mapDelete = callBound('Map.prototype.delete', true); -/** @type {(thisArg: Map) => number} */ -var $mapSize = callBound('Map.prototype.size', true); - -/** @type {import('.')} */ -module.exports = !!$Map && /** @type {Exclude} */ function getSideChannelMap() { - /** @typedef {ReturnType} Channel */ - /** @typedef {Parameters[0]} K */ - /** @typedef {Parameters[1]} V */ - - /** @type {Map | undefined} */ var $m; - - /** @type {Channel} */ - var channel = { - assert: function (key) { - if (!channel.has(key)) { - throw new $TypeError('Side channel does not contain ' + inspect(key)); - } - }, - 'delete': function (key) { - if ($m) { - var result = $mapDelete($m, key); - if ($mapSize($m) === 0) { - $m = void undefined; - } - return result; - } - return false; - }, - get: function (key) { // eslint-disable-line consistent-return - if ($m) { - return $mapGet($m, key); - } - }, - has: function (key) { - if ($m) { - return $mapHas($m, key); - } - return false; - }, - set: function (key, value) { - if (!$m) { - // @ts-expect-error TS can't handle narrowing a variable inside a closure - $m = new $Map(); - } - $mapSet($m, key, value); - } - }; - - // @ts-expect-error TODO: figure out why TS is erroring here - return channel; -}; - - -/***/ }), -/* 8 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/** @type {import('.')} */ -module.exports = Object; - - -/***/ }), -/* 9 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/** @type {import('.')} */ -var $gOPD = __webpack_require__(39); - -if ($gOPD) { - try { - $gOPD([], 'length'); - } catch (e) { - // IE 8 has a broken gOPD - $gOPD = null; - } -} - -module.exports = $gOPD; - - -/***/ }), -/* 10 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/** @type {import('./Reflect.getPrototypeOf')} */ -module.exports = (typeof Reflect !== 'undefined' && Reflect.getPrototypeOf) || null; - - -/***/ }), -/* 11 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var $Object = __webpack_require__(8); - -/** @type {import('./Object.getPrototypeOf')} */ -module.exports = $Object.getPrototypeOf || null; - - -/***/ }), -/* 12 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var bind = __webpack_require__(2); -var $TypeError = __webpack_require__(0); - -var $call = __webpack_require__(4); -var $actualApply = __webpack_require__(46); - -/** @type {(args: [Function, thisArg?: unknown, ...args: unknown[]]) => Function} TODO FIXME, find a way to use import('.') */ -module.exports = function callBindBasic(args) { - if (args.length < 1 || typeof args[0] !== 'function') { - throw new $TypeError('a function is required'); - } - return $actualApply(bind, $call, args); -}; - - -/***/ }), -/* 13 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/** @type {import('./functionApply')} */ -module.exports = Function.prototype.apply; - - -/***/ }), -/* 14 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var GetIntrinsic = __webpack_require__(3); - -var callBindBasic = __webpack_require__(12); - -/** @type {(thisArg: string, searchString: string, position?: number) => number} */ -var $indexOf = callBindBasic([GetIntrinsic('%String.prototype.indexOf%')]); - -/** @type {import('.')} */ -module.exports = function callBoundIntrinsic(name, allowMissing) { - /* eslint no-extra-parens: 0 */ - - var intrinsic = /** @type {(this: unknown, ...args: unknown[]) => unknown} */ (GetIntrinsic(name, !!allowMissing)); - if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { - return callBindBasic(/** @type {const} */ ([intrinsic])); - } - return intrinsic; -}; - - -/***/ }), -/* 15 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var formats = __webpack_require__(5); - -var has = Object.prototype.hasOwnProperty; -var isArray = Array.isArray; - -var hexTable = (function () { - var array = []; - for (var i = 0; i < 256; ++i) { - array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase()); - } - - return array; -}()); - -var compactQueue = function compactQueue(queue) { - while (queue.length > 1) { - var item = queue.pop(); - var obj = item.obj[item.prop]; - - if (isArray(obj)) { - var compacted = []; - - for (var j = 0; j < obj.length; ++j) { - if (typeof obj[j] !== 'undefined') { - compacted.push(obj[j]); - } - } - - item.obj[item.prop] = compacted; - } - } -}; - -var arrayToObject = function arrayToObject(source, options) { - var obj = options && options.plainObjects ? { __proto__: null } : {}; - for (var i = 0; i < source.length; ++i) { - if (typeof source[i] !== 'undefined') { - obj[i] = source[i]; - } - } - - return obj; -}; - -var merge = function merge(target, source, options) { - /* eslint no-param-reassign: 0 */ - if (!source) { - return target; - } - - if (typeof source !== 'object' && typeof source !== 'function') { - if (isArray(target)) { - target.push(source); - } else if (target && typeof target === 'object') { - if ( - (options && (options.plainObjects || options.allowPrototypes)) - || !has.call(Object.prototype, source) - ) { - target[source] = true; - } - } else { - return [target, source]; - } - - return target; - } - - if (!target || typeof target !== 'object') { - return [target].concat(source); - } - - var mergeTarget = target; - if (isArray(target) && !isArray(source)) { - mergeTarget = arrayToObject(target, options); - } - - if (isArray(target) && isArray(source)) { - source.forEach(function (item, i) { - if (has.call(target, i)) { - var targetItem = target[i]; - if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') { - target[i] = merge(targetItem, item, options); - } else { - target.push(item); - } - } else { - target[i] = item; - } - }); - return target; - } - - return Object.keys(source).reduce(function (acc, key) { - var value = source[key]; - - if (has.call(acc, key)) { - acc[key] = merge(acc[key], value, options); - } else { - acc[key] = value; - } - return acc; - }, mergeTarget); -}; - -var assign = function assignSingleSource(target, source) { - return Object.keys(source).reduce(function (acc, key) { - acc[key] = source[key]; - return acc; - }, target); -}; - -var decode = function (str, defaultDecoder, charset) { - var strWithoutPlus = str.replace(/\+/g, ' '); - if (charset === 'iso-8859-1') { - // unescape never throws, no try...catch needed: - return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape); - } - // utf-8 - try { - return decodeURIComponent(strWithoutPlus); - } catch (e) { - return strWithoutPlus; - } -}; - -var limit = 1024; - -/* eslint operator-linebreak: [2, "before"] */ - -var encode = function encode(str, defaultEncoder, charset, kind, format) { - // This code was originally written by Brian White (mscdex) for the io.js core querystring library. - // It has been adapted here for stricter adherence to RFC 3986 - if (str.length === 0) { - return str; - } - - var string = str; - if (typeof str === 'symbol') { - string = Symbol.prototype.toString.call(str); - } else if (typeof str !== 'string') { - string = String(str); - } - - if (charset === 'iso-8859-1') { - return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) { - return '%26%23' + parseInt($0.slice(2), 16) + '%3B'; - }); - } - - var out = ''; - for (var j = 0; j < string.length; j += limit) { - var segment = string.length >= limit ? string.slice(j, j + limit) : string; - var arr = []; - - for (var i = 0; i < segment.length; ++i) { - var c = segment.charCodeAt(i); - if ( - c === 0x2D // - - || c === 0x2E // . - || c === 0x5F // _ - || c === 0x7E // ~ - || (c >= 0x30 && c <= 0x39) // 0-9 - || (c >= 0x41 && c <= 0x5A) // a-z - || (c >= 0x61 && c <= 0x7A) // A-Z - || (format === formats.RFC1738 && (c === 0x28 || c === 0x29)) // ( ) - ) { - arr[arr.length] = segment.charAt(i); - continue; - } - - if (c < 0x80) { - arr[arr.length] = hexTable[c]; - continue; - } - - if (c < 0x800) { - arr[arr.length] = hexTable[0xC0 | (c >> 6)] - + hexTable[0x80 | (c & 0x3F)]; - continue; - } - - if (c < 0xD800 || c >= 0xE000) { - arr[arr.length] = hexTable[0xE0 | (c >> 12)] - + hexTable[0x80 | ((c >> 6) & 0x3F)] - + hexTable[0x80 | (c & 0x3F)]; - continue; - } - - i += 1; - c = 0x10000 + (((c & 0x3FF) << 10) | (segment.charCodeAt(i) & 0x3FF)); - - arr[arr.length] = hexTable[0xF0 | (c >> 18)] - + hexTable[0x80 | ((c >> 12) & 0x3F)] - + hexTable[0x80 | ((c >> 6) & 0x3F)] - + hexTable[0x80 | (c & 0x3F)]; - } - - out += arr.join(''); - } - - return out; -}; - -var compact = function compact(value) { - var queue = [{ obj: { o: value }, prop: 'o' }]; - var refs = []; - - for (var i = 0; i < queue.length; ++i) { - var item = queue[i]; - var obj = item.obj[item.prop]; - - var keys = Object.keys(obj); - for (var j = 0; j < keys.length; ++j) { - var key = keys[j]; - var val = obj[key]; - if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) { - queue.push({ obj: obj, prop: key }); - refs.push(val); - } - } - } - - compactQueue(queue); - - return value; -}; - -var isRegExp = function isRegExp(obj) { - return Object.prototype.toString.call(obj) === '[object RegExp]'; -}; - -var isBuffer = function isBuffer(obj) { - if (!obj || typeof obj !== 'object') { - return false; - } - - return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); -}; - -var combine = function combine(a, b) { - return [].concat(a, b); -}; - -var maybeMap = function maybeMap(val, fn) { - if (isArray(val)) { - var mapped = []; - for (var i = 0; i < val.length; i += 1) { - mapped.push(fn(val[i])); - } - return mapped; - } - return fn(val); -}; - -module.exports = { - arrayToObject: arrayToObject, - assign: assign, - combine: combine, - compact: compact, - decode: decode, - encode: encode, - isBuffer: isBuffer, - isRegExp: isRegExp, - maybeMap: maybeMap, - merge: merge -}; - - -/***/ }), -/* 16 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -/** - * @copyright Microsoft Corporation. All rights reserved. - * - * @file manifestsFile.ts - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var url = __webpack_require__(17); -/** - * Get the manifest array with each of the base URLs rewritten to point to the local - * page's protocol, hostname, and port. This function is useful for automated tests - * that run locally and use an unpredictable port. - */ -function getLocalPageManifests() { - // Clone manifestsArray - var manifests = JSON.parse(JSON.stringify(getManifests())); - // tslint:disable-next-line:no-function-expression ES5 browsers don't support lambda functions - manifests.forEach(function (manifest) { - var baseUrls = manifest.loaderConfig.internalModuleBaseUrls; - var baseUrl = url.parse(baseUrls[0]); - var pageUrl = url.parse(window.location.toString()); - baseUrl.protocol = pageUrl.protocol; - baseUrl.host = pageUrl.host; - baseUrls[0] = url.format(baseUrl); - }); - return manifests; -} -exports.getLocalPageManifests = getLocalPageManifests; -/** - * Get the manifest array. - */ -function getManifests() { - return [ - { - "id": "f97266fb-ccb7-430e-9384-4124d05295d3", - "alias": "Decorators", - "componentType": "Library", - "version": "1.4.1", - "manifestVersion": 2, - "loaderConfig": { - "entryModuleId": "decorators", - "internalModuleBaseUrls": [ - "https://localhost:4321/node_modules/@microsoft/decorators/" - ], - "scriptResources": { - "decorators": { - "type": "path", - "path": "dist/decorators.js" - } - } - }, - "isInternal": true - }, - { - "id": "73e1dc6c-8441-42cc-ad47-4bd3659f8a3a", - "alias": "SPLodashSubset", - "componentType": "Library", - "version": "1.4.1", - "manifestVersion": 2, - "loaderConfig": { - "entryModuleId": "sp-lodash-subset", - "internalModuleBaseUrls": [ - "https://localhost:4321/node_modules/@microsoft/sp-lodash-subset/" - ], - "scriptResources": { - "sp-lodash-subset": { - "type": "path", - "path": "dist/sp-lodash-subset.js" - } - } - }, - "isInternal": true - }, - { - "id": "7263c7d0-1d6a-45ec-8d85-d4d1d234171b", - "alias": "SPCoreLibrary", - "componentType": "Library", - "version": "1.4.1", - "manifestVersion": 2, - "loaderConfig": { - "entryModuleId": "sp-core-library", - "internalModuleBaseUrls": [ - "https://localhost:4321/node_modules/@microsoft/sp-core-library/" - ], - "scriptResources": { - "sp-core-library": { - "type": "localizedPath", - "defaultPath": "dist/sp-core-library_en-us.js" - }, - "@microsoft/sp-lodash-subset": { - "type": "component", - "version": "1.4.1", - "id": "73e1dc6c-8441-42cc-ad47-4bd3659f8a3a" - } - } - }, - "isInternal": true - }, - { - "id": "02a01e42-69ab-403d-8a16-acd128661f8e", - "alias": "OfficeUIFabricReact", - "componentType": "Library", - "version": "1.4.1", - "manifestVersion": 2, - "loaderConfig": { - "entryModuleId": "office-ui-fabric-react-bundle", - "internalModuleBaseUrls": [ - "https://localhost:4321/node_modules/@microsoft/office-ui-fabric-react-bundle/" - ], - "scriptResources": { - "office-ui-fabric-react-bundle": { - "type": "path", - "path": "dist/office-ui-fabric-react-bundle.js" - }, - "react": { - "type": "component", - "version": "15.6.2", - "id": "0d910c1c-13b9-4e1c-9aa4-b008c5e42d7d", - "failoverPath": "node_modules/react/dist/react.js" - }, - "react-dom": { - "type": "component", - "version": "15.6.2", - "id": "aa0a46ec-1505-43cd-a44a-93f3a5aa460a", - "failoverPath": "node_modules/react-dom/dist/react-dom.js" - } - } - }, - "isInternal": true - }, - { - "id": "1e384972-6346-49b4-93c7-b2e6763938e6", - "alias": "sp-polyfills", - "componentType": "Library", - "version": "1.4.1", - "manifestVersion": 2, - "loaderConfig": { - "entryModuleId": "sp-polyfills", - "internalModuleBaseUrls": [ - "/" - ], - "scriptResources": { - "sp-polyfills": { - "type": "path", - "path": "dist/sp-polyfills.js" - } - } - } - }, - { - "id": "1c6c9123-7aac-41f3-a376-3caea41ed83f", - "alias": "SPLoader", - "componentType": "Library", - "version": "1.4.1", - "manifestVersion": 2, - "loaderConfig": { - "entryModuleId": "sp-loader", - "internalModuleBaseUrls": [ - "https://localhost:4321/node_modules/@microsoft/sp-loader/" - ], - "scriptResources": { - "sp-loader": { - "type": "localizedPath", - "defaultPath": "dist/sp-loader_en-us.js" - }, - "@microsoft/sp-core-library": { - "type": "component", - "version": "1.4.1", - "id": "7263c7d0-1d6a-45ec-8d85-d4d1d234171b" - }, - "@ms/sp-telemetry": { - "type": "component", - "version": "0.2.2", - "id": "8217e442-8ed3-41fd-957d-b112e841286a" - }, - "@microsoft/sp-lodash-subset": { - "type": "component", - "version": "1.4.1", - "id": "73e1dc6c-8441-42cc-ad47-4bd3659f8a3a" - } - } - }, - "isInternal": true - }, - { - "id": "c07208f0-ea3b-4c1a-9965-ac1b825211a6", - "alias": "SPHttp", - "componentType": "Library", - "version": "1.4.1", - "manifestVersion": 2, - "loaderConfig": { - "entryModuleId": "sp-http", - "internalModuleBaseUrls": [ - "https://localhost:4321/node_modules/@microsoft/sp-http/" - ], - "scriptResources": { - "sp-http": { - "type": "localizedPath", - "defaultPath": "dist/sp-http_en-us.js" - }, - "@microsoft/sp-core-library": { - "type": "component", - "version": "1.4.1", - "id": "7263c7d0-1d6a-45ec-8d85-d4d1d234171b" - }, - "@microsoft/decorators": { - "type": "component", - "version": "1.4.1", - "id": "f97266fb-ccb7-430e-9384-4124d05295d3" - }, - "@ms/sp-telemetry": { - "type": "component", - "version": "0.2.2", - "id": "8217e442-8ed3-41fd-957d-b112e841286a" - }, - "@microsoft/sp-lodash-subset": { - "type": "component", - "version": "1.4.1", - "id": "73e1dc6c-8441-42cc-ad47-4bd3659f8a3a" - } - } - }, - "isInternal": true - }, - { - "id": "1c4541f7-5c31-41aa-9fa8-fbc9dc14c0a8", - "alias": "SPPageContext", - "componentType": "Library", - "version": "1.4.1", - "manifestVersion": 2, - "loaderConfig": { - "entryModuleId": "sp-page-context", - "internalModuleBaseUrls": [ - "https://localhost:4321/node_modules/@microsoft/sp-page-context/" - ], - "scriptResources": { - "sp-page-context": { - "type": "path", - "path": "dist/sp-page-context.js" - }, - "@microsoft/sp-core-library": { - "type": "component", - "version": "1.4.1", - "id": "7263c7d0-1d6a-45ec-8d85-d4d1d234171b" - }, - "@ms/sp-telemetry": { - "type": "component", - "version": "0.2.2", - "id": "8217e442-8ed3-41fd-957d-b112e841286a" - }, - "@microsoft/sp-http": { - "type": "component", - "version": "1.4.1", - "id": "c07208f0-ea3b-4c1a-9965-ac1b825211a6" - } - } - }, - "isInternal": true - }, - { - "id": "467dc675-7cc5-4709-8aac-78e3b71bd2f6", - "alias": "SPComponentBase", - "componentType": "Library", - "version": "1.4.1", - "manifestVersion": 2, - "loaderConfig": { - "entryModuleId": "sp-component-base", - "internalModuleBaseUrls": [ - "https://localhost:4321/node_modules/@microsoft/sp-component-base/" - ], - "scriptResources": { - "sp-component-base": { - "type": "path", - "path": "dist/sp-component-base.js" - }, - "@microsoft/decorators": { - "type": "component", - "version": "1.4.1", - "id": "f97266fb-ccb7-430e-9384-4124d05295d3" - }, - "@microsoft/sp-core-library": { - "type": "component", - "version": "1.4.1", - "id": "7263c7d0-1d6a-45ec-8d85-d4d1d234171b" - }, - "@ms/sp-telemetry": { - "type": "component", - "version": "0.2.2", - "id": "8217e442-8ed3-41fd-957d-b112e841286a" - }, - "@microsoft/sp-page-context": { - "type": "component", - "version": "1.4.1", - "id": "1c4541f7-5c31-41aa-9fa8-fbc9dc14c0a8" - } - } - }, - "isInternal": true - }, - { - "id": "0773bd53-a69e-4293-87e6-ba80ea4d614b", - "alias": "SPExtensionBase", - "componentType": "Library", - "version": "1.4.1", - "manifestVersion": 2, - "loaderConfig": { - "entryModuleId": "sp-extension-base", - "internalModuleBaseUrls": [ - "https://localhost:4321/node_modules/@microsoft/sp-extension-base/" - ], - "scriptResources": { - "sp-extension-base": { - "type": "localizedPath", - "defaultPath": "dist/sp-extension-base_en-us.js" - }, - "@ms/sp-telemetry": { - "type": "component", - "version": "0.2.2", - "id": "8217e442-8ed3-41fd-957d-b112e841286a" - }, - "@microsoft/sp-component-base": { - "type": "component", - "version": "1.4.1", - "id": "467dc675-7cc5-4709-8aac-78e3b71bd2f6" - }, - "@microsoft/decorators": { - "type": "component", - "version": "1.4.1", - "id": "f97266fb-ccb7-430e-9384-4124d05295d3" - }, - "@microsoft/sp-http": { - "type": "component", - "version": "1.4.1", - "id": "c07208f0-ea3b-4c1a-9965-ac1b825211a6" - }, - "@microsoft/sp-core-library": { - "type": "component", - "version": "1.4.1", - "id": "7263c7d0-1d6a-45ec-8d85-d4d1d234171b" - }, - "@microsoft/sp-loader": { - "type": "component", - "version": "1.4.1", - "id": "1c6c9123-7aac-41f3-a376-3caea41ed83f" - } - } - }, - "isInternal": true - }, - { - "id": "4df9bb86-ab0a-4aab-ab5f-48bf167048fb", - "alias": "SPApplicationBase", - "componentType": "Library", - "version": "1.4.1", - "manifestVersion": 2, - "loaderConfig": { - "entryModuleId": "sp-application-base", - "internalModuleBaseUrls": [ - "https://localhost:4321/node_modules/@microsoft/sp-application-base/" - ], - "scriptResources": { - "sp-application-base": { - "type": "localizedPath", - "defaultPath": "dist/sp-application-base_en-us.js" - }, - "@microsoft/sp-core-library": { - "type": "component", - "version": "1.4.1", - "id": "7263c7d0-1d6a-45ec-8d85-d4d1d234171b" - }, - "@ms/sp-telemetry": { - "type": "component", - "version": "0.2.2", - "id": "8217e442-8ed3-41fd-957d-b112e841286a" - }, - "@microsoft/sp-http": { - "type": "component", - "version": "1.4.1", - "id": "c07208f0-ea3b-4c1a-9965-ac1b825211a6" - }, - "@microsoft/sp-loader": { - "type": "component", - "version": "1.4.1", - "id": "1c6c9123-7aac-41f3-a376-3caea41ed83f" - }, - "@microsoft/sp-page-context": { - "type": "component", - "version": "1.4.1", - "id": "1c4541f7-5c31-41aa-9fa8-fbc9dc14c0a8" - }, - "@microsoft/sp-extension-base": { - "type": "component", - "version": "1.4.1", - "id": "0773bd53-a69e-4293-87e6-ba80ea4d614b" - }, - "@microsoft/sp-component-base": { - "type": "component", - "version": "1.4.1", - "id": "467dc675-7cc5-4709-8aac-78e3b71bd2f6" - }, - "@microsoft/decorators": { - "type": "component", - "version": "1.4.1", - "id": "f97266fb-ccb7-430e-9384-4124d05295d3" - }, - "@microsoft/sp-lodash-subset": { - "type": "component", - "version": "1.4.1", - "id": "73e1dc6c-8441-42cc-ad47-4bd3659f8a3a" - } - } - }, - "isInternal": true - }, - { - "id": "974a7777-0990-4136-8fa6-95d80114c2e0", - "alias": "SPWebPartBase", - "componentType": "Library", - "version": "1.4.1", - "manifestVersion": 2, - "loaderConfig": { - "entryModuleId": "sp-webpart-base", - "internalModuleBaseUrls": [ - "https://localhost:4321/node_modules/@microsoft/sp-webpart-base/" - ], - "scriptResources": { - "sp-webpart-base": { - "type": "localizedPath", - "defaultPath": "dist/sp-webpart-base_en-us.js" - }, - "@microsoft/sp-core-library": { - "type": "component", - "version": "1.4.1", - "id": "7263c7d0-1d6a-45ec-8d85-d4d1d234171b" - }, - "@microsoft/decorators": { - "type": "component", - "version": "1.4.1", - "id": "f97266fb-ccb7-430e-9384-4124d05295d3" - }, - "react": { - "type": "component", - "version": "15.6.2", - "id": "0d910c1c-13b9-4e1c-9aa4-b008c5e42d7d", - "failoverPath": "node_modules/react/dist/react.js" - }, - "@ms/sp-telemetry": { - "type": "component", - "version": "0.2.2", - "id": "8217e442-8ed3-41fd-957d-b112e841286a" - }, - "@microsoft/sp-lodash-subset": { - "type": "component", - "version": "1.4.1", - "id": "73e1dc6c-8441-42cc-ad47-4bd3659f8a3a" - }, - "office-ui-fabric-react": { - "type": "component", - "version": "1.4.1", - "id": "02a01e42-69ab-403d-8a16-acd128661f8e" - }, - "react-dom": { - "type": "component", - "version": "15.6.2", - "id": "aa0a46ec-1505-43cd-a44a-93f3a5aa460a", - "failoverPath": "node_modules/react-dom/dist/react-dom.js" - }, - "@microsoft/sp-http": { - "type": "component", - "version": "1.4.1", - "id": "c07208f0-ea3b-4c1a-9965-ac1b825211a6" - }, - "@microsoft/sp-component-base": { - "type": "component", - "version": "1.4.1", - "id": "467dc675-7cc5-4709-8aac-78e3b71bd2f6" - }, - "@microsoft/sp-loader": { - "type": "component", - "version": "1.4.1", - "id": "1c6c9123-7aac-41f3-a376-3caea41ed83f" - }, - "@microsoft/sp-page-context": { - "type": "component", - "version": "1.4.1", - "id": "1c4541f7-5c31-41aa-9fa8-fbc9dc14c0a8" - }, - "@microsoft/office-ui-fabric-react-bundle": { - "type": "component", - "version": "1.4.1", - "id": "02a01e42-69ab-403d-8a16-acd128661f8e" - } - } - }, - "isInternal": true - }, - { - "id": "c0c518b8-701b-4f6f-956d-5782772bb731", - "alias": "SPDialog", - "componentType": "Library", - "version": "1.4.1", - "manifestVersion": 2, - "loaderConfig": { - "entryModuleId": "sp-dialog", - "internalModuleBaseUrls": [ - "https://localhost:4321/node_modules/@microsoft/sp-dialog/" - ], - "scriptResources": { - "sp-dialog": { - "type": "path", - "path": "dist/sp-dialog.js" - }, - "react": { - "type": "component", - "version": "15.6.2", - "id": "0d910c1c-13b9-4e1c-9aa4-b008c5e42d7d", - "failoverPath": "node_modules/react/dist/react.js" - }, - "react-dom": { - "type": "component", - "version": "15.6.2", - "id": "aa0a46ec-1505-43cd-a44a-93f3a5aa460a", - "failoverPath": "node_modules/react-dom/dist/react-dom.js" - }, - "office-ui-fabric-react": { - "type": "component", - "version": "1.4.1", - "id": "02a01e42-69ab-403d-8a16-acd128661f8e" - }, - "@microsoft/decorators": { - "type": "component", - "version": "1.4.1", - "id": "f97266fb-ccb7-430e-9384-4124d05295d3" - }, - "@ms/sp-telemetry": { - "type": "component", - "version": "0.2.2", - "id": "8217e442-8ed3-41fd-957d-b112e841286a" - }, - "@microsoft/sp-core-library": { - "type": "component", - "version": "1.4.1", - "id": "7263c7d0-1d6a-45ec-8d85-d4d1d234171b" - }, - "@microsoft/sp-application-base": { - "type": "component", - "version": "1.4.1", - "id": "4df9bb86-ab0a-4aab-ab5f-48bf167048fb" - }, - "@microsoft/office-ui-fabric-react-bundle": { - "type": "component", - "version": "1.4.1", - "id": "02a01e42-69ab-403d-8a16-acd128661f8e" - }, - "@microsoft/sp-webpart-base": { - "type": "component", - "version": "1.4.1", - "id": "974a7777-0990-4136-8fa6-95d80114c2e0" - } - } - }, - "isInternal": true - }, - { - "id": "29bd516f-4ece-40b7-8028-597cbc65a223", - "alias": "SpOfficeUIFabricCore", - "componentType": "Library", - "version": "1.4.1", - "manifestVersion": 2, - "loaderConfig": { - "entryModuleId": "office-ui-fabric-core", - "internalModuleBaseUrls": [ - "https://localhost:4321/node_modules/@microsoft/sp-office-ui-fabric-core/" - ], - "scriptResources": { - "office-ui-fabric-core": { - "type": "path", - "path": "dist/office-ui-fabric-core.js" - } - } - }, - "isInternal": true - }, - { - "id": "4d5eb168-6729-49a8-aec7-0e397f486b6e", - "alias": "SPClientPreview", - "componentType": "Library", - "version": "1.4.1", - "manifestVersion": 2, - "loaderConfig": { - "entryModuleId": "sp-client-preview", - "internalModuleBaseUrls": [ - "https://localhost:4321/node_modules/@microsoft/sp-client-preview/" - ], - "scriptResources": { - "sp-client-preview": { - "type": "path", - "path": "dist/sp-client-preview.js" - }, - "@microsoft/sp-core-library": { - "type": "component", - "version": "1.4.1", - "id": "7263c7d0-1d6a-45ec-8d85-d4d1d234171b" - }, - "@microsoft/sp-lodash-subset": { - "type": "component", - "version": "1.4.1", - "id": "73e1dc6c-8441-42cc-ad47-4bd3659f8a3a" - }, - "@ms/sp-telemetry": { - "type": "component", - "version": "0.2.2", - "id": "8217e442-8ed3-41fd-957d-b112e841286a" - }, - "@microsoft/sp-http": { - "type": "component", - "version": "1.4.1", - "id": "c07208f0-ea3b-4c1a-9965-ac1b825211a6" - } - } - }, - "isInternal": true - }, - { - "id": "8be81a5c-af38-4bb2-af97-afa3b64dfbed", - "alias": "WebPartWorkbench", - "componentType": "Application", - "version": "1.4.1", - "manifestVersion": 2, - "title": { - "default": "WebpartWorkbench" - }, - "description": { - "default": "WebpartWorkbench" - }, - "assemblyId": "5dae53c4-db1e-4d0b-b8b2-88c874dabf83", - "preloadComponents": [ - "8217e442-8ed3-41fd-957d-b112e841286a", - "4df9bb86-ab0a-4aab-ab5f-48bf167048fb", - "05ed6956-59ad-4aa6-9e4e-b832c96ae87b" - ], - "preloadOptions": { - "shouldPreloadWeb": true, - "shouldPreloadUser": true, - "shouldPreloadList": false, - "shouldPreloadItem": true, - "shouldPreloadQuickLaunch": true - }, - "loaderConfig": { - "entryModuleId": "sp-webpart-workbench", - "internalModuleBaseUrls": [ - "https://localhost:4321/node_modules/@microsoft/sp-webpart-workbench/" - ], - "scriptResources": { - "sp-webpart-workbench": { - "type": "localizedPath", - "defaultPath": "dist/sp-webpart-workbench_en-us.js" - }, - "react": { - "type": "component", - "version": "15.6.2", - "id": "0d910c1c-13b9-4e1c-9aa4-b008c5e42d7d", - "failoverPath": "node_modules/react/dist/react.js" - }, - "office-ui-fabric-react": { - "type": "component", - "version": "1.4.1", - "id": "02a01e42-69ab-403d-8a16-acd128661f8e" - }, - "@microsoft/sp-core-library": { - "type": "component", - "version": "1.4.1", - "id": "7263c7d0-1d6a-45ec-8d85-d4d1d234171b" - }, - "@ms/sp-telemetry": { - "type": "component", - "version": "0.2.2", - "id": "8217e442-8ed3-41fd-957d-b112e841286a" - }, - "@microsoft/sp-lodash-subset": { - "type": "component", - "version": "1.4.1", - "id": "73e1dc6c-8441-42cc-ad47-4bd3659f8a3a" - }, - "@microsoft/sp-webpart-base": { - "type": "component", - "version": "1.4.1", - "id": "974a7777-0990-4136-8fa6-95d80114c2e0" - }, - "react-dom": { - "type": "component", - "version": "15.6.2", - "id": "aa0a46ec-1505-43cd-a44a-93f3a5aa460a", - "failoverPath": "node_modules/react-dom/dist/react-dom.js" - }, - "@microsoft/office-ui-fabric-react-bundle": { - "type": "component", - "version": "1.4.1", - "id": "02a01e42-69ab-403d-8a16-acd128661f8e" - }, - "@microsoft/sp-page-context": { - "type": "component", - "version": "1.4.1", - "id": "1c4541f7-5c31-41aa-9fa8-fbc9dc14c0a8" - }, - "@microsoft/sp-http": { - "type": "component", - "version": "1.4.1", - "id": "c07208f0-ea3b-4c1a-9965-ac1b825211a6" - }, - "@microsoft/sp-application-base": { - "type": "component", - "version": "1.4.1", - "id": "4df9bb86-ab0a-4aab-ab5f-48bf167048fb" - }, - "@microsoft/sp-loader": { - "type": "component", - "version": "1.4.1", - "id": "1c6c9123-7aac-41f3-a376-3caea41ed83f" - } - } - }, - "isInternal": true - }, - { - "id": "abc3361f-bb2d-491f-aba3-cd51c19a299b", - "alias": "MegaMenuApplicationCustomizer", - "componentType": "Extension", - "extensionType": "ApplicationCustomizer", - "version": "1.1.2", - "manifestVersion": 2, - "requiresCustomScript": false, - "loaderConfig": { - "entryModuleId": "mega-menu-application-customizer", - "internalModuleBaseUrls": [ - "https://localhost:4321/" - ], - "scriptResources": { - "mega-menu-application-customizer": { - "type": "path", - "path": "dist/mega-menu-application-customizer.js" - }, - "MegaMenuApplicationCustomizerStrings": { - "defaultPath": "lib/extensions/megaMenu/loc/en-us.js", - "type": "localizedPath", - "paths": { - "de-DE": "lib/extensions/megaMenu/loc/de-de.js", - "en-US": "lib/extensions/megaMenu/loc/en-us.js" - } - }, - "@microsoft/decorators": { - "type": "component", - "version": "1.4.1", - "id": "f97266fb-ccb7-430e-9384-4124d05295d3" - }, - "@microsoft/sp-application-base": { - "type": "component", - "version": "1.4.1", - "id": "4df9bb86-ab0a-4aab-ab5f-48bf167048fb" - }, - "@microsoft/sp-http": { - "type": "component", - "version": "1.4.1", - "id": "c07208f0-ea3b-4c1a-9965-ac1b825211a6" - }, - "@microsoft/sp-lodash-subset": { - "type": "component", - "version": "1.4.1", - "id": "73e1dc6c-8441-42cc-ad47-4bd3659f8a3a" - } - } - } - } -]; -} -exports.getManifests = getManifests; - -//# sourceMappingURL=manifestsFile.js.map - - -/***/ }), -/* 17 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* - * Copyright Joyent, Inc. and other Node contributors. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to permit - * persons to whom the Software is furnished to do so, subject to the - * following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN - * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - - -var punycode = __webpack_require__(18); - -function Url() { - this.protocol = null; - this.slashes = null; - this.auth = null; - this.host = null; - this.port = null; - this.hostname = null; - this.hash = null; - this.search = null; - this.query = null; - this.pathname = null; - this.path = null; - this.href = null; -} - -// Reference: RFC 3986, RFC 1808, RFC 2396 - -/* - * define these here so at least they only have to be - * compiled once on the first module load. - */ -var protocolPattern = /^([a-z0-9.+-]+:)/i, - portPattern = /:[0-9]*$/, - - // Special case for a simple path URL - simplePathPattern = /^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/, - - /* - * RFC 2396: characters reserved for delimiting URLs. - * We actually just auto-escape these. - */ - delims = [ - '<', '>', '"', '`', ' ', '\r', '\n', '\t' - ], - - // RFC 2396: characters not allowed for various reasons. - unwise = [ - '{', '}', '|', '\\', '^', '`' - ].concat(delims), - - // Allowed by RFCs, but cause of XSS attacks. Always escape these. - autoEscape = ['\''].concat(unwise), - /* - * Characters that are never ever allowed in a hostname. - * Note that any invalid chars are also handled, but these - * are the ones that are *expected* to be seen, so we fast-path - * them. - */ - nonHostChars = [ - '%', '/', '?', ';', '#' - ].concat(autoEscape), - hostEndingChars = [ - '/', '?', '#' - ], - hostnameMaxLen = 255, - hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/, - hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, - // protocols that can allow "unsafe" and "unwise" chars. - unsafeProtocol = { - javascript: true, - 'javascript:': true - }, - // protocols that never have a hostname. - hostlessProtocol = { - javascript: true, - 'javascript:': true - }, - // protocols that always contain a // bit. - slashedProtocol = { - http: true, - https: true, - ftp: true, - gopher: true, - file: true, - 'http:': true, - 'https:': true, - 'ftp:': true, - 'gopher:': true, - 'file:': true - }, - querystring = __webpack_require__(20); - -function urlParse(url, parseQueryString, slashesDenoteHost) { - if (url && typeof url === 'object' && url instanceof Url) { return url; } - - var u = new Url(); - u.parse(url, parseQueryString, slashesDenoteHost); - return u; -} - -Url.prototype.parse = function (url, parseQueryString, slashesDenoteHost) { - if (typeof url !== 'string') { - throw new TypeError("Parameter 'url' must be a string, not " + typeof url); - } - - /* - * Copy chrome, IE, opera backslash-handling behavior. - * Back slashes before the query string get converted to forward slashes - * See: https://code.google.com/p/chromium/issues/detail?id=25916 - */ - var queryIndex = url.indexOf('?'), - splitter = queryIndex !== -1 && queryIndex < url.indexOf('#') ? '?' : '#', - uSplit = url.split(splitter), - slashRegex = /\\/g; - uSplit[0] = uSplit[0].replace(slashRegex, '/'); - url = uSplit.join(splitter); - - var rest = url; - - /* - * trim before proceeding. - * This is to support parse stuff like " http://foo.com \n" - */ - rest = rest.trim(); - - if (!slashesDenoteHost && url.split('#').length === 1) { - // Try fast path regexp - var simplePath = simplePathPattern.exec(rest); - if (simplePath) { - this.path = rest; - this.href = rest; - this.pathname = simplePath[1]; - if (simplePath[2]) { - this.search = simplePath[2]; - if (parseQueryString) { - this.query = querystring.parse(this.search.substr(1)); - } else { - this.query = this.search.substr(1); - } - } else if (parseQueryString) { - this.search = ''; - this.query = {}; - } - return this; - } - } - - var proto = protocolPattern.exec(rest); - if (proto) { - proto = proto[0]; - var lowerProto = proto.toLowerCase(); - this.protocol = lowerProto; - rest = rest.substr(proto.length); - } - - /* - * figure out if it's got a host - * user@server is *always* interpreted as a hostname, and url - * resolution will treat //foo/bar as host=foo,path=bar because that's - * how the browser resolves relative URLs. - */ - if (slashesDenoteHost || proto || rest.match(/^\/\/[^@/]+@[^@/]+/)) { - var slashes = rest.substr(0, 2) === '//'; - if (slashes && !(proto && hostlessProtocol[proto])) { - rest = rest.substr(2); - this.slashes = true; - } - } - - if (!hostlessProtocol[proto] && (slashes || (proto && !slashedProtocol[proto]))) { - - /* - * there's a hostname. - * the first instance of /, ?, ;, or # ends the host. - * - * If there is an @ in the hostname, then non-host chars *are* allowed - * to the left of the last @ sign, unless some host-ending character - * comes *before* the @-sign. - * URLs are obnoxious. - * - * ex: - * http://a@b@c/ => user:a@b host:c - * http://a@b?@c => user:a host:c path:/?@c - */ - - /* - * v0.12 TODO(isaacs): This is not quite how Chrome does things. - * Review our test case against browsers more comprehensively. - */ - - // find the first instance of any hostEndingChars - var hostEnd = -1; - for (var i = 0; i < hostEndingChars.length; i++) { - var hec = rest.indexOf(hostEndingChars[i]); - if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) { hostEnd = hec; } - } - - /* - * at this point, either we have an explicit point where the - * auth portion cannot go past, or the last @ char is the decider. - */ - var auth, atSign; - if (hostEnd === -1) { - // atSign can be anywhere. - atSign = rest.lastIndexOf('@'); - } else { - /* - * atSign must be in auth portion. - * http://a@b/c@d => host:b auth:a path:/c@d - */ - atSign = rest.lastIndexOf('@', hostEnd); - } - - /* - * Now we have a portion which is definitely the auth. - * Pull that off. - */ - if (atSign !== -1) { - auth = rest.slice(0, atSign); - rest = rest.slice(atSign + 1); - this.auth = decodeURIComponent(auth); - } - - // the host is the remaining to the left of the first non-host char - hostEnd = -1; - for (var i = 0; i < nonHostChars.length; i++) { - var hec = rest.indexOf(nonHostChars[i]); - if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) { hostEnd = hec; } - } - // if we still have not hit it, then the entire thing is a host. - if (hostEnd === -1) { hostEnd = rest.length; } - - this.host = rest.slice(0, hostEnd); - rest = rest.slice(hostEnd); - - // pull out port. - this.parseHost(); - - /* - * we've indicated that there is a hostname, - * so even if it's empty, it has to be present. - */ - this.hostname = this.hostname || ''; - - /* - * if hostname begins with [ and ends with ] - * assume that it's an IPv6 address. - */ - var ipv6Hostname = this.hostname[0] === '[' && this.hostname[this.hostname.length - 1] === ']'; - - // validate a little. - if (!ipv6Hostname) { - var hostparts = this.hostname.split(/\./); - for (var i = 0, l = hostparts.length; i < l; i++) { - var part = hostparts[i]; - if (!part) { continue; } - if (!part.match(hostnamePartPattern)) { - var newpart = ''; - for (var j = 0, k = part.length; j < k; j++) { - if (part.charCodeAt(j) > 127) { - /* - * we replace non-ASCII char with a temporary placeholder - * we need this to make sure size of hostname is not - * broken by replacing non-ASCII by nothing - */ - newpart += 'x'; - } else { - newpart += part[j]; - } - } - // we test again with ASCII char only - if (!newpart.match(hostnamePartPattern)) { - var validParts = hostparts.slice(0, i); - var notHost = hostparts.slice(i + 1); - var bit = part.match(hostnamePartStart); - if (bit) { - validParts.push(bit[1]); - notHost.unshift(bit[2]); - } - if (notHost.length) { - rest = '/' + notHost.join('.') + rest; - } - this.hostname = validParts.join('.'); - break; - } - } - } - } - - if (this.hostname.length > hostnameMaxLen) { - this.hostname = ''; - } else { - // hostnames are always lower case. - this.hostname = this.hostname.toLowerCase(); - } - - if (!ipv6Hostname) { - /* - * IDNA Support: Returns a punycoded representation of "domain". - * It only converts parts of the domain name that - * have non-ASCII characters, i.e. it doesn't matter if - * you call it with a domain that already is ASCII-only. - */ - this.hostname = punycode.toASCII(this.hostname); - } - - var p = this.port ? ':' + this.port : ''; - var h = this.hostname || ''; - this.host = h + p; - this.href += this.host; - - /* - * strip [ and ] from the hostname - * the host field still retains them, though - */ - if (ipv6Hostname) { - this.hostname = this.hostname.substr(1, this.hostname.length - 2); - if (rest[0] !== '/') { - rest = '/' + rest; - } - } - } - - /* - * now rest is set to the post-host stuff. - * chop off any delim chars. - */ - if (!unsafeProtocol[lowerProto]) { - - /* - * First, make 100% sure that any "autoEscape" chars get - * escaped, even if encodeURIComponent doesn't think they - * need to be. - */ - for (var i = 0, l = autoEscape.length; i < l; i++) { - var ae = autoEscape[i]; - if (rest.indexOf(ae) === -1) { continue; } - var esc = encodeURIComponent(ae); - if (esc === ae) { - esc = escape(ae); - } - rest = rest.split(ae).join(esc); - } - } - - // chop off from the tail first. - var hash = rest.indexOf('#'); - if (hash !== -1) { - // got a fragment string. - this.hash = rest.substr(hash); - rest = rest.slice(0, hash); - } - var qm = rest.indexOf('?'); - if (qm !== -1) { - this.search = rest.substr(qm); - this.query = rest.substr(qm + 1); - if (parseQueryString) { - this.query = querystring.parse(this.query); - } - rest = rest.slice(0, qm); - } else if (parseQueryString) { - // no query string, but parseQueryString still requested - this.search = ''; - this.query = {}; - } - if (rest) { this.pathname = rest; } - if (slashedProtocol[lowerProto] && this.hostname && !this.pathname) { - this.pathname = '/'; - } - - // to support http.request - if (this.pathname || this.search) { - var p = this.pathname || ''; - var s = this.search || ''; - this.path = p + s; - } - - // finally, reconstruct the href based on what has been validated. - this.href = this.format(); - return this; -}; - -// format a parsed object into a url string -function urlFormat(obj) { - /* - * ensure it's an object, and not a string url. - * If it's an obj, this is a no-op. - * this way, you can call url_format() on strings - * to clean up potentially wonky urls. - */ - if (typeof obj === 'string') { obj = urlParse(obj); } - if (!(obj instanceof Url)) { return Url.prototype.format.call(obj); } - return obj.format(); -} - -Url.prototype.format = function () { - var auth = this.auth || ''; - if (auth) { - auth = encodeURIComponent(auth); - auth = auth.replace(/%3A/i, ':'); - auth += '@'; - } - - var protocol = this.protocol || '', - pathname = this.pathname || '', - hash = this.hash || '', - host = false, - query = ''; - - if (this.host) { - host = auth + this.host; - } else if (this.hostname) { - host = auth + (this.hostname.indexOf(':') === -1 ? this.hostname : '[' + this.hostname + ']'); - if (this.port) { - host += ':' + this.port; - } - } - - if (this.query && typeof this.query === 'object' && Object.keys(this.query).length) { - query = querystring.stringify(this.query, { - arrayFormat: 'repeat', - addQueryPrefix: false - }); - } - - var search = this.search || (query && ('?' + query)) || ''; - - if (protocol && protocol.substr(-1) !== ':') { protocol += ':'; } - - /* - * only the slashedProtocols get the //. Not mailto:, xmpp:, etc. - * unless they had them to begin with. - */ - if (this.slashes || (!protocol || slashedProtocol[protocol]) && host !== false) { - host = '//' + (host || ''); - if (pathname && pathname.charAt(0) !== '/') { pathname = '/' + pathname; } - } else if (!host) { - host = ''; - } - - if (hash && hash.charAt(0) !== '#') { hash = '#' + hash; } - if (search && search.charAt(0) !== '?') { search = '?' + search; } - - pathname = pathname.replace(/[?#]/g, function (match) { - return encodeURIComponent(match); - }); - search = search.replace('#', '%23'); - - return protocol + host + pathname + search + hash; -}; - -function urlResolve(source, relative) { - return urlParse(source, false, true).resolve(relative); -} - -Url.prototype.resolve = function (relative) { - return this.resolveObject(urlParse(relative, false, true)).format(); -}; - -function urlResolveObject(source, relative) { - if (!source) { return relative; } - return urlParse(source, false, true).resolveObject(relative); -} - -Url.prototype.resolveObject = function (relative) { - if (typeof relative === 'string') { - var rel = new Url(); - rel.parse(relative, false, true); - relative = rel; - } - - var result = new Url(); - var tkeys = Object.keys(this); - for (var tk = 0; tk < tkeys.length; tk++) { - var tkey = tkeys[tk]; - result[tkey] = this[tkey]; - } - - /* - * hash is always overridden, no matter what. - * even href="" will remove it. - */ - result.hash = relative.hash; - - // if the relative url is empty, then there's nothing left to do here. - if (relative.href === '') { - result.href = result.format(); - return result; - } - - // hrefs like //foo/bar always cut to the protocol. - if (relative.slashes && !relative.protocol) { - // take everything except the protocol from relative - var rkeys = Object.keys(relative); - for (var rk = 0; rk < rkeys.length; rk++) { - var rkey = rkeys[rk]; - if (rkey !== 'protocol') { result[rkey] = relative[rkey]; } - } - - // urlParse appends trailing / to urls like http://www.example.com - if (slashedProtocol[result.protocol] && result.hostname && !result.pathname) { - result.pathname = '/'; - result.path = result.pathname; - } - - result.href = result.format(); - return result; - } - - if (relative.protocol && relative.protocol !== result.protocol) { - /* - * if it's a known url protocol, then changing - * the protocol does weird things - * first, if it's not file:, then we MUST have a host, - * and if there was a path - * to begin with, then we MUST have a path. - * if it is file:, then the host is dropped, - * because that's known to be hostless. - * anything else is assumed to be absolute. - */ - if (!slashedProtocol[relative.protocol]) { - var keys = Object.keys(relative); - for (var v = 0; v < keys.length; v++) { - var k = keys[v]; - result[k] = relative[k]; - } - result.href = result.format(); - return result; - } - - result.protocol = relative.protocol; - if (!relative.host && !hostlessProtocol[relative.protocol]) { - var relPath = (relative.pathname || '').split('/'); - while (relPath.length && !(relative.host = relPath.shift())) { } - if (!relative.host) { relative.host = ''; } - if (!relative.hostname) { relative.hostname = ''; } - if (relPath[0] !== '') { relPath.unshift(''); } - if (relPath.length < 2) { relPath.unshift(''); } - result.pathname = relPath.join('/'); - } else { - result.pathname = relative.pathname; - } - result.search = relative.search; - result.query = relative.query; - result.host = relative.host || ''; - result.auth = relative.auth; - result.hostname = relative.hostname || relative.host; - result.port = relative.port; - // to support http.request - if (result.pathname || result.search) { - var p = result.pathname || ''; - var s = result.search || ''; - result.path = p + s; - } - result.slashes = result.slashes || relative.slashes; - result.href = result.format(); - return result; - } - - var isSourceAbs = result.pathname && result.pathname.charAt(0) === '/', - isRelAbs = relative.host || relative.pathname && relative.pathname.charAt(0) === '/', - mustEndAbs = isRelAbs || isSourceAbs || (result.host && relative.pathname), - removeAllDots = mustEndAbs, - srcPath = result.pathname && result.pathname.split('/') || [], - relPath = relative.pathname && relative.pathname.split('/') || [], - psychotic = result.protocol && !slashedProtocol[result.protocol]; - - /* - * if the url is a non-slashed url, then relative - * links like ../.. should be able - * to crawl up to the hostname, as well. This is strange. - * result.protocol has already been set by now. - * Later on, put the first path part into the host field. - */ - if (psychotic) { - result.hostname = ''; - result.port = null; - if (result.host) { - if (srcPath[0] === '') { srcPath[0] = result.host; } else { srcPath.unshift(result.host); } - } - result.host = ''; - if (relative.protocol) { - relative.hostname = null; - relative.port = null; - if (relative.host) { - if (relPath[0] === '') { relPath[0] = relative.host; } else { relPath.unshift(relative.host); } - } - relative.host = null; - } - mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === ''); - } - - if (isRelAbs) { - // it's absolute. - result.host = relative.host || relative.host === '' ? relative.host : result.host; - result.hostname = relative.hostname || relative.hostname === '' ? relative.hostname : result.hostname; - result.search = relative.search; - result.query = relative.query; - srcPath = relPath; - // fall through to the dot-handling below. - } else if (relPath.length) { - /* - * it's relative - * throw away the existing file, and take the new path instead. - */ - if (!srcPath) { srcPath = []; } - srcPath.pop(); - srcPath = srcPath.concat(relPath); - result.search = relative.search; - result.query = relative.query; - } else if (relative.search != null) { - /* - * just pull out the search. - * like href='?foo'. - * Put this after the other two cases because it simplifies the booleans - */ - if (psychotic) { - result.host = srcPath.shift(); - result.hostname = result.host; - /* - * occationaly the auth can get stuck only in host - * this especially happens in cases like - * url.resolveObject('mailto:local1@domain1', 'local2@domain2') - */ - var authInHost = result.host && result.host.indexOf('@') > 0 ? result.host.split('@') : false; - if (authInHost) { - result.auth = authInHost.shift(); - result.hostname = authInHost.shift(); - result.host = result.hostname; - } - } - result.search = relative.search; - result.query = relative.query; - // to support http.request - if (result.pathname !== null || result.search !== null) { - result.path = (result.pathname ? result.pathname : '') + (result.search ? result.search : ''); - } - result.href = result.format(); - return result; - } - - if (!srcPath.length) { - /* - * no path at all. easy. - * we've already handled the other stuff above. - */ - result.pathname = null; - // to support http.request - if (result.search) { - result.path = '/' + result.search; - } else { - result.path = null; - } - result.href = result.format(); - return result; - } - - /* - * if a url ENDs in . or .., then it must get a trailing slash. - * however, if it ends in anything else non-slashy, - * then it must NOT get a trailing slash. - */ - var last = srcPath.slice(-1)[0]; - var hasTrailingSlash = (result.host || relative.host || srcPath.length > 1) && (last === '.' || last === '..') || last === ''; - - /* - * strip single dots, resolve double dots to parent dir - * if the path tries to go above the root, `up` ends up > 0 - */ - var up = 0; - for (var i = srcPath.length; i >= 0; i--) { - last = srcPath[i]; - if (last === '.') { - srcPath.splice(i, 1); - } else if (last === '..') { - srcPath.splice(i, 1); - up++; - } else if (up) { - srcPath.splice(i, 1); - up--; - } - } - - // if the path is allowed to go above the root, restore leading ..s - if (!mustEndAbs && !removeAllDots) { - for (; up--; up) { - srcPath.unshift('..'); - } - } - - if (mustEndAbs && srcPath[0] !== '' && (!srcPath[0] || srcPath[0].charAt(0) !== '/')) { - srcPath.unshift(''); - } - - if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) { - srcPath.push(''); - } - - var isAbsolute = srcPath[0] === '' || (srcPath[0] && srcPath[0].charAt(0) === '/'); - - // put the host back - if (psychotic) { - result.hostname = isAbsolute ? '' : srcPath.length ? srcPath.shift() : ''; - result.host = result.hostname; - /* - * occationaly the auth can get stuck only in host - * this especially happens in cases like - * url.resolveObject('mailto:local1@domain1', 'local2@domain2') - */ - var authInHost = result.host && result.host.indexOf('@') > 0 ? result.host.split('@') : false; - if (authInHost) { - result.auth = authInHost.shift(); - result.hostname = authInHost.shift(); - result.host = result.hostname; - } - } - - mustEndAbs = mustEndAbs || (result.host && srcPath.length); - - if (mustEndAbs && !isAbsolute) { - srcPath.unshift(''); - } - - if (srcPath.length > 0) { - result.pathname = srcPath.join('/'); - } else { - result.pathname = null; - result.path = null; - } - - // to support request.http - if (result.pathname !== null || result.search !== null) { - result.path = (result.pathname ? result.pathname : '') + (result.search ? result.search : ''); - } - result.auth = relative.auth || result.auth; - result.slashes = result.slashes || relative.slashes; - result.href = result.format(); - return result; -}; - -Url.prototype.parseHost = function () { - var host = this.host; - var port = portPattern.exec(host); - if (port) { - port = port[0]; - if (port !== ':') { - this.port = port.substr(1); - } - host = host.substr(0, host.length - port.length); - } - if (host) { this.hostname = host; } -}; - -exports.parse = urlParse; -exports.resolve = urlResolve; -exports.resolveObject = urlResolveObject; -exports.format = urlFormat; - -exports.Url = Url; - - -/***/ }), -/* 18 */ -/***/ (function(module, exports, __webpack_require__) { - -/* WEBPACK VAR INJECTION */(function(module, global) {var __WEBPACK_AMD_DEFINE_RESULT__;/*! https://mths.be/punycode v1.4.1 by @mathias */ -;(function(root) { - - /** Detect free variables */ - var freeExports = typeof exports == 'object' && exports && - !exports.nodeType && exports; - var freeModule = typeof module == 'object' && module && - !module.nodeType && module; - var freeGlobal = typeof global == 'object' && global; - if ( - freeGlobal.global === freeGlobal || - freeGlobal.window === freeGlobal || - freeGlobal.self === freeGlobal - ) { - root = freeGlobal; - } - - /** - * The `punycode` object. - * @name punycode - * @type Object - */ - var punycode, - - /** Highest positive signed 32-bit float value */ - maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1 - - /** Bootstring parameters */ - base = 36, - tMin = 1, - tMax = 26, - skew = 38, - damp = 700, - initialBias = 72, - initialN = 128, // 0x80 - delimiter = '-', // '\x2D' - - /** Regular expressions */ - regexPunycode = /^xn--/, - regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars - regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators - - /** Error messages */ - errors = { - 'overflow': 'Overflow: input needs wider integers to process', - 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', - 'invalid-input': 'Invalid input' - }, - - /** Convenience shortcuts */ - baseMinusTMin = base - tMin, - floor = Math.floor, - stringFromCharCode = String.fromCharCode, - - /** Temporary variable */ - key; - - /*--------------------------------------------------------------------------*/ - - /** - * A generic error utility function. - * @private - * @param {String} type The error type. - * @returns {Error} Throws a `RangeError` with the applicable error message. - */ - function error(type) { - throw new RangeError(errors[type]); - } - - /** - * A generic `Array#map` utility function. - * @private - * @param {Array} array The array to iterate over. - * @param {Function} callback The function that gets called for every array - * item. - * @returns {Array} A new array of values returned by the callback function. - */ - function map(array, fn) { - var length = array.length; - var result = []; - while (length--) { - result[length] = fn(array[length]); - } - return result; - } - - /** - * A simple `Array#map`-like wrapper to work with domain name strings or email - * addresses. - * @private - * @param {String} domain The domain name or email address. - * @param {Function} callback The function that gets called for every - * character. - * @returns {Array} A new string of characters returned by the callback - * function. - */ - function mapDomain(string, fn) { - var parts = string.split('@'); - var result = ''; - if (parts.length > 1) { - // In email addresses, only the domain name should be punycoded. Leave - // the local part (i.e. everything up to `@`) intact. - result = parts[0] + '@'; - string = parts[1]; - } - // Avoid `split(regex)` for IE8 compatibility. See #17. - string = string.replace(regexSeparators, '\x2E'); - var labels = string.split('.'); - var encoded = map(labels, fn).join('.'); - return result + encoded; - } - - /** - * Creates an array containing the numeric code points of each Unicode - * character in the string. While JavaScript uses UCS-2 internally, - * this function will convert a pair of surrogate halves (each of which - * UCS-2 exposes as separate characters) into a single code point, - * matching UTF-16. - * @see `punycode.ucs2.encode` - * @see - * @memberOf punycode.ucs2 - * @name decode - * @param {String} string The Unicode input string (UCS-2). - * @returns {Array} The new array of code points. - */ - function ucs2decode(string) { - var output = [], - counter = 0, - length = string.length, - value, - extra; - while (counter < length) { - value = string.charCodeAt(counter++); - if (value >= 0xD800 && value <= 0xDBFF && counter < length) { - // high surrogate, and there is a next character - extra = string.charCodeAt(counter++); - if ((extra & 0xFC00) == 0xDC00) { // low surrogate - output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); - } else { - // unmatched surrogate; only append this code unit, in case the next - // code unit is the high surrogate of a surrogate pair - output.push(value); - counter--; - } - } else { - output.push(value); - } - } - return output; - } - - /** - * Creates a string based on an array of numeric code points. - * @see `punycode.ucs2.decode` - * @memberOf punycode.ucs2 - * @name encode - * @param {Array} codePoints The array of numeric code points. - * @returns {String} The new Unicode string (UCS-2). - */ - function ucs2encode(array) { - return map(array, function(value) { - var output = ''; - if (value > 0xFFFF) { - value -= 0x10000; - output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800); - value = 0xDC00 | value & 0x3FF; - } - output += stringFromCharCode(value); - return output; - }).join(''); - } - - /** - * Converts a basic code point into a digit/integer. - * @see `digitToBasic()` - * @private - * @param {Number} codePoint The basic numeric code point value. - * @returns {Number} The numeric value of a basic code point (for use in - * representing integers) in the range `0` to `base - 1`, or `base` if - * the code point does not represent a value. - */ - function basicToDigit(codePoint) { - if (codePoint - 48 < 10) { - return codePoint - 22; - } - if (codePoint - 65 < 26) { - return codePoint - 65; - } - if (codePoint - 97 < 26) { - return codePoint - 97; - } - return base; - } - - /** - * Converts a digit/integer into a basic code point. - * @see `basicToDigit()` - * @private - * @param {Number} digit The numeric value of a basic code point. - * @returns {Number} The basic code point whose value (when used for - * representing integers) is `digit`, which needs to be in the range - * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is - * used; else, the lowercase form is used. The behavior is undefined - * if `flag` is non-zero and `digit` has no uppercase form. - */ - function digitToBasic(digit, flag) { - // 0..25 map to ASCII a..z or A..Z - // 26..35 map to ASCII 0..9 - return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); - } - - /** - * Bias adaptation function as per section 3.4 of RFC 3492. - * https://tools.ietf.org/html/rfc3492#section-3.4 - * @private - */ - function adapt(delta, numPoints, firstTime) { - var k = 0; - delta = firstTime ? floor(delta / damp) : delta >> 1; - delta += floor(delta / numPoints); - for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { - delta = floor(delta / baseMinusTMin); - } - return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); - } - - /** - * Converts a Punycode string of ASCII-only symbols to a string of Unicode - * symbols. - * @memberOf punycode - * @param {String} input The Punycode string of ASCII-only symbols. - * @returns {String} The resulting string of Unicode symbols. - */ - function decode(input) { - // Don't use UCS-2 - var output = [], - inputLength = input.length, - out, - i = 0, - n = initialN, - bias = initialBias, - basic, - j, - index, - oldi, - w, - k, - digit, - t, - /** Cached calculation results */ - baseMinusT; - - // Handle the basic code points: let `basic` be the number of input code - // points before the last delimiter, or `0` if there is none, then copy - // the first basic code points to the output. - - basic = input.lastIndexOf(delimiter); - if (basic < 0) { - basic = 0; - } - - for (j = 0; j < basic; ++j) { - // if it's not a basic code point - if (input.charCodeAt(j) >= 0x80) { - error('not-basic'); - } - output.push(input.charCodeAt(j)); - } - - // Main decoding loop: start just after the last delimiter if any basic code - // points were copied; start at the beginning otherwise. - - for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) { - - // `index` is the index of the next character to be consumed. - // Decode a generalized variable-length integer into `delta`, - // which gets added to `i`. The overflow checking is easier - // if we increase `i` as we go, then subtract off its starting - // value at the end to obtain `delta`. - for (oldi = i, w = 1, k = base; /* no condition */; k += base) { - - if (index >= inputLength) { - error('invalid-input'); - } - - digit = basicToDigit(input.charCodeAt(index++)); - - if (digit >= base || digit > floor((maxInt - i) / w)) { - error('overflow'); - } - - i += digit * w; - t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); - - if (digit < t) { - break; - } - - baseMinusT = base - t; - if (w > floor(maxInt / baseMinusT)) { - error('overflow'); - } - - w *= baseMinusT; - - } - - out = output.length + 1; - bias = adapt(i - oldi, out, oldi == 0); - - // `i` was supposed to wrap around from `out` to `0`, - // incrementing `n` each time, so we'll fix that now: - if (floor(i / out) > maxInt - n) { - error('overflow'); - } - - n += floor(i / out); - i %= out; - - // Insert `n` at position `i` of the output - output.splice(i++, 0, n); - - } - - return ucs2encode(output); - } - - /** - * Converts a string of Unicode symbols (e.g. a domain name label) to a - * Punycode string of ASCII-only symbols. - * @memberOf punycode - * @param {String} input The string of Unicode symbols. - * @returns {String} The resulting Punycode string of ASCII-only symbols. - */ - function encode(input) { - var n, - delta, - handledCPCount, - basicLength, - bias, - j, - m, - q, - k, - t, - currentValue, - output = [], - /** `inputLength` will hold the number of code points in `input`. */ - inputLength, - /** Cached calculation results */ - handledCPCountPlusOne, - baseMinusT, - qMinusT; - - // Convert the input in UCS-2 to Unicode - input = ucs2decode(input); - - // Cache the length - inputLength = input.length; - - // Initialize the state - n = initialN; - delta = 0; - bias = initialBias; - - // Handle the basic code points - for (j = 0; j < inputLength; ++j) { - currentValue = input[j]; - if (currentValue < 0x80) { - output.push(stringFromCharCode(currentValue)); - } - } - - handledCPCount = basicLength = output.length; - - // `handledCPCount` is the number of code points that have been handled; - // `basicLength` is the number of basic code points. - - // Finish the basic string - if it is not empty - with a delimiter - if (basicLength) { - output.push(delimiter); - } - - // Main encoding loop: - while (handledCPCount < inputLength) { - - // All non-basic code points < n have been handled already. Find the next - // larger one: - for (m = maxInt, j = 0; j < inputLength; ++j) { - currentValue = input[j]; - if (currentValue >= n && currentValue < m) { - m = currentValue; - } - } - - // Increase `delta` enough to advance the decoder's state to , - // but guard against overflow - handledCPCountPlusOne = handledCPCount + 1; - if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { - error('overflow'); - } - - delta += (m - n) * handledCPCountPlusOne; - n = m; - - for (j = 0; j < inputLength; ++j) { - currentValue = input[j]; - - if (currentValue < n && ++delta > maxInt) { - error('overflow'); - } - - if (currentValue == n) { - // Represent delta as a generalized variable-length integer - for (q = delta, k = base; /* no condition */; k += base) { - t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); - if (q < t) { - break; - } - qMinusT = q - t; - baseMinusT = base - t; - output.push( - stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) - ); - q = floor(qMinusT / baseMinusT); - } - - output.push(stringFromCharCode(digitToBasic(q, 0))); - bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); - delta = 0; - ++handledCPCount; - } - } - - ++delta; - ++n; - - } - return output.join(''); - } - - /** - * Converts a Punycode string representing a domain name or an email address - * to Unicode. Only the Punycoded parts of the input will be converted, i.e. - * it doesn't matter if you call it on a string that has already been - * converted to Unicode. - * @memberOf punycode - * @param {String} input The Punycoded domain name or email address to - * convert to Unicode. - * @returns {String} The Unicode representation of the given Punycode - * string. - */ - function toUnicode(input) { - return mapDomain(input, function(string) { - return regexPunycode.test(string) - ? decode(string.slice(4).toLowerCase()) - : string; - }); - } - - /** - * Converts a Unicode string representing a domain name or an email address to - * Punycode. Only the non-ASCII parts of the domain name will be converted, - * i.e. it doesn't matter if you call it with a domain that's already in - * ASCII. - * @memberOf punycode - * @param {String} input The domain name or email address to convert, as a - * Unicode string. - * @returns {String} The Punycode representation of the given domain name or - * email address. - */ - function toASCII(input) { - return mapDomain(input, function(string) { - return regexNonASCII.test(string) - ? 'xn--' + encode(string) - : string; - }); - } - - /*--------------------------------------------------------------------------*/ - - /** Define the public API */ - punycode = { - /** - * A string representing the current Punycode.js version number. - * @memberOf punycode - * @type String - */ - 'version': '1.4.1', - /** - * An object of methods to convert from JavaScript's internal character - * representation (UCS-2) to Unicode code points, and back. - * @see - * @memberOf punycode - * @type Object - */ - 'ucs2': { - 'decode': ucs2decode, - 'encode': ucs2encode - }, - 'decode': decode, - 'encode': encode, - 'toASCII': toASCII, - 'toUnicode': toUnicode - }; - - /** Expose `punycode` */ - // Some AMD build optimizers, like r.js, check for specific condition patterns - // like the following: - if ( - true - ) { - !(__WEBPACK_AMD_DEFINE_RESULT__ = function() { - return punycode; - }.call(exports, __webpack_require__, exports, module), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else if (freeExports && freeModule) { - if (module.exports == freeExports) { - // in Node.js, io.js, or RingoJS v0.8.0+ - freeModule.exports = punycode; - } else { - // in Narwhal or RingoJS v0.7.0- - for (key in punycode) { - punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]); - } - } - } else { - // in Rhino or a web browser - root.punycode = punycode; - } - -}(this)); - -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(19)(module), __webpack_require__(6))) - -/***/ }), -/* 19 */ -/***/ (function(module, exports) { - -module.exports = function(module) { - if(!module.webpackPolyfill) { - module.deprecate = function() {}; - module.paths = []; - // module.parent = undefined by default - if(!module.children) module.children = []; - Object.defineProperty(module, "loaded", { - enumerable: true, - get: function() { - return module.l; - } - }); - Object.defineProperty(module, "id", { - enumerable: true, - get: function() { - return module.i; - } - }); - module.webpackPolyfill = 1; - } - return module; -}; - - -/***/ }), -/* 20 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var stringify = __webpack_require__(21); -var parse = __webpack_require__(50); -var formats = __webpack_require__(5); - -module.exports = { - formats: formats, - parse: parse, - stringify: stringify -}; - - -/***/ }), -/* 21 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var getSideChannel = __webpack_require__(22); -var utils = __webpack_require__(15); -var formats = __webpack_require__(5); -var has = Object.prototype.hasOwnProperty; - -var arrayPrefixGenerators = { - brackets: function brackets(prefix) { - return prefix + '[]'; - }, - comma: 'comma', - indices: function indices(prefix, key) { - return prefix + '[' + key + ']'; - }, - repeat: function repeat(prefix) { - return prefix; - } -}; - -var isArray = Array.isArray; -var push = Array.prototype.push; -var pushToArray = function (arr, valueOrArray) { - push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]); -}; - -var toISO = Date.prototype.toISOString; - -var defaultFormat = formats['default']; -var defaults = { - addQueryPrefix: false, - allowDots: false, - allowEmptyArrays: false, - arrayFormat: 'indices', - charset: 'utf-8', - charsetSentinel: false, - commaRoundTrip: false, - delimiter: '&', - encode: true, - encodeDotInKeys: false, - encoder: utils.encode, - encodeValuesOnly: false, - filter: void undefined, - format: defaultFormat, - formatter: formats.formatters[defaultFormat], - // deprecated - indices: false, - serializeDate: function serializeDate(date) { - return toISO.call(date); - }, - skipNulls: false, - strictNullHandling: false -}; - -var isNonNullishPrimitive = function isNonNullishPrimitive(v) { - return typeof v === 'string' - || typeof v === 'number' - || typeof v === 'boolean' - || typeof v === 'symbol' - || typeof v === 'bigint'; -}; - -var sentinel = {}; - -var stringify = function stringify( - object, - prefix, - generateArrayPrefix, - commaRoundTrip, - allowEmptyArrays, - strictNullHandling, - skipNulls, - encodeDotInKeys, - encoder, - filter, - sort, - allowDots, - serializeDate, - format, - formatter, - encodeValuesOnly, - charset, - sideChannel -) { - var obj = object; - - var tmpSc = sideChannel; - var step = 0; - var findFlag = false; - while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) { - // Where object last appeared in the ref tree - var pos = tmpSc.get(object); - step += 1; - if (typeof pos !== 'undefined') { - if (pos === step) { - throw new RangeError('Cyclic object value'); - } else { - findFlag = true; // Break while - } - } - if (typeof tmpSc.get(sentinel) === 'undefined') { - step = 0; - } - } - - if (typeof filter === 'function') { - obj = filter(prefix, obj); - } else if (obj instanceof Date) { - obj = serializeDate(obj); - } else if (generateArrayPrefix === 'comma' && isArray(obj)) { - obj = utils.maybeMap(obj, function (value) { - if (value instanceof Date) { - return serializeDate(value); - } - return value; - }); - } - - if (obj === null) { - if (strictNullHandling) { - return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key', format) : prefix; - } - - obj = ''; - } - - if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) { - if (encoder) { - var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key', format); - return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))]; - } - return [formatter(prefix) + '=' + formatter(String(obj))]; - } - - var values = []; - - if (typeof obj === 'undefined') { - return values; - } - - var objKeys; - if (generateArrayPrefix === 'comma' && isArray(obj)) { - // we need to join elements in - if (encodeValuesOnly && encoder) { - obj = utils.maybeMap(obj, encoder); - } - objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }]; - } else if (isArray(filter)) { - objKeys = filter; - } else { - var keys = Object.keys(obj); - objKeys = sort ? keys.sort(sort) : keys; - } - - var encodedPrefix = encodeDotInKeys ? String(prefix).replace(/\./g, '%2E') : String(prefix); - - var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? encodedPrefix + '[]' : encodedPrefix; - - if (allowEmptyArrays && isArray(obj) && obj.length === 0) { - return adjustedPrefix + '[]'; - } - - for (var j = 0; j < objKeys.length; ++j) { - var key = objKeys[j]; - var value = typeof key === 'object' && key && typeof key.value !== 'undefined' - ? key.value - : obj[key]; - - if (skipNulls && value === null) { - continue; - } - - var encodedKey = allowDots && encodeDotInKeys ? String(key).replace(/\./g, '%2E') : String(key); - var keyPrefix = isArray(obj) - ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, encodedKey) : adjustedPrefix - : adjustedPrefix + (allowDots ? '.' + encodedKey : '[' + encodedKey + ']'); - - sideChannel.set(object, step); - var valueSideChannel = getSideChannel(); - valueSideChannel.set(sentinel, sideChannel); - pushToArray(values, stringify( - value, - keyPrefix, - generateArrayPrefix, - commaRoundTrip, - allowEmptyArrays, - strictNullHandling, - skipNulls, - encodeDotInKeys, - generateArrayPrefix === 'comma' && encodeValuesOnly && isArray(obj) ? null : encoder, - filter, - sort, - allowDots, - serializeDate, - format, - formatter, - encodeValuesOnly, - charset, - valueSideChannel - )); - } - - return values; -}; - -var normalizeStringifyOptions = function normalizeStringifyOptions(opts) { - if (!opts) { - return defaults; - } - - if (typeof opts.allowEmptyArrays !== 'undefined' && typeof opts.allowEmptyArrays !== 'boolean') { - throw new TypeError('`allowEmptyArrays` option can only be `true` or `false`, when provided'); - } - - if (typeof opts.encodeDotInKeys !== 'undefined' && typeof opts.encodeDotInKeys !== 'boolean') { - throw new TypeError('`encodeDotInKeys` option can only be `true` or `false`, when provided'); - } - - if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') { - throw new TypeError('Encoder has to be a function.'); - } - - var charset = opts.charset || defaults.charset; - if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') { - throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined'); - } - - var format = formats['default']; - if (typeof opts.format !== 'undefined') { - if (!has.call(formats.formatters, opts.format)) { - throw new TypeError('Unknown format option provided.'); - } - format = opts.format; - } - var formatter = formats.formatters[format]; - - var filter = defaults.filter; - if (typeof opts.filter === 'function' || isArray(opts.filter)) { - filter = opts.filter; - } - - var arrayFormat; - if (opts.arrayFormat in arrayPrefixGenerators) { - arrayFormat = opts.arrayFormat; - } else if ('indices' in opts) { - arrayFormat = opts.indices ? 'indices' : 'repeat'; - } else { - arrayFormat = defaults.arrayFormat; - } - - if ('commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') { - throw new TypeError('`commaRoundTrip` must be a boolean, or absent'); - } - - var allowDots = typeof opts.allowDots === 'undefined' ? opts.encodeDotInKeys === true ? true : defaults.allowDots : !!opts.allowDots; - - return { - addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix, - allowDots: allowDots, - allowEmptyArrays: typeof opts.allowEmptyArrays === 'boolean' ? !!opts.allowEmptyArrays : defaults.allowEmptyArrays, - arrayFormat: arrayFormat, - charset: charset, - charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel, - commaRoundTrip: !!opts.commaRoundTrip, - delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter, - encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode, - encodeDotInKeys: typeof opts.encodeDotInKeys === 'boolean' ? opts.encodeDotInKeys : defaults.encodeDotInKeys, - encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder, - encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly, - filter: filter, - format: format, - formatter: formatter, - serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate, - skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls, - sort: typeof opts.sort === 'function' ? opts.sort : null, - strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling - }; -}; - -module.exports = function (object, opts) { - var obj = object; - var options = normalizeStringifyOptions(opts); - - var objKeys; - var filter; - - if (typeof options.filter === 'function') { - filter = options.filter; - obj = filter('', obj); - } else if (isArray(options.filter)) { - filter = options.filter; - objKeys = filter; - } - - var keys = []; - - if (typeof obj !== 'object' || obj === null) { - return ''; - } - - var generateArrayPrefix = arrayPrefixGenerators[options.arrayFormat]; - var commaRoundTrip = generateArrayPrefix === 'comma' && options.commaRoundTrip; - - if (!objKeys) { - objKeys = Object.keys(obj); - } - - if (options.sort) { - objKeys.sort(options.sort); - } - - var sideChannel = getSideChannel(); - for (var i = 0; i < objKeys.length; ++i) { - var key = objKeys[i]; - var value = obj[key]; - - if (options.skipNulls && value === null) { - continue; - } - pushToArray(keys, stringify( - value, - key, - generateArrayPrefix, - commaRoundTrip, - options.allowEmptyArrays, - options.strictNullHandling, - options.skipNulls, - options.encodeDotInKeys, - options.encode ? options.encoder : null, - options.filter, - options.sort, - options.allowDots, - options.serializeDate, - options.format, - options.formatter, - options.encodeValuesOnly, - options.charset, - sideChannel - )); - } - - var joined = keys.join(options.delimiter); - var prefix = options.addQueryPrefix === true ? '?' : ''; - - if (options.charsetSentinel) { - if (options.charset === 'iso-8859-1') { - // encodeURIComponent('✓'), the "numeric entity" representation of a checkmark - prefix += 'utf8=%26%2310003%3B&'; - } else { - // encodeURIComponent('✓') - prefix += 'utf8=%E2%9C%93&'; - } - } - - return joined.length > 0 ? prefix + joined : ''; -}; - - -/***/ }), -/* 22 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var $TypeError = __webpack_require__(0); -var inspect = __webpack_require__(1); -var getSideChannelList = __webpack_require__(24); -var getSideChannelMap = __webpack_require__(7); -var getSideChannelWeakMap = __webpack_require__(49); - -var makeChannel = getSideChannelWeakMap || getSideChannelMap || getSideChannelList; - -/** @type {import('.')} */ -module.exports = function getSideChannel() { - /** @typedef {ReturnType} Channel */ - - /** @type {Channel | undefined} */ var $channelData; - - /** @type {Channel} */ - var channel = { - assert: function (key) { - if (!channel.has(key)) { - throw new $TypeError('Side channel does not contain ' + inspect(key)); - } - }, - 'delete': function (key) { - return !!$channelData && $channelData['delete'](key); - }, - get: function (key) { - return $channelData && $channelData.get(key); - }, - has: function (key) { - return !!$channelData && $channelData.has(key); - }, - set: function (key, value) { - if (!$channelData) { - $channelData = makeChannel(); - } - - $channelData.set(key, value); - } - }; - // @ts-expect-error TODO: figure out why this is erroring - return channel; -}; - - -/***/ }), -/* 23 */ -/***/ (function(module, exports) { - -/* (ignored) */ - -/***/ }), -/* 24 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var inspect = __webpack_require__(1); - -var $TypeError = __webpack_require__(0); - -/* -* This function traverses the list returning the node corresponding to the given key. -* -* That node is also moved to the head of the list, so that if it's accessed again we don't need to traverse the whole list. -* By doing so, all the recently used nodes can be accessed relatively quickly. -*/ -/** @type {import('./list.d.ts').listGetNode} */ -// eslint-disable-next-line consistent-return -var listGetNode = function (list, key, isDelete) { - /** @type {typeof list | NonNullable<(typeof list)['next']>} */ - var prev = list; - /** @type {(typeof list)['next']} */ - var curr; - // eslint-disable-next-line eqeqeq - for (; (curr = prev.next) != null; prev = curr) { - if (curr.key === key) { - prev.next = curr.next; - if (!isDelete) { - // eslint-disable-next-line no-extra-parens - curr.next = /** @type {NonNullable} */ (list.next); - list.next = curr; // eslint-disable-line no-param-reassign - } - return curr; - } - } -}; - -/** @type {import('./list.d.ts').listGet} */ -var listGet = function (objects, key) { - if (!objects) { - return void undefined; - } - var node = listGetNode(objects, key); - return node && node.value; -}; -/** @type {import('./list.d.ts').listSet} */ -var listSet = function (objects, key, value) { - var node = listGetNode(objects, key); - if (node) { - node.value = value; - } else { - // Prepend the new node to the beginning of the list - objects.next = /** @type {import('./list.d.ts').ListNode} */ ({ // eslint-disable-line no-param-reassign, no-extra-parens - key: key, - next: objects.next, - value: value - }); - } -}; -/** @type {import('./list.d.ts').listHas} */ -var listHas = function (objects, key) { - if (!objects) { - return false; - } - return !!listGetNode(objects, key); -}; -/** @type {import('./list.d.ts').listDelete} */ -// eslint-disable-next-line consistent-return -var listDelete = function (objects, key) { - if (objects) { - return listGetNode(objects, key, true); - } -}; - -/** @type {import('.')} */ -module.exports = function getSideChannelList() { - /** @typedef {ReturnType} Channel */ - /** @typedef {Parameters[0]} K */ - /** @typedef {Parameters[1]} V */ - - /** @type {import('./list.d.ts').RootNode | undefined} */ var $o; - - /** @type {Channel} */ - var channel = { - assert: function (key) { - if (!channel.has(key)) { - throw new $TypeError('Side channel does not contain ' + inspect(key)); - } - }, - 'delete': function (key) { - var root = $o && $o.next; - var deletedNode = listDelete($o, key); - if (deletedNode && root && root === deletedNode) { - $o = void undefined; - } - return !!deletedNode; - }, - get: function (key) { - return listGet($o, key); - }, - has: function (key) { - return listHas($o, key); - }, - set: function (key, value) { - if (!$o) { - // Initialize the linked list as an empty node, so that we don't have to special-case handling of the first node: we can always refer to it as (previous node).next, instead of something like (list).head - $o = { - next: void undefined - }; - } - // eslint-disable-next-line no-extra-parens - listSet(/** @type {NonNullable} */ ($o), key, value); - } - }; - // @ts-expect-error TODO: figure out why this is erroring - return channel; -}; - - -/***/ }), -/* 25 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/** @type {import('.')} */ -module.exports = Error; - - -/***/ }), -/* 26 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/** @type {import('./eval')} */ -module.exports = EvalError; - - -/***/ }), -/* 27 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/** @type {import('./range')} */ -module.exports = RangeError; - - -/***/ }), -/* 28 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/** @type {import('./ref')} */ -module.exports = ReferenceError; - - -/***/ }), -/* 29 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/** @type {import('./syntax')} */ -module.exports = SyntaxError; - - -/***/ }), -/* 30 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/** @type {import('./uri')} */ -module.exports = URIError; - - -/***/ }), -/* 31 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/** @type {import('./abs')} */ -module.exports = Math.abs; - - -/***/ }), -/* 32 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/** @type {import('./floor')} */ -module.exports = Math.floor; - - -/***/ }), -/* 33 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/** @type {import('./max')} */ -module.exports = Math.max; - - -/***/ }), -/* 34 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/** @type {import('./min')} */ -module.exports = Math.min; - - -/***/ }), -/* 35 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/** @type {import('./pow')} */ -module.exports = Math.pow; - - -/***/ }), -/* 36 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/** @type {import('./round')} */ -module.exports = Math.round; - - -/***/ }), -/* 37 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var $isNaN = __webpack_require__(38); - -/** @type {import('./sign')} */ -module.exports = function sign(number) { - if ($isNaN(number) || number === 0) { - return number; - } - return number < 0 ? -1 : +1; -}; - - -/***/ }), -/* 38 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/** @type {import('./isNaN')} */ -module.exports = Number.isNaN || function isNaN(a) { - return a !== a; -}; - - -/***/ }), -/* 39 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/** @type {import('./gOPD')} */ -module.exports = Object.getOwnPropertyDescriptor; - - -/***/ }), -/* 40 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/** @type {import('.')} */ -var $defineProperty = Object.defineProperty || false; -if ($defineProperty) { - try { - $defineProperty({}, 'a', { value: 1 }); - } catch (e) { - // IE 8 has a broken defineProperty - $defineProperty = false; - } -} - -module.exports = $defineProperty; - - -/***/ }), -/* 41 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var origSymbol = typeof Symbol !== 'undefined' && Symbol; -var hasSymbolSham = __webpack_require__(42); - -/** @type {import('.')} */ -module.exports = function hasNativeSymbols() { - if (typeof origSymbol !== 'function') { return false; } - if (typeof Symbol !== 'function') { return false; } - if (typeof origSymbol('foo') !== 'symbol') { return false; } - if (typeof Symbol('bar') !== 'symbol') { return false; } - - return hasSymbolSham(); -}; - - -/***/ }), -/* 42 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/** @type {import('./shams')} */ -/* eslint complexity: [2, 18], max-statements: [2, 33] */ -module.exports = function hasSymbols() { - if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } - if (typeof Symbol.iterator === 'symbol') { return true; } - - /** @type {{ [k in symbol]?: unknown }} */ - var obj = {}; - var sym = Symbol('test'); - var symObj = Object(sym); - if (typeof sym === 'string') { return false; } - - if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } - if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } - - // temp disabled per https://github.com/ljharb/object.assign/issues/17 - // if (sym instanceof Symbol) { return false; } - // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 - // if (!(symObj instanceof Symbol)) { return false; } - - // if (typeof Symbol.prototype.toString !== 'function') { return false; } - // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } - - var symVal = 42; - obj[sym] = symVal; - for (var _ in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop - if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } - - if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } - - var syms = Object.getOwnPropertySymbols(obj); - if (syms.length !== 1 || syms[0] !== sym) { return false; } - - if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } - - if (typeof Object.getOwnPropertyDescriptor === 'function') { - // eslint-disable-next-line no-extra-parens - var descriptor = /** @type {PropertyDescriptor} */ (Object.getOwnPropertyDescriptor(obj, sym)); - if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } - } - - return true; -}; - - -/***/ }), -/* 43 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var reflectGetProto = __webpack_require__(10); -var originalGetProto = __webpack_require__(11); - -var getDunderProto = __webpack_require__(44); - -/** @type {import('.')} */ -module.exports = reflectGetProto - ? function getProto(O) { - // @ts-expect-error TS can't narrow inside a closure, for some reason - return reflectGetProto(O); - } - : originalGetProto - ? function getProto(O) { - if (!O || (typeof O !== 'object' && typeof O !== 'function')) { - throw new TypeError('getProto: not an object'); - } - // @ts-expect-error TS can't narrow inside a closure, for some reason - return originalGetProto(O); - } - : getDunderProto - ? function getProto(O) { - // @ts-expect-error TS can't narrow inside a closure, for some reason - return getDunderProto(O); - } - : null; - - -/***/ }), -/* 44 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var callBind = __webpack_require__(12); -var gOPD = __webpack_require__(9); - -var hasProtoAccessor; -try { - // eslint-disable-next-line no-extra-parens, no-proto - hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */ ([]).__proto__ === Array.prototype; -} catch (e) { - if (!e || typeof e !== 'object' || !('code' in e) || e.code !== 'ERR_PROTO_ACCESS') { - throw e; - } -} - -// eslint-disable-next-line no-extra-parens -var desc = !!hasProtoAccessor && gOPD && gOPD(Object.prototype, /** @type {keyof typeof Object.prototype} */ ('__proto__')); - -var $Object = Object; -var $getPrototypeOf = $Object.getPrototypeOf; - -/** @type {import('./get')} */ -module.exports = desc && typeof desc.get === 'function' - ? callBind([desc.get]) - : typeof $getPrototypeOf === 'function' - ? /** @type {import('./get')} */ function getDunder(value) { - // eslint-disable-next-line eqeqeq - return $getPrototypeOf(value == null ? value : $Object(value)); - } - : false; - - -/***/ }), -/* 45 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/* eslint no-invalid-this: 1 */ - -var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; -var toStr = Object.prototype.toString; -var max = Math.max; -var funcType = '[object Function]'; - -var concatty = function concatty(a, b) { - var arr = []; - - for (var i = 0; i < a.length; i += 1) { - arr[i] = a[i]; - } - for (var j = 0; j < b.length; j += 1) { - arr[j + a.length] = b[j]; - } - - return arr; -}; - -var slicy = function slicy(arrLike, offset) { - var arr = []; - for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { - arr[j] = arrLike[i]; - } - return arr; -}; - -var joiny = function (arr, joiner) { - var str = ''; - for (var i = 0; i < arr.length; i += 1) { - str += arr[i]; - if (i + 1 < arr.length) { - str += joiner; - } - } - return str; -}; - -module.exports = function bind(that) { - var target = this; - if (typeof target !== 'function' || toStr.apply(target) !== funcType) { - throw new TypeError(ERROR_MESSAGE + target); - } - var args = slicy(arguments, 1); - - var bound; - var binder = function () { - if (this instanceof bound) { - var result = target.apply( - this, - concatty(args, arguments) - ); - if (Object(result) === result) { - return result; - } - return this; - } - return target.apply( - that, - concatty(args, arguments) - ); - - }; - - var boundLength = max(0, target.length - args.length); - var boundArgs = []; - for (var i = 0; i < boundLength; i++) { - boundArgs[i] = '$' + i; - } - - bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); - - if (target.prototype) { - var Empty = function Empty() {}; - Empty.prototype = target.prototype; - bound.prototype = new Empty(); - Empty.prototype = null; - } - - return bound; -}; - - -/***/ }), -/* 46 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var bind = __webpack_require__(2); - -var $apply = __webpack_require__(13); -var $call = __webpack_require__(4); -var $reflectApply = __webpack_require__(47); - -/** @type {import('./actualApply')} */ -module.exports = $reflectApply || bind.call($call, $apply); - - -/***/ }), -/* 47 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/** @type {import('./reflectApply')} */ -module.exports = typeof Reflect !== 'undefined' && Reflect && Reflect.apply; - - -/***/ }), -/* 48 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var call = Function.prototype.call; -var $hasOwn = Object.prototype.hasOwnProperty; -var bind = __webpack_require__(2); - -/** @type {import('.')} */ -module.exports = bind.call(call, $hasOwn); - - -/***/ }), -/* 49 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var GetIntrinsic = __webpack_require__(3); -var callBound = __webpack_require__(14); -var inspect = __webpack_require__(1); -var getSideChannelMap = __webpack_require__(7); - -var $TypeError = __webpack_require__(0); -var $WeakMap = GetIntrinsic('%WeakMap%', true); - -/** @type {(thisArg: WeakMap, key: K) => V} */ -var $weakMapGet = callBound('WeakMap.prototype.get', true); -/** @type {(thisArg: WeakMap, key: K, value: V) => void} */ -var $weakMapSet = callBound('WeakMap.prototype.set', true); -/** @type {(thisArg: WeakMap, key: K) => boolean} */ -var $weakMapHas = callBound('WeakMap.prototype.has', true); -/** @type {(thisArg: WeakMap, key: K) => boolean} */ -var $weakMapDelete = callBound('WeakMap.prototype.delete', true); - -/** @type {import('.')} */ -module.exports = $WeakMap - ? /** @type {Exclude} */ function getSideChannelWeakMap() { - /** @typedef {ReturnType} Channel */ - /** @typedef {Parameters[0]} K */ - /** @typedef {Parameters[1]} V */ - - /** @type {WeakMap | undefined} */ var $wm; - /** @type {Channel | undefined} */ var $m; - - /** @type {Channel} */ - var channel = { - assert: function (key) { - if (!channel.has(key)) { - throw new $TypeError('Side channel does not contain ' + inspect(key)); - } - }, - 'delete': function (key) { - if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) { - if ($wm) { - return $weakMapDelete($wm, key); - } - } else if (getSideChannelMap) { - if ($m) { - return $m['delete'](key); - } - } - return false; - }, - get: function (key) { - if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) { - if ($wm) { - return $weakMapGet($wm, key); - } - } - return $m && $m.get(key); - }, - has: function (key) { - if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) { - if ($wm) { - return $weakMapHas($wm, key); - } - } - return !!$m && $m.has(key); - }, - set: function (key, value) { - if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) { - if (!$wm) { - $wm = new $WeakMap(); - } - $weakMapSet($wm, key, value); - } else if (getSideChannelMap) { - if (!$m) { - $m = getSideChannelMap(); - } - // eslint-disable-next-line no-extra-parens - /** @type {NonNullable} */ ($m).set(key, value); - } - } - }; - - // @ts-expect-error TODO: figure out why this is erroring - return channel; - } - : getSideChannelMap; - - -/***/ }), -/* 50 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var utils = __webpack_require__(15); - -var has = Object.prototype.hasOwnProperty; -var isArray = Array.isArray; - -var defaults = { - allowDots: false, - allowEmptyArrays: false, - allowPrototypes: false, - allowSparse: false, - arrayLimit: 20, - charset: 'utf-8', - charsetSentinel: false, - comma: false, - decodeDotInKeys: false, - decoder: utils.decode, - delimiter: '&', - depth: 5, - duplicates: 'combine', - ignoreQueryPrefix: false, - interpretNumericEntities: false, - parameterLimit: 1000, - parseArrays: true, - plainObjects: false, - strictDepth: false, - strictNullHandling: false, - throwOnLimitExceeded: false -}; - -var interpretNumericEntities = function (str) { - return str.replace(/&#(\d+);/g, function ($0, numberStr) { - return String.fromCharCode(parseInt(numberStr, 10)); - }); -}; - -var parseArrayValue = function (val, options, currentArrayLength) { - if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) { - return val.split(','); - } - - if (options.throwOnLimitExceeded && currentArrayLength >= options.arrayLimit) { - throw new RangeError('Array limit exceeded. Only ' + options.arrayLimit + ' element' + (options.arrayLimit === 1 ? '' : 's') + ' allowed in an array.'); - } - - return val; -}; - -// This is what browsers will submit when the ✓ character occurs in an -// application/x-www-form-urlencoded body and the encoding of the page containing -// the form is iso-8859-1, or when the submitted form has an accept-charset -// attribute of iso-8859-1. Presumably also with other charsets that do not contain -// the ✓ character, such as us-ascii. -var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('✓') - -// These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded. -var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓') - -var parseValues = function parseQueryStringValues(str, options) { - var obj = { __proto__: null }; - - var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str; - cleanStr = cleanStr.replace(/%5B/gi, '[').replace(/%5D/gi, ']'); - - var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit; - var parts = cleanStr.split( - options.delimiter, - options.throwOnLimitExceeded ? limit + 1 : limit - ); - - if (options.throwOnLimitExceeded && parts.length > limit) { - throw new RangeError('Parameter limit exceeded. Only ' + limit + ' parameter' + (limit === 1 ? '' : 's') + ' allowed.'); - } - - var skipIndex = -1; // Keep track of where the utf8 sentinel was found - var i; - - var charset = options.charset; - if (options.charsetSentinel) { - for (i = 0; i < parts.length; ++i) { - if (parts[i].indexOf('utf8=') === 0) { - if (parts[i] === charsetSentinel) { - charset = 'utf-8'; - } else if (parts[i] === isoSentinel) { - charset = 'iso-8859-1'; - } - skipIndex = i; - i = parts.length; // The eslint settings do not allow break; - } - } - } - - for (i = 0; i < parts.length; ++i) { - if (i === skipIndex) { - continue; - } - var part = parts[i]; - - var bracketEqualsPos = part.indexOf(']='); - var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1; - - var key; - var val; - if (pos === -1) { - key = options.decoder(part, defaults.decoder, charset, 'key'); - val = options.strictNullHandling ? null : ''; - } else { - key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key'); - - val = utils.maybeMap( - parseArrayValue( - part.slice(pos + 1), - options, - isArray(obj[key]) ? obj[key].length : 0 - ), - function (encodedVal) { - return options.decoder(encodedVal, defaults.decoder, charset, 'value'); - } - ); - } - - if (val && options.interpretNumericEntities && charset === 'iso-8859-1') { - val = interpretNumericEntities(String(val)); - } - - if (part.indexOf('[]=') > -1) { - val = isArray(val) ? [val] : val; - } - - var existing = has.call(obj, key); - if (existing && options.duplicates === 'combine') { - obj[key] = utils.combine(obj[key], val); - } else if (!existing || options.duplicates === 'last') { - obj[key] = val; - } - } - - return obj; -}; - -var parseObject = function (chain, val, options, valuesParsed) { - var currentArrayLength = 0; - if (chain.length > 0 && chain[chain.length - 1] === '[]') { - var parentKey = chain.slice(0, -1).join(''); - currentArrayLength = Array.isArray(val) && val[parentKey] ? val[parentKey].length : 0; - } - - var leaf = valuesParsed ? val : parseArrayValue(val, options, currentArrayLength); - - for (var i = chain.length - 1; i >= 0; --i) { - var obj; - var root = chain[i]; - - if (root === '[]' && options.parseArrays) { - obj = options.allowEmptyArrays && (leaf === '' || (options.strictNullHandling && leaf === null)) - ? [] - : utils.combine([], leaf); - } else { - obj = options.plainObjects ? { __proto__: null } : {}; - var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root; - var decodedRoot = options.decodeDotInKeys ? cleanRoot.replace(/%2E/g, '.') : cleanRoot; - var index = parseInt(decodedRoot, 10); - if (!options.parseArrays && decodedRoot === '') { - obj = { 0: leaf }; - } else if ( - !isNaN(index) - && root !== decodedRoot - && String(index) === decodedRoot - && index >= 0 - && (options.parseArrays && index <= options.arrayLimit) - ) { - obj = []; - obj[index] = leaf; - } else if (decodedRoot !== '__proto__') { - obj[decodedRoot] = leaf; - } - } - - leaf = obj; - } - - return leaf; -}; - -var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) { - if (!givenKey) { - return; - } - - // Transform dot notation to bracket notation - var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey; - - // The regex chunks - - var brackets = /(\[[^[\]]*])/; - var child = /(\[[^[\]]*])/g; - - // Get the parent - - var segment = options.depth > 0 && brackets.exec(key); - var parent = segment ? key.slice(0, segment.index) : key; - - // Stash the parent if it exists - - var keys = []; - if (parent) { - // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties - if (!options.plainObjects && has.call(Object.prototype, parent)) { - if (!options.allowPrototypes) { - return; - } - } - - keys.push(parent); - } - - // Loop through children appending to the array until we hit depth - - var i = 0; - while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) { - i += 1; - if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) { - if (!options.allowPrototypes) { - return; - } - } - keys.push(segment[1]); - } - - // If there's a remainder, check strictDepth option for throw, else just add whatever is left - - if (segment) { - if (options.strictDepth === true) { - throw new RangeError('Input depth exceeded depth option of ' + options.depth + ' and strictDepth is true'); - } - keys.push('[' + key.slice(segment.index) + ']'); - } - - return parseObject(keys, val, options, valuesParsed); -}; - -var normalizeParseOptions = function normalizeParseOptions(opts) { - if (!opts) { - return defaults; - } - - if (typeof opts.allowEmptyArrays !== 'undefined' && typeof opts.allowEmptyArrays !== 'boolean') { - throw new TypeError('`allowEmptyArrays` option can only be `true` or `false`, when provided'); - } - - if (typeof opts.decodeDotInKeys !== 'undefined' && typeof opts.decodeDotInKeys !== 'boolean') { - throw new TypeError('`decodeDotInKeys` option can only be `true` or `false`, when provided'); - } - - if (opts.decoder !== null && typeof opts.decoder !== 'undefined' && typeof opts.decoder !== 'function') { - throw new TypeError('Decoder has to be a function.'); - } - - if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') { - throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined'); - } - - if (typeof opts.throwOnLimitExceeded !== 'undefined' && typeof opts.throwOnLimitExceeded !== 'boolean') { - throw new TypeError('`throwOnLimitExceeded` option must be a boolean'); - } - - var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset; - - var duplicates = typeof opts.duplicates === 'undefined' ? defaults.duplicates : opts.duplicates; - - if (duplicates !== 'combine' && duplicates !== 'first' && duplicates !== 'last') { - throw new TypeError('The duplicates option must be either combine, first, or last'); - } - - var allowDots = typeof opts.allowDots === 'undefined' ? opts.decodeDotInKeys === true ? true : defaults.allowDots : !!opts.allowDots; - - return { - allowDots: allowDots, - allowEmptyArrays: typeof opts.allowEmptyArrays === 'boolean' ? !!opts.allowEmptyArrays : defaults.allowEmptyArrays, - allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes, - allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse, - arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit, - charset: charset, - charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel, - comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma, - decodeDotInKeys: typeof opts.decodeDotInKeys === 'boolean' ? opts.decodeDotInKeys : defaults.decodeDotInKeys, - decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder, - delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter, - // eslint-disable-next-line no-implicit-coercion, no-extra-parens - depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth, - duplicates: duplicates, - ignoreQueryPrefix: opts.ignoreQueryPrefix === true, - interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities, - parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit, - parseArrays: opts.parseArrays !== false, - plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects, - strictDepth: typeof opts.strictDepth === 'boolean' ? !!opts.strictDepth : defaults.strictDepth, - strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling, - throwOnLimitExceeded: typeof opts.throwOnLimitExceeded === 'boolean' ? opts.throwOnLimitExceeded : false - }; -}; - -module.exports = function (str, opts) { - var options = normalizeParseOptions(opts); - - if (str === '' || str === null || typeof str === 'undefined') { - return options.plainObjects ? { __proto__: null } : {}; - } - - var tempObj = typeof str === 'string' ? parseValues(str, options) : str; - var obj = options.plainObjects ? { __proto__: null } : {}; - - // Iterate over the keys and setup the new object - - var keys = Object.keys(tempObj); - for (var i = 0; i < keys.length; ++i) { - var key = keys[i]; - var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string'); - obj = utils.merge(obj, newObj, options); - } - - if (options.allowSparse === true) { - return obj; - } - - return utils.compact(obj); -}; - - -/***/ }) -/******/ ]); -}); \ No newline at end of file diff --git a/temp/manifests.json b/temp/manifests.json deleted file mode 100644 index 3fad4f5..0000000 --- a/temp/manifests.json +++ /dev/null @@ -1,742 +0,0 @@ -[ - { - "id": "f97266fb-ccb7-430e-9384-4124d05295d3", - "alias": "Decorators", - "componentType": "Library", - "version": "1.4.1", - "manifestVersion": 2, - "loaderConfig": { - "entryModuleId": "decorators", - "internalModuleBaseUrls": [ - "https://localhost:4321/node_modules/@microsoft/decorators/" - ], - "scriptResources": { - "decorators": { - "type": "path", - "path": "dist/decorators.js" - } - } - }, - "isInternal": true - }, - { - "id": "73e1dc6c-8441-42cc-ad47-4bd3659f8a3a", - "alias": "SPLodashSubset", - "componentType": "Library", - "version": "1.4.1", - "manifestVersion": 2, - "loaderConfig": { - "entryModuleId": "sp-lodash-subset", - "internalModuleBaseUrls": [ - "https://localhost:4321/node_modules/@microsoft/sp-lodash-subset/" - ], - "scriptResources": { - "sp-lodash-subset": { - "type": "path", - "path": "dist/sp-lodash-subset.js" - } - } - }, - "isInternal": true - }, - { - "id": "7263c7d0-1d6a-45ec-8d85-d4d1d234171b", - "alias": "SPCoreLibrary", - "componentType": "Library", - "version": "1.4.1", - "manifestVersion": 2, - "loaderConfig": { - "entryModuleId": "sp-core-library", - "internalModuleBaseUrls": [ - "https://localhost:4321/node_modules/@microsoft/sp-core-library/" - ], - "scriptResources": { - "sp-core-library": { - "type": "localizedPath", - "defaultPath": "dist/sp-core-library_en-us.js" - }, - "@microsoft/sp-lodash-subset": { - "type": "component", - "version": "1.4.1", - "id": "73e1dc6c-8441-42cc-ad47-4bd3659f8a3a" - } - } - }, - "isInternal": true - }, - { - "id": "02a01e42-69ab-403d-8a16-acd128661f8e", - "alias": "OfficeUIFabricReact", - "componentType": "Library", - "version": "1.4.1", - "manifestVersion": 2, - "loaderConfig": { - "entryModuleId": "office-ui-fabric-react-bundle", - "internalModuleBaseUrls": [ - "https://localhost:4321/node_modules/@microsoft/office-ui-fabric-react-bundle/" - ], - "scriptResources": { - "office-ui-fabric-react-bundle": { - "type": "path", - "path": "dist/office-ui-fabric-react-bundle.js" - }, - "react": { - "type": "component", - "version": "15.6.2", - "id": "0d910c1c-13b9-4e1c-9aa4-b008c5e42d7d", - "failoverPath": "node_modules/react/dist/react.js" - }, - "react-dom": { - "type": "component", - "version": "15.6.2", - "id": "aa0a46ec-1505-43cd-a44a-93f3a5aa460a", - "failoverPath": "node_modules/react-dom/dist/react-dom.js" - } - } - }, - "isInternal": true - }, - { - "id": "1e384972-6346-49b4-93c7-b2e6763938e6", - "alias": "sp-polyfills", - "componentType": "Library", - "version": "1.4.1", - "manifestVersion": 2, - "loaderConfig": { - "entryModuleId": "sp-polyfills", - "internalModuleBaseUrls": [ - "/" - ], - "scriptResources": { - "sp-polyfills": { - "type": "path", - "path": "dist/sp-polyfills.js" - } - } - } - }, - { - "id": "1c6c9123-7aac-41f3-a376-3caea41ed83f", - "alias": "SPLoader", - "componentType": "Library", - "version": "1.4.1", - "manifestVersion": 2, - "loaderConfig": { - "entryModuleId": "sp-loader", - "internalModuleBaseUrls": [ - "https://localhost:4321/node_modules/@microsoft/sp-loader/" - ], - "scriptResources": { - "sp-loader": { - "type": "localizedPath", - "defaultPath": "dist/sp-loader_en-us.js" - }, - "@microsoft/sp-core-library": { - "type": "component", - "version": "1.4.1", - "id": "7263c7d0-1d6a-45ec-8d85-d4d1d234171b" - }, - "@ms/sp-telemetry": { - "type": "component", - "version": "0.2.2", - "id": "8217e442-8ed3-41fd-957d-b112e841286a" - }, - "@microsoft/sp-lodash-subset": { - "type": "component", - "version": "1.4.1", - "id": "73e1dc6c-8441-42cc-ad47-4bd3659f8a3a" - } - } - }, - "isInternal": true - }, - { - "id": "c07208f0-ea3b-4c1a-9965-ac1b825211a6", - "alias": "SPHttp", - "componentType": "Library", - "version": "1.4.1", - "manifestVersion": 2, - "loaderConfig": { - "entryModuleId": "sp-http", - "internalModuleBaseUrls": [ - "https://localhost:4321/node_modules/@microsoft/sp-http/" - ], - "scriptResources": { - "sp-http": { - "type": "localizedPath", - "defaultPath": "dist/sp-http_en-us.js" - }, - "@microsoft/sp-core-library": { - "type": "component", - "version": "1.4.1", - "id": "7263c7d0-1d6a-45ec-8d85-d4d1d234171b" - }, - "@microsoft/decorators": { - "type": "component", - "version": "1.4.1", - "id": "f97266fb-ccb7-430e-9384-4124d05295d3" - }, - "@ms/sp-telemetry": { - "type": "component", - "version": "0.2.2", - "id": "8217e442-8ed3-41fd-957d-b112e841286a" - }, - "@microsoft/sp-lodash-subset": { - "type": "component", - "version": "1.4.1", - "id": "73e1dc6c-8441-42cc-ad47-4bd3659f8a3a" - } - } - }, - "isInternal": true - }, - { - "id": "1c4541f7-5c31-41aa-9fa8-fbc9dc14c0a8", - "alias": "SPPageContext", - "componentType": "Library", - "version": "1.4.1", - "manifestVersion": 2, - "loaderConfig": { - "entryModuleId": "sp-page-context", - "internalModuleBaseUrls": [ - "https://localhost:4321/node_modules/@microsoft/sp-page-context/" - ], - "scriptResources": { - "sp-page-context": { - "type": "path", - "path": "dist/sp-page-context.js" - }, - "@microsoft/sp-core-library": { - "type": "component", - "version": "1.4.1", - "id": "7263c7d0-1d6a-45ec-8d85-d4d1d234171b" - }, - "@ms/sp-telemetry": { - "type": "component", - "version": "0.2.2", - "id": "8217e442-8ed3-41fd-957d-b112e841286a" - }, - "@microsoft/sp-http": { - "type": "component", - "version": "1.4.1", - "id": "c07208f0-ea3b-4c1a-9965-ac1b825211a6" - } - } - }, - "isInternal": true - }, - { - "id": "467dc675-7cc5-4709-8aac-78e3b71bd2f6", - "alias": "SPComponentBase", - "componentType": "Library", - "version": "1.4.1", - "manifestVersion": 2, - "loaderConfig": { - "entryModuleId": "sp-component-base", - "internalModuleBaseUrls": [ - "https://localhost:4321/node_modules/@microsoft/sp-component-base/" - ], - "scriptResources": { - "sp-component-base": { - "type": "path", - "path": "dist/sp-component-base.js" - }, - "@microsoft/decorators": { - "type": "component", - "version": "1.4.1", - "id": "f97266fb-ccb7-430e-9384-4124d05295d3" - }, - "@microsoft/sp-core-library": { - "type": "component", - "version": "1.4.1", - "id": "7263c7d0-1d6a-45ec-8d85-d4d1d234171b" - }, - "@ms/sp-telemetry": { - "type": "component", - "version": "0.2.2", - "id": "8217e442-8ed3-41fd-957d-b112e841286a" - }, - "@microsoft/sp-page-context": { - "type": "component", - "version": "1.4.1", - "id": "1c4541f7-5c31-41aa-9fa8-fbc9dc14c0a8" - } - } - }, - "isInternal": true - }, - { - "id": "0773bd53-a69e-4293-87e6-ba80ea4d614b", - "alias": "SPExtensionBase", - "componentType": "Library", - "version": "1.4.1", - "manifestVersion": 2, - "loaderConfig": { - "entryModuleId": "sp-extension-base", - "internalModuleBaseUrls": [ - "https://localhost:4321/node_modules/@microsoft/sp-extension-base/" - ], - "scriptResources": { - "sp-extension-base": { - "type": "localizedPath", - "defaultPath": "dist/sp-extension-base_en-us.js" - }, - "@ms/sp-telemetry": { - "type": "component", - "version": "0.2.2", - "id": "8217e442-8ed3-41fd-957d-b112e841286a" - }, - "@microsoft/sp-component-base": { - "type": "component", - "version": "1.4.1", - "id": "467dc675-7cc5-4709-8aac-78e3b71bd2f6" - }, - "@microsoft/decorators": { - "type": "component", - "version": "1.4.1", - "id": "f97266fb-ccb7-430e-9384-4124d05295d3" - }, - "@microsoft/sp-http": { - "type": "component", - "version": "1.4.1", - "id": "c07208f0-ea3b-4c1a-9965-ac1b825211a6" - }, - "@microsoft/sp-core-library": { - "type": "component", - "version": "1.4.1", - "id": "7263c7d0-1d6a-45ec-8d85-d4d1d234171b" - }, - "@microsoft/sp-loader": { - "type": "component", - "version": "1.4.1", - "id": "1c6c9123-7aac-41f3-a376-3caea41ed83f" - } - } - }, - "isInternal": true - }, - { - "id": "4df9bb86-ab0a-4aab-ab5f-48bf167048fb", - "alias": "SPApplicationBase", - "componentType": "Library", - "version": "1.4.1", - "manifestVersion": 2, - "loaderConfig": { - "entryModuleId": "sp-application-base", - "internalModuleBaseUrls": [ - "https://localhost:4321/node_modules/@microsoft/sp-application-base/" - ], - "scriptResources": { - "sp-application-base": { - "type": "localizedPath", - "defaultPath": "dist/sp-application-base_en-us.js" - }, - "@microsoft/sp-core-library": { - "type": "component", - "version": "1.4.1", - "id": "7263c7d0-1d6a-45ec-8d85-d4d1d234171b" - }, - "@ms/sp-telemetry": { - "type": "component", - "version": "0.2.2", - "id": "8217e442-8ed3-41fd-957d-b112e841286a" - }, - "@microsoft/sp-http": { - "type": "component", - "version": "1.4.1", - "id": "c07208f0-ea3b-4c1a-9965-ac1b825211a6" - }, - "@microsoft/sp-loader": { - "type": "component", - "version": "1.4.1", - "id": "1c6c9123-7aac-41f3-a376-3caea41ed83f" - }, - "@microsoft/sp-page-context": { - "type": "component", - "version": "1.4.1", - "id": "1c4541f7-5c31-41aa-9fa8-fbc9dc14c0a8" - }, - "@microsoft/sp-extension-base": { - "type": "component", - "version": "1.4.1", - "id": "0773bd53-a69e-4293-87e6-ba80ea4d614b" - }, - "@microsoft/sp-component-base": { - "type": "component", - "version": "1.4.1", - "id": "467dc675-7cc5-4709-8aac-78e3b71bd2f6" - }, - "@microsoft/decorators": { - "type": "component", - "version": "1.4.1", - "id": "f97266fb-ccb7-430e-9384-4124d05295d3" - }, - "@microsoft/sp-lodash-subset": { - "type": "component", - "version": "1.4.1", - "id": "73e1dc6c-8441-42cc-ad47-4bd3659f8a3a" - } - } - }, - "isInternal": true - }, - { - "id": "974a7777-0990-4136-8fa6-95d80114c2e0", - "alias": "SPWebPartBase", - "componentType": "Library", - "version": "1.4.1", - "manifestVersion": 2, - "loaderConfig": { - "entryModuleId": "sp-webpart-base", - "internalModuleBaseUrls": [ - "https://localhost:4321/node_modules/@microsoft/sp-webpart-base/" - ], - "scriptResources": { - "sp-webpart-base": { - "type": "localizedPath", - "defaultPath": "dist/sp-webpart-base_en-us.js" - }, - "@microsoft/sp-core-library": { - "type": "component", - "version": "1.4.1", - "id": "7263c7d0-1d6a-45ec-8d85-d4d1d234171b" - }, - "@microsoft/decorators": { - "type": "component", - "version": "1.4.1", - "id": "f97266fb-ccb7-430e-9384-4124d05295d3" - }, - "react": { - "type": "component", - "version": "15.6.2", - "id": "0d910c1c-13b9-4e1c-9aa4-b008c5e42d7d", - "failoverPath": "node_modules/react/dist/react.js" - }, - "@ms/sp-telemetry": { - "type": "component", - "version": "0.2.2", - "id": "8217e442-8ed3-41fd-957d-b112e841286a" - }, - "@microsoft/sp-lodash-subset": { - "type": "component", - "version": "1.4.1", - "id": "73e1dc6c-8441-42cc-ad47-4bd3659f8a3a" - }, - "office-ui-fabric-react": { - "type": "component", - "version": "1.4.1", - "id": "02a01e42-69ab-403d-8a16-acd128661f8e" - }, - "react-dom": { - "type": "component", - "version": "15.6.2", - "id": "aa0a46ec-1505-43cd-a44a-93f3a5aa460a", - "failoverPath": "node_modules/react-dom/dist/react-dom.js" - }, - "@microsoft/sp-http": { - "type": "component", - "version": "1.4.1", - "id": "c07208f0-ea3b-4c1a-9965-ac1b825211a6" - }, - "@microsoft/sp-component-base": { - "type": "component", - "version": "1.4.1", - "id": "467dc675-7cc5-4709-8aac-78e3b71bd2f6" - }, - "@microsoft/sp-loader": { - "type": "component", - "version": "1.4.1", - "id": "1c6c9123-7aac-41f3-a376-3caea41ed83f" - }, - "@microsoft/sp-page-context": { - "type": "component", - "version": "1.4.1", - "id": "1c4541f7-5c31-41aa-9fa8-fbc9dc14c0a8" - }, - "@microsoft/office-ui-fabric-react-bundle": { - "type": "component", - "version": "1.4.1", - "id": "02a01e42-69ab-403d-8a16-acd128661f8e" - } - } - }, - "isInternal": true - }, - { - "id": "c0c518b8-701b-4f6f-956d-5782772bb731", - "alias": "SPDialog", - "componentType": "Library", - "version": "1.4.1", - "manifestVersion": 2, - "loaderConfig": { - "entryModuleId": "sp-dialog", - "internalModuleBaseUrls": [ - "https://localhost:4321/node_modules/@microsoft/sp-dialog/" - ], - "scriptResources": { - "sp-dialog": { - "type": "path", - "path": "dist/sp-dialog.js" - }, - "react": { - "type": "component", - "version": "15.6.2", - "id": "0d910c1c-13b9-4e1c-9aa4-b008c5e42d7d", - "failoverPath": "node_modules/react/dist/react.js" - }, - "react-dom": { - "type": "component", - "version": "15.6.2", - "id": "aa0a46ec-1505-43cd-a44a-93f3a5aa460a", - "failoverPath": "node_modules/react-dom/dist/react-dom.js" - }, - "office-ui-fabric-react": { - "type": "component", - "version": "1.4.1", - "id": "02a01e42-69ab-403d-8a16-acd128661f8e" - }, - "@microsoft/decorators": { - "type": "component", - "version": "1.4.1", - "id": "f97266fb-ccb7-430e-9384-4124d05295d3" - }, - "@ms/sp-telemetry": { - "type": "component", - "version": "0.2.2", - "id": "8217e442-8ed3-41fd-957d-b112e841286a" - }, - "@microsoft/sp-core-library": { - "type": "component", - "version": "1.4.1", - "id": "7263c7d0-1d6a-45ec-8d85-d4d1d234171b" - }, - "@microsoft/sp-application-base": { - "type": "component", - "version": "1.4.1", - "id": "4df9bb86-ab0a-4aab-ab5f-48bf167048fb" - }, - "@microsoft/office-ui-fabric-react-bundle": { - "type": "component", - "version": "1.4.1", - "id": "02a01e42-69ab-403d-8a16-acd128661f8e" - }, - "@microsoft/sp-webpart-base": { - "type": "component", - "version": "1.4.1", - "id": "974a7777-0990-4136-8fa6-95d80114c2e0" - } - } - }, - "isInternal": true - }, - { - "id": "29bd516f-4ece-40b7-8028-597cbc65a223", - "alias": "SpOfficeUIFabricCore", - "componentType": "Library", - "version": "1.4.1", - "manifestVersion": 2, - "loaderConfig": { - "entryModuleId": "office-ui-fabric-core", - "internalModuleBaseUrls": [ - "https://localhost:4321/node_modules/@microsoft/sp-office-ui-fabric-core/" - ], - "scriptResources": { - "office-ui-fabric-core": { - "type": "path", - "path": "dist/office-ui-fabric-core.js" - } - } - }, - "isInternal": true - }, - { - "id": "4d5eb168-6729-49a8-aec7-0e397f486b6e", - "alias": "SPClientPreview", - "componentType": "Library", - "version": "1.4.1", - "manifestVersion": 2, - "loaderConfig": { - "entryModuleId": "sp-client-preview", - "internalModuleBaseUrls": [ - "https://localhost:4321/node_modules/@microsoft/sp-client-preview/" - ], - "scriptResources": { - "sp-client-preview": { - "type": "path", - "path": "dist/sp-client-preview.js" - }, - "@microsoft/sp-core-library": { - "type": "component", - "version": "1.4.1", - "id": "7263c7d0-1d6a-45ec-8d85-d4d1d234171b" - }, - "@microsoft/sp-lodash-subset": { - "type": "component", - "version": "1.4.1", - "id": "73e1dc6c-8441-42cc-ad47-4bd3659f8a3a" - }, - "@ms/sp-telemetry": { - "type": "component", - "version": "0.2.2", - "id": "8217e442-8ed3-41fd-957d-b112e841286a" - }, - "@microsoft/sp-http": { - "type": "component", - "version": "1.4.1", - "id": "c07208f0-ea3b-4c1a-9965-ac1b825211a6" - } - } - }, - "isInternal": true - }, - { - "id": "8be81a5c-af38-4bb2-af97-afa3b64dfbed", - "alias": "WebPartWorkbench", - "componentType": "Application", - "version": "1.4.1", - "manifestVersion": 2, - "title": { - "default": "WebpartWorkbench" - }, - "description": { - "default": "WebpartWorkbench" - }, - "assemblyId": "5dae53c4-db1e-4d0b-b8b2-88c874dabf83", - "preloadComponents": [ - "8217e442-8ed3-41fd-957d-b112e841286a", - "4df9bb86-ab0a-4aab-ab5f-48bf167048fb", - "05ed6956-59ad-4aa6-9e4e-b832c96ae87b" - ], - "preloadOptions": { - "shouldPreloadWeb": true, - "shouldPreloadUser": true, - "shouldPreloadList": false, - "shouldPreloadItem": true, - "shouldPreloadQuickLaunch": true - }, - "loaderConfig": { - "entryModuleId": "sp-webpart-workbench", - "internalModuleBaseUrls": [ - "https://localhost:4321/node_modules/@microsoft/sp-webpart-workbench/" - ], - "scriptResources": { - "sp-webpart-workbench": { - "type": "localizedPath", - "defaultPath": "dist/sp-webpart-workbench_en-us.js" - }, - "react": { - "type": "component", - "version": "15.6.2", - "id": "0d910c1c-13b9-4e1c-9aa4-b008c5e42d7d", - "failoverPath": "node_modules/react/dist/react.js" - }, - "office-ui-fabric-react": { - "type": "component", - "version": "1.4.1", - "id": "02a01e42-69ab-403d-8a16-acd128661f8e" - }, - "@microsoft/sp-core-library": { - "type": "component", - "version": "1.4.1", - "id": "7263c7d0-1d6a-45ec-8d85-d4d1d234171b" - }, - "@ms/sp-telemetry": { - "type": "component", - "version": "0.2.2", - "id": "8217e442-8ed3-41fd-957d-b112e841286a" - }, - "@microsoft/sp-lodash-subset": { - "type": "component", - "version": "1.4.1", - "id": "73e1dc6c-8441-42cc-ad47-4bd3659f8a3a" - }, - "@microsoft/sp-webpart-base": { - "type": "component", - "version": "1.4.1", - "id": "974a7777-0990-4136-8fa6-95d80114c2e0" - }, - "react-dom": { - "type": "component", - "version": "15.6.2", - "id": "aa0a46ec-1505-43cd-a44a-93f3a5aa460a", - "failoverPath": "node_modules/react-dom/dist/react-dom.js" - }, - "@microsoft/office-ui-fabric-react-bundle": { - "type": "component", - "version": "1.4.1", - "id": "02a01e42-69ab-403d-8a16-acd128661f8e" - }, - "@microsoft/sp-page-context": { - "type": "component", - "version": "1.4.1", - "id": "1c4541f7-5c31-41aa-9fa8-fbc9dc14c0a8" - }, - "@microsoft/sp-http": { - "type": "component", - "version": "1.4.1", - "id": "c07208f0-ea3b-4c1a-9965-ac1b825211a6" - }, - "@microsoft/sp-application-base": { - "type": "component", - "version": "1.4.1", - "id": "4df9bb86-ab0a-4aab-ab5f-48bf167048fb" - }, - "@microsoft/sp-loader": { - "type": "component", - "version": "1.4.1", - "id": "1c6c9123-7aac-41f3-a376-3caea41ed83f" - } - } - }, - "isInternal": true - }, - { - "id": "abc3361f-bb2d-491f-aba3-cd51c19a299b", - "alias": "MegaMenuApplicationCustomizer", - "componentType": "Extension", - "extensionType": "ApplicationCustomizer", - "version": "1.1.2", - "manifestVersion": 2, - "requiresCustomScript": false, - "loaderConfig": { - "entryModuleId": "mega-menu-application-customizer", - "internalModuleBaseUrls": [ - "https://localhost:4321/" - ], - "scriptResources": { - "mega-menu-application-customizer": { - "type": "path", - "path": "dist/mega-menu-application-customizer.js" - }, - "MegaMenuApplicationCustomizerStrings": { - "defaultPath": "lib/extensions/megaMenu/loc/en-us.js", - "type": "localizedPath", - "paths": { - "de-DE": "lib/extensions/megaMenu/loc/de-de.js", - "en-US": "lib/extensions/megaMenu/loc/en-us.js" - } - }, - "@microsoft/decorators": { - "type": "component", - "version": "1.4.1", - "id": "f97266fb-ccb7-430e-9384-4124d05295d3" - }, - "@microsoft/sp-application-base": { - "type": "component", - "version": "1.4.1", - "id": "4df9bb86-ab0a-4aab-ab5f-48bf167048fb" - }, - "@microsoft/sp-http": { - "type": "component", - "version": "1.4.1", - "id": "c07208f0-ea3b-4c1a-9965-ac1b825211a6" - }, - "@microsoft/sp-lodash-subset": { - "type": "component", - "version": "1.4.1", - "id": "73e1dc6c-8441-42cc-ad47-4bd3659f8a3a" - } - } - } - } -] \ No newline at end of file diff --git a/temp/tslint-tsconfig.json b/temp/tslint-tsconfig.json deleted file mode 100644 index e0d9f90..0000000 --- a/temp/tslint-tsconfig.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "forceConsistentCasingInFileNames": true, - "module": "esnext", - "moduleResolution": "node", - "jsx": "react", - "declaration": true, - "sourceMap": true, - "experimentalDecorators": true, - "skipLibCheck": true, - "typeRoots": [ - "./node_modules/@types", - "./node_modules/@microsoft" - ], - "types": [ - "es6-promise", - "webpack-env" - ], - "lib": [ - "es5", - "dom", - "es2015.collection" - ] - } -} \ No newline at end of file diff --git a/temp/tslint.json b/temp/tslint.json deleted file mode 100644 index 5999381..0000000 --- a/temp/tslint.json +++ /dev/null @@ -1,158 +0,0 @@ -{ - "rules": { - "class-name": true, - "comment-format": [ - true, - "check-space" - ], - "curly": true, - "eofline": false, - "export-name": true, - "forin": true, - "indent": [ - true, - "spaces", - 2 - ], - "interface-name": true, - "label-position": true, - "max-line-length": [ - true, - 120 - ], - "member-access": true, - "member-ordering": [ - true, - { - "order": [ - "public-static-field", - "protected-static-field", - "private-static-field", - "public-instance-field", - "protected-instance-field", - "private-instance-field", - "public-static-method", - "protected-static-method", - "private-static-method", - "public-constructor", - "public-instance-method", - "protected-constructor", - "protected-instance-method", - "private-constructor", - "private-instance-method" - ] - } - ], - "missing-optional-annotation": true, - "no-arg": true, - "no-any": true, - "no-bitwise": true, - "no-consecutive-blank-lines": true, - "no-console": [ - true, - "debug", - "info", - "time", - "timeEnd", - "trace" - ], - "no-constant-condition": true, - "no-construct": true, - "no-debugger": true, - "no-duplicate-case": true, - "no-duplicate-parameter-names": true, - "no-duplicate-variable": true, - "no-empty": true, - "no-eval": true, - "no-function-expression": true, - "no-inferrable-types": false, - "no-internal-module": true, - "no-null-keyword": true, - "no-shadowed-variable": true, - "no-string-literal": true, - "no-switch-case-fall-through": true, - "no-trailing-whitespace": true, - "no-unnecessary-semicolons": true, - "no-unused-expression": true, - "no-unused-variable": true, - "no-use-before-declare": true, - "no-with-statement": true, - "no-var-keyword": true, - "object-literal-sort-keys": false, - "one-line": [ - true, - "check-open-brace", - "check-catch", - "check-else", - "check-whitespace" - ], - "quotemark": [ - true, - "single", - "avoid-escape" - ], - "prefer-const": true, - "radix": true, - "semicolon": true, - "trailing-comma": [ - true, - { - "multiline": "never", - "singleline": "never" - } - ], - "triple-equals": [ - true, - "allow-null-check" - ], - "typedef": [ - true, - "call-signature", - "parameter", - "property-declaration", - "variable-declaration", - "member-variable-declaration" - ], - "typedef-whitespace": [ - true, - { - "call-signature": "nospace", - "index-signature": "nospace", - "parameter": "nospace", - "property-declaration": "nospace", - "variable-declaration": "nospace" - } - ], - "use-isnan": true, - "use-named-parameter": true, - "valid-typeof": true, - "variable-name": [ - true, - "check-format", - "allow-leading-underscore", - "ban-keywords" - ], - "whitespace": [ - true, - "check-branch", - "check-decl", - "check-operator", - "check-separator", - "check-type" - ], - "react-a11y-aria-unsupported-elements": true, - "react-a11y-event-has-role": true, - "react-a11y-image-button-has-alt": true, - "react-a11y-img-has-alt": true, - "react-a11y-lang": true, - "react-a11y-anchors": false, - "react-a11y-meta": true, - "react-a11y-props": true, - "react-a11y-proptypes": true, - "react-a11y-role-has-required-aria-props": true, - "react-a11y-role-supports-aria-props": true, - "react-a11y-role": true, - "react-a11y-tabindex-no-positive": true, - "react-a11y-titles": true - } -} \ No newline at end of file