import{__require as r}from"./createExpectedPropertiesOrder.mjs";import{__require as e}from"../getComments.mjs";import{__require as o}from"./getPropertiesOrderData.mjs";import{__require as t}from"../isCustomProperty.mjs";import{__require as i}from"../isAllowedToProcess.mjs";import{__require as s}from"../isStandardSyntaxProperty.mjs";import{__require as a}from"./sortDeclarations.mjs";import{__require as p}from"./sortDeclarationsAlphabetically.mjs";import{__require as m}from"./vendor.mjs";var n,l;function u(){if(l)return n;l=1;let u=r(),f=e(),_=o(),d=t(),c=i(),P=s(),q=a(),j=p(),x=m();return n=function(r,{order:e,unspecifiedPropertiesPosition:o}){if(!c(r))return;let t="alphabetical"===e,i=t?null:u(e),s=[],a=[];r.each((r,e)=>{if("decl"===r.type&&P(r.prop)&&!d(r.prop)){let s=x.unprefixed(r.prop).toLowerCase();0===s.indexOf("osx-")&&(s=s.slice(4));let p={name:r.prop,unprefixedName:s,orderData:t?null:_(i,s),node:r,initialIndex:e,unspecifiedPropertiesPosition:o};r.sortProperty=!0;let m=f.beforeDeclaration([],r.prev(),p),n=f.afterDeclaration([],r.next(),p);a=[...a,...m,p,...n]}}),t?a.sort(j):a.sort(q);let p=!1;r.each(r=>{r.sortProperty?p||(p=!0,a.forEach(r=>{s.push(r.node)})):s.push(r)}),r.removeAll(),r.append(s)}}export{u as __require};